OFFSET
1,3
REFERENCES
J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 13.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
A. Porges, A set of eight numbers, Amer. Math. Monthly, 52 (1945), 379-382. [Annotated scanned copy]
Arthur Porges, A set of eight numbers, Amer. Math. Monthly 52 (1945), 379-382.
FORMULA
a(n) = 0 if n = 1 or 4, otherwise a(n) = 1 + a(A003132(n)). - Robert Israel, Apr 11 2019
MAPLE
f:= n -> convert(map(t -> t^2, convert(n, base, 10)), `+`):
g:= proc(n) option remember;
if n = 1 or n = 4 then 0 else 1 + procname(f(n)) fi
end proc:
map(g, [$1..100]); # Robert Israel, Apr 11 2019
MATHEMATICA
Table[Length[NestWhileList[Total[IntegerDigits[#]^2]&, n, #!=1&&#!=4&]], {n, 80}]-1 (* Harvey P. Dale, Dec 31 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved