OFFSET
0,2
COMMENTS
Partial sums of A000143.
LINKS
FORMULA
G.f.: theta_3(x)^8 / (1 - x).
a(n^2) = A055414(n).
MAPLE
b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
b(n, k-1)+2*add(b(n-j^2, k-1), j=1..isqrt(n))))
end:
a:= proc(n) option remember; b(n, 8)+`if`(n>0, a(n-1), 0) end:
seq(a(n), n=0..33); # Alois P. Heinz, Feb 10 2021
MATHEMATICA
nmax = 33; CoefficientList[Series[EllipticTheta[3, 0, x]^8/(1 - x), {x, 0, nmax}], x]
Table[SquaresR[8, n], {n, 0, 33}] // Accumulate
PROG
(Python)
from math import prod
from sympy import factorint
def A341397(n): return (sum((prod((p**(3*(e+1))-(1 if p&1 else 15))//(p**3-1) for p, e in factorint(m).items()) for m in range(1, n+1)))<<4)+1 # Chai Wah Wu, Jun 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 10 2021
STATUS
approved