login
a(n) = A026837(n) - A026838(n).
4

%I #52 Feb 18 2021 00:18:48

%S 0,1,-1,0,0,1,0,-1,0,0,0,0,1,0,0,-1,0,0,0,0,0,0,1,0,0,0,-1,0,0,0,0,0,

%T 0,0,0,1,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,-1,0,0,0,0,0,0,0,

%U 0,0,0,0,0,1,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,-1,0,0,0,0

%N a(n) = A026837(n) - A026838(n).

%H Robert Israel, <a href="/A203568/b203568.txt">Table of n, a(n) for n = 0..10000</a>

%H George E. Andrews, <a href="https://doi.org/10.2307/2690367">Euler's Pentagonal Number Theorem</a>, Mathematics Magazine, Vol. 56, No. 5 (Nov., 1983), pp. 279-284.

%F G.f.: Sum_{k in Z} sign(k) * x^(k * (3*k - 1) / 2).

%F G.f.: Sum_{k>0} x^(k * (3*k - 1) / 2) * (1 - x^k). - _Michael Somos_, Jul 12 2015

%F G.f.: x - x^2 * (1 + x) + x^3 * (1 + x) * (1 + x^2) - x^4 * (1 + x) * (1 + x^2) * (1 + x^3) + .... - _Michael Somos_, Jul 12 2015

%F G.f.: x / (1 + x) - x^3 / ((1 + x) * (1 + x^2)) + x^6 / ((1 + x) * (1 + x^2) * (1 + x^3)) - .... - _Michael Somos_, Jul 12 2015

%F G.f.: x / (1 + x^2) - x^2 / ((1 + x^2) * (1 + x^4)) + x^3 / ((1 + x^2 ) * (1 + x^4) * (1 + x^6)) - .... - _Michael Somos_, Jul 12 2015

%F a(n) = - A143062(n) unless n=0. - _Michael Somos_, Jul 12 2015

%F For k >= 1, a((3*k^2 - k)/2) = 1, a((3*k^2 + k)/2) = -1. a(n) = 0 otherwise. - _Robert Israel_, Nov 24 2015

%F From _Peter Bala_, Feb 11 2021: (Start)

%F G.f.: A(x) = Sum_{n >= 1} x^(n*(2*n-1))/Product_{k = 1..2*n} 1 + x^k = x - x^2 + x^5 - x^7 + x^12 - x^15 + - ..., follows by adding terms in pairs in the above g.f. Sum_{n >= 1} (-1)^(n+1)*x^(n*(n+1)/2)/Product_{k = 1..n} 1 + x^k of Somos, dated Jul 12 2015.

%F G.f.: A(x) = 1/2 + (1/2)*Sum_{n >= 1} (-1)^n*x^(n*(n-1)/2)/Product_{k = 1..n} 1 + x^k.

%F A(x) = Sum_{n >= 0} (-1)^n * x^(n+1)*Product_{k = 1..n} 1 + x^k. (Set x = -1 in Andrews, equation 8. For similar results see the Examples below.)

%F Conjectural g.f: A(x) = Sum_{n >= 1} (-1)^(n+1) * x^(2*n-1)/Product_{k = 1..n} 1 + x^(2*k-1) = x - x^2 + x^5 - x^7 + x^12 - x^15 + - ....

%F More generally, for positive integer N, we appear to have the identity

%F A(x) = Product_{j = 1..N-1} 1/(1 + x^(2*j)) * ( P(N,x) + Sum_{n >= 1} (-1)^(n+N) * x^(2*N*n-N)/Product_{k = 1..n} 1 + x^(2*k-1) ), where P(N,x) is a polynomial in x of degree N^2 - N - 1 for N > 1, with the first few values given empirically by P(1,x) = 0, P(2,x) = x, P(3,x) = x - x^2 + x^5 and P(4,x) = x - x^2 + x^3 + x^5 + x^7 - x^8 + x^11. Cf. A186424. (End)

%e G.f. = x - x^2 + x^5 - x^7 + x^12 - x^15 + x^22 - x^26 + x^35 - x^40 + x^51 - ...

%e G.f. = q^25 - q^49 + q^121 - q^169 + q^289 - q^361 + q^529 - q^625 + ..

%e From _Peter Bala_, Feb 13 2020: (Start)

%e G.f.s for the tails of A(x):

%e Sum_{n >= 1} (-1)^(n+1) * x^(2*n+3)*Product_{k = 2..n} 1 + x^k = x^5 - x^7 + x^12 - x^15 + x^22 - ....

%e Sum_{n >= 2} (-1)^n * x^(3*n+6)*Product_{k = 3..n} 1 + x^k = x^12 - x^15 + x^22 - x^26 + x^35 - ....

%e Sum_{n >= 3} (-1)^(n+1) * x^(4*n+10)*Product_{k = 4..n} 1 + x^k =

%e x^22 - x^26 + x^35 - x^40 + x^51 - .... (End)

%p N:= 1000: # to get a(0) to a(N)

%p V:= Array(0..N):

%p for k from 1 to floor((sqrt(1+24*N)-1)/6) do V[(3*k^2-k)/2]:= 1 od:

%p for k from 1 to floor((sqrt(1+24*N)+1)/6) do V[(3*k^2+k)/2]:= -1 od:

%p convert(V,list); # _Robert Israel_, Nov 24 2015

%t a[ n_] := Which[ n < 1, 0, SquaresR[ 1, 24 n + 1] == 2, -(-1)^Quotient[ Sqrt[24 n + 1], 3], True, 0]; (* _Michael Somos_, Jul 12 2015 *)

%o (PARI) {a(n) = if( n<1, 0, if( issquare( 24*n + 1, &n), - kronecker( -12, n)))};

%Y Cf. A003406, A010815, A026837, A026838, A143062.

%K sign

%O 0,1

%A _Michael Somos_, Jan 03 2012