login
A375976
Sum of squares of the decimal digits of 2^n.
1
1, 4, 16, 64, 37, 13, 52, 69, 65, 30, 21, 84, 133, 150, 126, 162, 131, 64, 77, 177, 191, 164, 139, 301, 225, 113, 266, 197, 231, 269, 209, 275, 404, 450, 443, 371, 426, 332, 461, 487, 413, 288, 266, 396, 346, 382, 426, 404, 463, 393, 514, 528, 517, 569, 584
OFFSET
0,2
FORMULA
a(n) = A003132(A000079(n)).
EXAMPLE
For n=4, 2^4 = 16 and those digits 1^2 + 6^2 = 37 = a(4).
MATHEMATICA
a[n_]:=Norm[IntegerDigits[2^n]]^2; Array[a, 55, 0] (* Stefano Spezia, Sep 06 2024 *)
PROG
(PARI) a(n) = norml2(digits(2^n)); \\ Michel Marcus, Sep 06 2024
(Python)
def A375976(n): return sum((0, 1, 4, 9, 16, 25, 36, 49, 64, 81)[int(d)] for d in str(1<<n) if d>'0') # Chai Wah Wu, Sep 30 2024
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Luca Khan, Sep 04 2024
STATUS
approved