OFFSET
0,3
COMMENTS
a(9) is roughly 10^250.72 and is too big for the data section.
Consider the polynomial recurrence: P_{n}(x) = P_{n-1}(x + n)*P_{n-1}(x - n), with P_{1}(x) = 1 + x and P_{0}(x) = 1, then |a(n)| = P_{n}(0).
Each nonzero term divides all nonzero terms with higher index. This can be understood by looking at the tree structure in A365968 as the factors of a(n) are obtained in row n (second half of row). Each factor is only dependent by inheritance from parent and grandparent in this tree. Each row contains either all even numbers from 0 to A000217(n) or all odd numbers from 0 to A000217(n). In the even case 0 will be a factor and thus a(n) = 0. In the odd case some factors are duplicates, but by inheritance we will keep the duplicates from parent rows included.
EXAMPLE
a(4) = (4+3+2+1)*(4+3+2-1)*(4+3-2+1)*(4+3-2-1)*(4-3+2+1)*(4-3+2-1)*(4-3-2+1)*(4-3-2-1) = 10*8*6*4*4*2*0*(-2) = 0.
MATHEMATICA
a[n_]:=Product[Sum[(n+1-m)(2*Part[IntegerDigits[2^(n-1)+k, 2], m]-1), {m, n}], {k, 0, 2^(n-1)-1}]; Array[a, 10, 0] (* Stefano Spezia, May 29 2024 *)
PROG
(PARI) a(n) = prod(k=0, 2^(n-1)-1, sum(m=1, n, (n+1-m)*(-1+2*(digits(2^(n-1)+k, 2)[m]))))
CROSSREFS
KEYWORD
sign
AUTHOR
Thomas Scheuerle, May 28 2024
STATUS
approved