%I #34 Dec 18 2023 12:11:30
%S 1,1,0,0,0,-1,0,0,-1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
%T -1,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,
%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0
%N Expansion of a Ramanujan false theta series variation of A089801 in powers of x.
%D Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, p. 41, 13th equation.
%H Alois P. Heinz, <a href="/A143064/b143064.txt">Table of n, a(n) for n = 0..1000</a>
%H G. E. Andrews, <a href="http://www.jstor.org/stable/2331943">An introduction to Ramanujan's "lost" notebook</a>, Amer. Math. Monthly 86 (1979), no. 2, 89-108. See page 89, Equation (1.2), page 100, Equation (5.3)
%H G. E. Andrews, <a href="https://georgeandrews1.github.io/pdf/320.pdf">The Bhargava-Adiga Summation and Partitions</a>, 2016. See page 3, Equation (1.5)
%F Expansion of Sum_{k>=0} x^k / (Product_{j=0..k} ( 1 + x^(2*k + 1) ) ) in powers of x^2. - _Michael Somos_, Nov 04 2013
%F a(n) = b(3*n + 1) where b() is multiplicative with b(p^(2*e)) = -(-1)^e if p = 2, b(p^(2*e)) = (-1)^e if p = 5 (mod 6), b(p^(2*e)) = 1 if p = 1 (mod 6), and b(p^(2*e-1)) = b(3^e) = 0 if e>0. - _Michael Somos_, Jul 19 2013
%F a(4*n + 2) = a(4*n + 3) = a(8*n + 4) = 0.
%F a(8*n) = A143062(n). Convolution of A010054 with A143065. - _Michael Somos_, Jul 19 2013
%F G.f.: Sum_{k>=0} (-1)^k * x^(3*k^2 + 2*k) * ( 1 + x^(2*k + 1) ).
%F G.f.: 1/(1 - x*(1-x)/(1 - x^2*(1-x^2)/(1 - x^3*(1-x^3)/(1 - x^4*(1-x^4)/(1 - ...))))), a continued fraction. - _Paul D. Hanna_, Jul 18 2013
%F abs(a(n)) = A089801(n). - _Michael Somos_, Jun 30 2015
%F G.f.: 1 + x*(1-x) + x^2*(1-x)*(1-x^3) + x^3*(1-x)*(1-x^3)*(1-x^5) + ... . - _Michael Somos_, Aug 03 2017
%e G.f. = 1 + x - x^5 - x^8 + x^16 + x^21 - x^33 - x^40 + x^56 + x^65 - x^85 - x^96 + ...
%e G.f. = q + q^4 - q^16 - q^25 + q^49 + q^64 - q^100 - q^121 + q^169 + q^196 + ...
%t a[ n_] := With[ {m = Sqrt[3 n + 1]}, If[ IntegerQ @ m, (-1)^Quotient[ m, 3], 0]]; (* _Michael Somos_, Jun 30 2015 *)
%t a[ n_] := SeriesCoefficient[ Sum[ (-1)^k x^(3 k^2 + 2 k) (1 + x^(2 k + 1)), {k, 0, n}], {x, 0, n}]; (* _Michael Somos_, Nov 04 2013 *)
%t a[ n_] := SeriesCoefficient[ Sum[ x^k QPochhammer[ x, x^2, k], {k, 0, n}], {x, 0, n}]; (* _Michael Somos_, Jun 30 2015 *)
%t a[ n_] := SeriesCoefficient[ Sum[ x^k / QPochhammer[ -x, x^2, k + 1], {k, 0, 2 n}], {x, 0, 2 n}]; (* _Michael Somos_, Jun 30 2015 *)
%o (PARI) {a(n) = my(m); if( issquare( 3*n + 1, &m), (-1)^(m \ 3) )};
%o (PARI) {a(n) = my(A, p, e); if( n<0, 0, n = 3*n + 1; A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( e%2, 0, p==2, -(-1)^(e/2), p == 3, 0, p%6 == 1, 1, (-1)^(e/2))))}; /* _Michael Somos_, Jul 19 2013 */
%o (PARI) /* Continued Fraction: */
%o {a(n)=local(CF); CF=1+x; for(k=0, n, CF=1/(1 - x^(n-k+1)*(1 - x^(n-k+1))*CF+x*O(x^n))); polcoeff(CF, n)} \\ _Paul D. Hanna_, Jul 18 2013
%Y Cf. A089801, A010054, A143062, A143065.
%Y Column m=0 of A185646.
%K sign
%O 0,1
%A _Michael Somos_, Jul 21 2008