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.
%I A375976 #22 Sep 30 2024 15:21:33 %S A375976 1,4,16,64,37,13,52,69,65,30,21,84,133,150,126,162,131,64,77,177,191, %T A375976 164,139,301,225,113,266,197,231,269,209,275,404,450,443,371,426,332, %U A375976 461,487,413,288,266,396,346,382,426,404,463,393,514,528,517,569,584 %N A375976 Sum of squares of the decimal digits of 2^n. %F A375976 a(n) = A003132(A000079(n)). %e A375976 For n=4, 2^4 = 16 and those digits 1^2 + 6^2 = 37 = a(4). %t A375976 a[n_]:=Norm[IntegerDigits[2^n]]^2; Array[a,55,0] (* _Stefano Spezia_, Sep 06 2024 *) %o A375976 (PARI) a(n) = norml2(digits(2^n)); \\ _Michel Marcus_, Sep 06 2024 %o A375976 (Python) %o A375976 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 %Y A375976 Cf. A000079, A003132, A001370, A110892. %K A375976 nonn,base,easy %O A375976 0,2 %A A375976 _Luca Khan_, Sep 04 2024