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)
def countUniqueFactors(self,x): factDict=p.getFactorDict(x,self.curPrimes) return len(factDict)
def getPFDict(x): rtnVal={} for i in range(1,x): rtnVal[i]=p.getFactorDict(i,pList) return rtnVal