cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A372967 Number of compositions of 2n into 2n nonnegative parts such that their xor-sum is zero.

This page as a plain text file.
%I A372967 #25 Apr 02 2025 04:12:36
%S A372967 1,1,7,226,2059,20926,315646,4397212,66201971,999067510,15168583482,
%T A372967 240202475668,3731763898510,57290627029676,887861389544668,
%U A372967 13713341876387776,210889953761225667,3248614469788303782,50091681144815341810,772966100038376636332
%N A372967 Number of compositions of 2n into 2n nonnegative parts such that their xor-sum is zero.
%C A372967 Number of starting configurations of Nim with 2n pieces such that 2nd player wins, and the configurations are of the form {x_1, x_2, ..., x_2n}, where x_i is the number of pieces on i-th stack (x_i>=0), and the sum of all pieces is 2n.
%H A372967 C. L. Bouton, <a href="https://www.jstor.org/stable/1967631">Nim, A Game with a Complete Mathematical Theory</a>, Annals of Mathematics, Second Series, vol. 3 (1/4), 1902, 35-39.
%F A372967 a(n) = A088218(2n) - A372871(2n).
%F A372967 a(n) mod 2 = 1 <=> n in { A131577 }.
%e A372967 For n=1 the a(1)=1 solution is {1,1}.
%e A372967 For n=2 the a(2)=7 solutions are {0,0,2,2}, {0,2,0,2}, {0,2,2,0}, {1,1,1,1}, {2,0,0,2}, {2,0,2,0}, {2,2,0,0}.
%p A372967 b:= proc(n, i, t) option remember; `if`(n=0, 1-signum(t),
%p A372967       add(b(n-j, i-1, Bits[Xor](j, t)), j=`if`(i=1, n, 0..n)))
%p A372967     end:
%p A372967 a:= n-> b(2*n$2, 0):
%p A372967 seq(a(n), n=0..23);  # _Alois P. Heinz_, May 22 2024
%t A372967 b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1-Sign[t],
%t A372967    Sum[b[n-j, i-1, BitXor[j, t]], {j, If[i == 1, {n}, Range[0, n]]}]];
%t A372967 a[n_] := b[2n, 2n, 0];
%t A372967 Table[a[n], {n, 0, 23}] (* _Jean-François Alcover_, May 30 2024, after _Alois P. Heinz_ *)
%Y A372967 Cf. A088218, A131577, A372871, A048833, A233810.
%K A372967 nonn
%O A372967 0,3
%A A372967 _Anna Ledworowska_, May 18 2024
%E A372967 More terms from _Alois P. Heinz_, May 22 2024