Aliquot Sequence

Author

Eric W. Weisstein
June 1, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/AliquotSequence.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/AliquotSequence.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Lehmer Five

AliquotLength[n_,m_:200,t_:60]:=TimeConstrained[Length[NestWhileList[DivisorSigma[1,#]-#&,n,Last[{##}]=!=0&&Unequal[##]&,All,m]]-1,t]

l=AliquotLength/@Range[10^3];//Timing

Take[l,20]

http://www.research.att.com/~njas/sequences/A044050

l5=Flatten[Position[l,200]]

{276,552,564,660 ,966}

Monitor[Print[{n=#,AliquotLength[n,1000,120]//Timing}]&/@l5,n]

Monitor[Print[{n=#,AliquotLength[n,1000,300]//Timing}]&/@l5,n]

Monitor[Print[{n=#,AliquotLength[n,1000,1800]//Timing}]&/@{276,306,396,552,564,660,696,780,828,840,888,966,996},n]

Monitor[Print[{n=#,AliquotLength[n,1000,1800]//Timing}]&/@{276,306,396,552,564,660,696,780,828,888,966,996},n]