OFFSET
0,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..500
FORMULA
a(n) = A122510(6,n^2). - R. J. Mathar, Apr 21 2010
a(n) = [x^(n^2)] theta_3(x)^6/(1 - x), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 14 2018
MATHEMATICA
t[d_, n_] := t[d, n] = t[d, n - 1] + SquaresR[d, n]; t[d_, 0] = 1;
a[n_] := t[6, n^2];
a /@ Range[0, 100] (* Jean-François Alcover, Sep 27 2019, after R. J. Mathar *)
PROG
(Python)
from math import prod
from sympy import factorint
def A055412(n):
c = 1
for m in range(1, n**2+1):
f = [(p, e, (0, 1, 0, -1)[p&3]) for p, e in factorint(m).items()]
c += (prod((p**(e+1<<1)-a)//(p**2-a) for p, e, a in f)<<2)-prod(((k:=p**2*a)**(e+1)-1)//(k-1) for p, e, a in f)<<2
return c # Chai Wah Wu, Jun 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved