OFFSET
0,12
COMMENTS
a(n) = 0 iff n is a single-digit number or is a power of ten times a single-digit number. - Robert G. Wilson v, May 04 2002
FORMULA
From R. J. Mathar, Jun 23 2009: (Start)
a(n) = 2*A035930(n), n <= 100.
EXAMPLE
n=14: sum of digits = 5, squaring gives 25; sum of squared digits of n = 1^2 + 4^2 = 17, so a(14) = 25 - 17 = 8.
MAPLE
MATHEMATICA
f[n_] := Plus @@ IntegerDigits[n]^2 - Plus @@ (IntegerDigits[n]^2); Table[ f[n], {n, 0, 100}]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, May 03 2002
EXTENSIONS
Extended by Robert G. Wilson v, May 04 2002
STATUS
approved