%I M0416 N0159 #43 Mar 12 2021 22:24:41
%S 1,2,3,2,1,2,2,4,2,2,1,0,4,2,3,2,2,4,0,2,2,0,4,2,3,0,2,6,2,2,1,2,0,2,
%T 2,2,2,4,2,0,4,4,4,0,1,2,0,4,2,0,2,2,5,2,0,2,2,4,4,2,0,2,4,2,2,0,4,0,
%U 0,2,3,2,4,2,0,4,0,6,2,4,1,0,4,2,2,2,2,0,0,2,0,2,8,2,2,0,2,4,0,4,2,2,3,2,2
%N Excess of number of divisors of 12n+1 of form 4k+1 over those of form 4k+3.
%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%C Number of ways to write n as an ordered sum of 2 generalized pentagonal numbers. - _Ilya Gutkovskiy_, Aug 14 2017
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H John Cerkan, <a href="/A002175/b002175.txt">Table of n, a(n) for n = 0..10000</a>
%H J. W. L. Glaisher, <a href="https://doi.org/10.1112/plms/s1-21.1.182">On the square of Euler's series</a>, Proc. London Math. Soc., 21 (1889), 182-194.
%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>
%F Expansion of (phi(-x^3) / chi(-x))^2 in powers of x where phi(), chi() are Ramanujan theta functions.
%F Expansion of q^(-1/12) * (eta(q^2) * eta(q^3)^2 / (eta(q) * eta(q^6)))^2 in powers of q. - _Michael Somos_, Sep 19 2005
%F Euler transform of period 6 sequence [ 2, 0, -2, 0, 2, -2, ...]. - _Michael Somos_, Sep 19 2005
%F G.f. is a period 1 Fourier series which satisfies f(-1 / (72 t)) = 2 (t/i) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A258279. - _Michael Somos_, May 25 2015
%F From _Michael Somos_, Jun 02 2012: (Start)
%F a(n) = A008441(3*n) = A121363(3*n) = A122865(4*n) = A122856(8*n).
%F a(n) = A116604(6*n) = A125079(6*n) = A129447(6*n) = A138741(6*n).
%F a(n) = A(12*n+1) where A = A002654, A008442, A035154, A035181, A035184,
%F A112301, A113406, A113652, A121450, A122864, A125061, A129448, A132004,
%F A134013, A134015, A138746, A138950, A138952, A163746. (End)
%F Contribution from _Michael Somos_, May 25 2015: (Start)
%F a(n) = A258277(4*n) = A258278(8*n) = A258291(3*n).
%F a(n) = - A258210(12*n + 1) = A258228(12*n + 1) = A258256(12*n + 1).
%F 2*a(n) = A258279(12*n + 1) = - A258292(12*n + 1). (End)
%F G.f.: (Sum_{k=-inf..inf} x^(k*(3*k-1)/2))^2. - _Ilya Gutkovskiy_, Aug 14 2017
%e G.f. = 1 + 2*x + 3*x^2 + 2*x^3 + x^4 + 2*x^5 + 2*x^6 + 4*x^7 + 2*x^8 + 2*x^9 + ...
%e G.f. = q + 2*q^13 + 3*q^25 + 2*q^37 + q^49 + 2*q^61 + 2*q^73 + 4*q^85 + 2*q^97 + ...
%t ed[n_]:=Module[{divs=Divisors[12n+1]},Count[divs,_?(Mod[#,4] == 1&)]- Count[divs,_?(Mod[#,4]==3&)]]; Array[ed,110,0] (* _Harvey P. Dale_, Jul 01 2012 *)
%t a[ n_] := If[ n < 0, 0, With[ {m = 12 n + 1}, Sum[ KroneckerSymbol[ 4, d], {d, Divisors[m]}]]]; (* _Michael Somos_, Apr 23 2014 *)
%t a[ n_] := SeriesCoefficient[ (QPochhammer[ x^2] QPochhammer[ x^3]^2 / (QPochhammer[ x] QPochhammer[ x^6]))^2, {x, 0, n}]; (* _Michael Somos_, Apr 23 2014 *)
%t a[ n_] := SeriesCoefficient[ (EllipticTheta[ 4, 0, x^3] / QPochhammer[ x, x^2])^2, {x, 0, n}]; (* _Michael Somos_, May 25 2015 *)
%o (PARI) {a(n) = if( n<0, 0, n = 12*n + 1; sumdiv( n, d, (d%4==1) - (d%4==3)))}; /* _Michael Somos_, Sep 19 2005 */
%o (PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) * eta(x^3 + A)^2 / (eta(x + A) * eta(x^6 + A)))^2, n))}; /* _Michael Somos_, Jun 02 2012 */
%Y Cf. A002654, A008441, A008442, A035154, A035181, A035184, A112301, A113406.
%Y Cf. A113652, A116604, A121363, A121450, A122856, A122864, A122865, A125061.
%Y Cf. A125079, A129447, A129448, A132004, A134013, A134015, A138741, A138746.
%Y Cf. A138950, A138952, A163746, A258210, A258228, A258256, A258279, A258292.
%K nonn
%O 0,2
%A _N. J. A. Sloane_