[go: up one dir, main page]

login
A067552
a(n) = SumOfDigits(n)^2 - SumOfDigits(n^2), where SumOfDigits = A007953.
5
0, 0, 0, 0, 9, 18, 27, 36, 54, 72, 0, 0, 0, 0, 9, 27, 36, 45, 72, 90, 0, 0, 0, 9, 18, 36, 45, 63, 81, 108, 0, 0, 18, 18, 36, 54, 63, 81, 108, 135, 9, 9, 18, 27, 45, 72, 90, 108, 135, 162, 18, 27, 36, 45, 63, 90, 108, 126, 153, 180, 27, 36, 45, 54, 81, 108, 126, 144, 180, 207
OFFSET
0,5
COMMENTS
All terms are divisible by 9; see A069912 for the quotient. - Ivan Neretin, Sep 01 2016
LINKS
FORMULA
a(n) = A007953(n)^2 - A004159(n).
EXAMPLE
a(16) = SumOfDigits(16)^2 - SumOfDigits(16^2) = (1+6)^2 - SumOfDigits(256) = 7^2 - (2+5+6) = 49 - 13 = 36.
MATHEMATICA
f[n_] := Plus @@ IntegerDigits[n]^2 - Plus @@ (IntegerDigits[n^2]); Table[ f[n], {n, 0, 100}]
PROG
(PARI) a(n) = sumdigits(n)^2 - sumdigits(n^2); \\ Michel Marcus, Sep 01 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Jan 28 2002
EXTENSIONS
Edited by Robert G. Wilson v, May 04 2002
STATUS
approved