login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A171250 Row lengths of A082381: number of iterations of "sum of digits squared" until 1 or 4 is reached. 3

%I #8 Jun 08 2017 17:43:52

%S 1,1,11,1,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,9,3,7,10,5,2,4,14,4,10,4,6,11,4,8,12,3,4,12,1

%N Row lengths of A082381: number of iterations of "sum of digits squared" until 1 or 4 is reached.

%C In the spirit of A082381, the map A003132 ("sum of digits squared") is applied at least once to the initial value n; the sequence gives the number of iterations until 1 or 4 is reached.

%F a(n) = O(log* n).

%t Table[Length[NestWhileList[Total[IntegerDigits[#]^2]&,n,!MemberQ[{1,4},#]&]]-1,{n,100}]/.(0->1) (* _Harvey P. Dale_, Jun 08 2017 *)

%o (PARI) A171250(n)=my(c=0); until( n==4 || n==1, c++; n=norml2(eval(Vec(Str(n))))); c

%Y Cf. A082381, A003132, A082382, A000216 (n=2), A000218 (n=3), A080709 (n=4), A000221 (n=5), A008460 (n=6), A008461 (n=7: ends in 1), A008462 (n=8), A008462 (n=9), A139566 (n=15), A122065 (n=74169), A000012 (n=1).

%K nonn,base

%O 1,3

%A _M. F. Hasler_, Dec 18 2009

%E Formula from _Charles R Greathouse IV_, Aug 02 2010

%E Corrected and extended by _Harvey P. Dale_, Jun 08 2017

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 11 01:12 EDT 2024. Contains 372388 sequences. (Running on oeis4.)