All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Triangular Transcension (Posted on 2009-09-22)
Determine the minimum value of a triangular number T such that the total number of positive divisors of T, including 1 and T, exceeds 500.

 See The Solution Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 UBASIC version Comment 3 of 3 |
`list   10   Tr=1:Trn=1   20   loop   30       Tr=Tr+1:Trn=Trn+Tr   40       Dvsrs=fnDivs(Trn)   50       if Dvsrs>=500 then print Tr;Trn;Dvsrs:end   60   endloop  499   end  500   fnDivs(X)  510   local Ds,Ct,Pdr  550   Ds=1:Ct=0:Pdr=0  570   N=X  580   while N>1  590      Dr=prmdiv(N)  600      N=N//Dr  610      if Dr=Pdr then Ct=Ct+1  620        :else Ds=Ds*(Ct+1)  630           :Ct=1  640      Pdr=Dr  650   wend  660   Ds=Ds*(Ct+1)  670   return(Ds)OKrun 12375  76576500  576OK`

 Posted by Charlie on 2009-09-23 00:52:01

 Search: Search body:
Forums (0)