login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A003621 Number of iterations until n reaches 1 or 4 under x goes to sum of squares of digits map.
(Formerly M4764)
13

%I M4764

%S 0,1,11,0,8,13,5,9,10,1,2,9,2,10,10,7,9,9,4,1,9,10,3,2,7,9,10,3,6,11,

%T 2,3,10,8,9,12,6,7,11,8,10,2,8,4,11,8,9,10,4,8,10,7,9,11,9,8,10,5,8,

%U 13,7,9,12,8,8,11,6,2,12,5,9,10,6,9,10,6,5,4,3,9

%N Number of iterations until n reaches 1 or 4 under x goes to sum of squares of digits map.

%D J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 13.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Seiichi Manyama, <a href="/A003621/b003621.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)

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

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

%F a(n) = 0 if n = 1 or 4, otherwise a(n) = 1 + a(A003132(n)). - _Robert Israel_, Apr 11 2019

%p f:= n -> convert(map(t -> t^2, convert(n,base,10)),`+`):

%p g:= proc(n) option remember;

%p if n = 1 or n = 4 then 0 else 1 + procname(f(n)) fi

%p end proc:

%p map(g, [$1..100]); # _Robert Israel_, Apr 11 2019

%t Table[Length[NestWhileList[Total[IntegerDigits[#]^2]&,n,#!=1&&#!=4&]],{n,80}]-1 (* _Harvey P. Dale_, Dec 31 2016 *)

%Y Cf. A000216, A000218, A300081, etc.

%Y Cf. A003132.

%K nonn,base

%O 1,3

%A _N. J. A. Sloane_, _Mira Bernstein_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 13 02:38 EDT 2021. Contains 342934 sequences. (Running on oeis4.)