A039943 Every integer eventually goes to one of these under the "x goes to sum of squares of digits of x" map.
0, 1, 4, 16, 20, 37, 42, 58, 89, 145
Offset: 0
References
- B. A. Kordemsky, Matematicheskaja Smekalka, Moscow, 1955, pp. 305 and 557 (in Russian).
Links
- Arthur Porges, A set of eight numbers, Amer. Math. Monthly 52 (1945), 379-382.
- Arthur Porges, A set of eight numbers, Amer. Math. Monthly, 52 (1945), 379-382. [Annotated scanned copy]
- Eric W. Weisstein, MathWorld: Happy Number
- Wikipedia, Periodic point
Crossrefs
Cf. A003132 (the iterated map), A003621, A039943, A031176, A007770, A000216 (orbit of 2), A000218 (orbit of 3), A080709 (orbit of 4, the only nontrivial limit cycle), A000221 (orbit of 5), A008460 (orbit of 6), A008462 (orbit of 8), A008463 (orbit of 9), A139566 (orbit of 15), A122065 (orbit of 74169).
Programs
-
Haskell
a039943 n = a039943_list !! n a039943_list = [0,1,4,16,20,37,42,58,89,145] -- Reinhard Zumkeller, Mar 16 2013
-
Mathematica
lst = {}; Do[a = NestWhile[Plus @@ (IntegerDigits@#^2) &, n, Unequal, All]; If[FreeQ[lst, a], AppendTo[lst, a]], {n, 10^4}] (* Robert G. Wilson v, Jan 19 2006 *) Union[Table[NestWhile[Total[IntegerDigits[#]^2]&,n,Unequal,All],{n,0,100}]] (* Harvey P. Dale, Nov 26 2013 *)
Comments