cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A375976 Sum of squares of the decimal digits of 2^n.

Original entry on oeis.org

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

Views

Author

Luca Khan, Sep 04 2024

Keywords

Examples

			For n=4, 2^4 = 16 and those digits 1^2 + 6^2 = 37 = a(4).
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Norm[IntegerDigits[2^n]]^2; Array[a,55,0] (* Stefano Spezia, Sep 06 2024 *)
  • 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<'0') # Chai Wah Wu, Sep 30 2024

Formula

a(n) = A003132(A000079(n)).
Showing 1-1 of 1 results.