OFFSET
1,3
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
Consider n=33: n^2 is 1089, sum of square of digits is 3^2+3^2=18, and sum of digits of square is 1+0+8+9=18, thus 33 appears in the sequence.
PROG
(PARI) digsum(n) = my(s=0); while(n, s=s+n%10; n=n\10); s;
sqadigsum(n) = my(s=0); while(n, s=s+(n%10)^2; n=n\10); s;
for(n=0, 100000, if(sqadigsum(n)==digsum(n^2), print1(n, ", ") ) )
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Rémy Sigrist, Sep 21 2009
EXTENSIONS
Offset fixed by Rémy Sigrist, Feb 03 2017
STATUS
approved