OFFSET
1,2
REFERENCES
Bruce C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 373, Entry 31.
Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.29).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A097057(n)/4.
Multiplicative with a(2) = 2, a(2^e) = 6 if e > 1, a(p^e) = (p^(e+1)-1)/(p-1) if p > 2.
G.f.: ((theta_3(q)theta_3(q^2))^2-1)/4 where theta_3(q)=1+2(q+q^4+q^9+...).
G.f.: Sum_{k>0} 2*x^(4k)/(1+x^(4k))^2 +x^(2k-1)/(1-x^(2k-1))^2 = Sum_{k>0} +(2+(-1)^k)k x^(2k)/(1+x^(2k)) +(2k-1)x^(2k-1)/(1-x^(2k-1)). - Michael Somos, Oct 22 2005
From Amiram Eldar, Nov 25 2025: (Start)
Dirichlet g.f.: zeta(s) * zeta(s-1) * (1 - 1/2^(s-1)) * (1 + 1/2^s + 1/2^(2*s-2)).
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/16 = 0.6168502... (A222068). (End)
MATHEMATICA
f[p_, e_] := (p^(e+1)-1)/(p-1); f[2, 1] = 2; f[2, e_] := 6; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 22 2023 *)
PROG
(PARI) a(n)=if(n<1, 0, sumdiv(n, d, d*(-1)^((d+1)*(n/d+1))*[2, 1, 0, 1][n/d%4+1]))
(PARI) {a(n)= local(A); if(n<1, 0, A=x*O(x^n); polcoeff( ((eta(x^2+A)*eta(x^4+A))^6/(eta(x+A)*eta(x^8+A))^4-1)/4, n))}
(PARI) a(n)= local(x); if(n<1, 0, x=2^valuation(n, 2); sigma(n/x)*if(x>2, 6, x))
(PARI) {a(n)=local(A, p, e); if(n<1, 0, A=factor(n); prod(k=1, matsize(A)[1], if(p=A[k, 1], e=A[k, 2]; if(p==2, 2+4*(e>1), (p^(e+1)-1)/(p-1)))))}
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Michael Somos, Aug 23 2005
STATUS
approved
