OFFSET
0,2
COMMENTS
Let A(x) = 1 - 2*x - 2*x^2 - 2*x^3 + 6*x^5 + 18*x^6 + ... denote the g.f. of the sequence. Let u denote the lower triangular matrix with 0's on the main diagonal and 1's in every position below the main diagonal. Then the array Sum_{n in Z} (-1)^n * u^(n^2) is equal to the Riordan array (A(x), x). - Peter Bala, Dec 31 2024
FORMULA
G.f.: theta_4(x/(1 - x)), where theta_4() is the Jacobi theta function.
For n >= 1, a(n) = 2 * Sum_{k=1..floor(sqrt(n))} (-1)^k * binomial(n-1, k^2-1). - Peter Bala, Dec 31 2024
From Ridouane Oudra, Nov 23 2025: (Start) For n >=1 we have :
a(n) = 2*Sum_{k=1..n} (-1)^k*binomial(n,k)*floor(sqrt(k)).
a(n) = 2*Sum_{k=1..n} (-1)^k*binomial(n+1,k+1)*A022554(k).
a(n) = (2/n)*Sum_{k=1..floor(sqrt(n))} (-1)^k*k^2*binomial(n,k^2).
a(n) = a(n-1) + 2*Sum_{k=1..floor(sqrt(n))} (-1)^k*binomial(n-2,k^2-2).
a(n) = - Sum_{k=0..n-1} A318570(n-k)*a(k), with a(0) = 1. (End)
EXAMPLE
From Peter Bala, Dec 31 2024: (Start)
With the array u as defined above, the lower triangular array Sum_{n = -2..2} (-1)^n * u^(n^2) = I - 2*u + 2*u^4 begins
1;
-2, 1;
-2, -2, 1;
-2, -2, -2, 1;
0, -2, -2, -2, 1;
6, 0, -2, -2, -2, 1;
18, 6, 0, -2, -2, -2, 1;
38, 18, 6, 0, -2, -2, -2, 1;
68, 38, 18, 6, 0, -2, -2, -2, 1; (End)
MAPLE
a:= n-> 2*add((-1)^k*binomial(n-1, k^2-1), k=1..floor(sqrt(n))):
print(1, seq(a(n), n=1..40)); # Peter Bala, Dec 31 2024
MATHEMATICA
m = 36; CoefficientList[Series[Product[((1 - x)^k - x^k)/((1 - x)^k + x^k), {k, 1, m}], {x, 0, m}], x] (* Amiram Eldar, May 14 2021 *)
PROG
(PARI) my(N=66, x='x+O('x^N)); Vec(prod(k=1, N, ((1-x)^k-x^k)/((1-x)^k+x^k)))
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Seiichi Manyama, Apr 12 2019
STATUS
approved
