|
|
A069816
|
|
a(n) = (sum of digits of n)^2 - (sum of digits^2 of n).
|
|
4
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 0, 14, 28, 42, 56, 70, 84
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|