Exemplo n.º 1
0
import prime

#initialize
curSum = 3
lastSummand = 2
curNumDivisors = 2

#functions
def nextNum(curSum, lastSummand):
    return curSum + (lastSummand + 1)


while (curNumDivisors < 500):
    curSum = nextNum(curSum, lastSummand)
    lastSummand += 1
    #print curSum
    #print str(curSum) + " " + str(lastSummand)
    curNumDivisors = prime.numDivisors(curSum)
    #print curNumDivisors
    #print ""

print curSum
print prime.numDivisors(curSum)
print prime.getFactorDict(curSum)
Exemplo n.º 2
0
 def countUniqueFactors(self,x):
     factDict=p.getFactorDict(x,self.curPrimes)
     return len(factDict)
Exemplo n.º 3
0
def getPFDict(x):
	rtnVal={}
	for i in range(1,x):
		rtnVal[i]=p.getFactorDict(i,pList)
	return rtnVal