login
A350738
Expansion of Sum_{k>=0} (-1)^k * x^(k^2) * Product_{j=1..k} (1+x^j).
3
1, -1, -1, 0, 1, 1, 1, 1, 0, -1, -1, -1, -2, -1, -1, -1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0, -1, -2, -2, -3, -3, -3, -3, -3, -3, -1, -1, 0, 1, 1, 3, 4, 4, 4, 5, 5, 5, 5, 3, 3, 3, 1, 0, -1, -3, -4, -4, -6, -7, -7, -8, -8, -8, -7, -7, -6, -5, -4, -2, -1, 1, 3, 5, 6, 8, 9, 10, 12, 13, 13, 12, 13, 12, 11, 11, 9, 7, 5, 3, 0
OFFSET
0,13
LINKS
PROG
(PARI) my(N=99, x='x+O('x^N)); Vec(sum(k=0, sqrtint(N), (-1)^k*x^k^2*prod(j=1, k, 1+x^j)))
(Python)
from math import prod, isqrt
from sympy import Poly
from sympy.abc import x
def A350738(n): return Poly(sum((-1 if k % 2 else 1)*x**(k**2)*prod(1+x**j for j in range(1, k+1)) for k in range(isqrt(n+1)+1))).all_coeffs()[-n-1] # Chai Wah Wu, Jan 14 2022
CROSSREFS
KEYWORD
sign,look
AUTHOR
Seiichi Manyama, Jan 12 2022
STATUS
approved