OFFSET
1,2
COMMENTS
A003132(n) is the sum of the squares of the digits of n.
EXAMPLE
205 is in the sequence because 205 + 2^2 + 0^2 + 5^2 = 234 and 234 - 2^2 - 3^2 - 4^2 = 205.
MATHEMATICA
sod2[n_] := Total @ (IntegerDigits[n]^2); aQ[n_] := sod2[n + (s=sod2[n])] == s; Select[Range[0, 4700], aQ] (* Amiram Eldar, Jul 03 2019 *)
PROG
(PARI) for(i = 0 , 5000 , a = i + norml2(digits(i)) ; b = a - norml2(digits(a)) ; if(i == b , print1(i , ", ")))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antonio Roldán, Apr 25 2019
STATUS
approved