login
Every integer eventually goes to one of these under the "x goes to sum of squares of digits of x" map.
22

%I #44 Apr 30 2018 11:40:05

%S 0,1,4,16,20,37,42,58,89,145

%N Every integer eventually goes to one of these under the "x goes to sum of squares of digits of x" map.

%C The subset of the first three terms also satisfies the current definition. An alternate definition would be: Periodic points of A003132. - _M. F. Hasler_, May 24 2009

%C Following I. Ja. Tanatar (Moscow), one can easily prove that, for a given x, there exists an iteration of the map f(x) given in the definition which reaches 1 or 89. Indeed, it is easy to see that if x has at least 3 digits, then f(x) < x. Therefore there exists an iteration of f with not more than 2 digits. For two-digit numbers the property is verified directly. See Kordemsky. - _Vladimir Shevelev_, May 06 2013

%D B. A. Kordemsky, Matematicheskaja Smekalka, Moscow, 1955, pp. 305 and 557 (in Russian).

%H Arthur Porges, <a href="http://www.jstor.org/stable/2304639">A set of eight numbers</a>, Amer. Math. Monthly 52 (1945), 379-382.

%H Arthur Porges, <a href="/A003621/a003621.pdf">A set of eight numbers</a>, Amer. Math. Monthly, 52 (1945), 379-382. [Annotated scanned copy]

%H Eric W. Weisstein, <a href="http://mathworld.wolfram.com/HappyNumber.html">MathWorld: Happy Number</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Periodic_point">Periodic point</a>

%t 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 *)

%t Union[Table[NestWhile[Total[IntegerDigits[#]^2]&,n,Unequal,All],{n,0,100}]] (* _Harvey P. Dale_, Nov 26 2013 *)

%o (Haskell)

%o a039943 n = a039943_list !! n

%o a039943_list = [0,1,4,16,20,37,42,58,89,145]

%o -- _Reinhard Zumkeller_, Mar 16 2013

%Y Cf. A000216, A003621.

%Y 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).

%K nonn,fini,full,base

%O 0,3

%A _N. J. A. Sloane_