OFFSET
0,2
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