OFFSET
0,2
COMMENTS
Orbit of 1 under iterations of A258881. - M. F. Hasler, Jul 23 2015
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
FORMULA
EXAMPLE
After 1063, since 1^2 + 0^2 + 6^2 + 3^2 = 46 we get 1063+46 = 1109.
MAPLE
A[0] := 1;
for n to 50 do
A[n] := A[n-1]+add(t^2, t = convert(A[n-1], base, 10))
od:
seq(A[i], i=0..50); # Robert Israel, Feb 15 2018
MATHEMATICA
NestList[#+Total[IntegerDigits[#]^2]&, 1, 45] (* Harvey P. Dale, Aug 14 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Olivier Gorin (gorin(AT)roazhon.inra.fr)
STATUS
approved