OFFSET
1,3
COMMENTS
FORMULA
a(n) = O(log* n).
MATHEMATICA
Table[Length[NestWhileList[Total[IntegerDigits[#]^2]&, n, !MemberQ[{1, 4}, #]&]]-1, {n, 100}]/.(0->1) (* Harvey P. Dale, Jun 08 2017 *)
PROG
(PARI) A171250(n)=my(c=0); until( n==4 || n==1, c++; n=norml2(eval(Vec(Str(n))))); c
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Dec 18 2009
EXTENSIONS
Formula from Charles R Greathouse IV, Aug 02 2010
Corrected and extended by Harvey P. Dale, Jun 08 2017
STATUS
approved