OFFSET
1,2
COMMENTS
This was a puzzle mentioned on The Aperiodical website.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MATHEMATICA
f[n_] := Total[IntegerDigits[n]^2]; Select[Range[400]^2, NestWhile[f, #, UnsameQ, All] == 1 &]
PROG
(PARI) ssd(n)=n=digits(n); sum(i=1, #n, n[i]^2)
select(n->while(n>6, n=ssd(n)); n==1, vector(1000, i, i^2)) \\ Charles R Greathouse IV, Dec 17 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
T. D. Noe, Oct 07 2013
STATUS
approved