cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A039943 #45 Feb 16 2025 08:32:38
%S A039943 0,1,4,16,20,37,42,58,89,145
%N A039943 Every integer eventually goes to one of these under the "x goes to sum of squares of digits of x" map.
%C A039943 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 A039943 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 A039943 B. A. Kordemsky, Matematicheskaja Smekalka, Moscow, 1955, pp. 305 and 557 (in Russian).
%H A039943 Arthur Porges, <a href="http://www.jstor.org/stable/2304639">A set of eight numbers</a>, Amer. Math. Monthly 52 (1945), 379-382.
%H A039943 Arthur Porges, <a href="/A003621/a003621.pdf">A set of eight numbers</a>, Amer. Math. Monthly, 52 (1945), 379-382. [Annotated scanned copy]
%H A039943 Eric W. Weisstein, <a href="https://mathworld.wolfram.com/HappyNumber.html">MathWorld: Happy Number</a>
%H A039943 Wikipedia, <a href="http://en.wikipedia.org/wiki/Periodic_point">Periodic point</a>
%t A039943 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 A039943 Union[Table[NestWhile[Total[IntegerDigits[#]^2]&,n,Unequal,All],{n,0,100}]] (* _Harvey P. Dale_, Nov 26 2013 *)
%o A039943 (Haskell)
%o A039943 a039943 n = a039943_list !! n
%o A039943 a039943_list = [0,1,4,16,20,37,42,58,89,145]
%o A039943 -- _Reinhard Zumkeller_, Mar 16 2013
%Y A039943 Cf. A000216, A003621.
%Y A039943 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 A039943 nonn,fini,full,base
%O A039943 0,3
%A A039943 _N. J. A. Sloane_