login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048833 Number of starting positions of Nim with 2n pieces such that 2nd player wins. Partitions of 2n such that xor-sum of partitions is 0. 8

%I #33 Mar 25 2024 18:00:49

%S 1,1,2,4,6,10,16,31,43,68,98,153,213,317,443,704,971,1415,1975,2818,

%T 3865,5401,7366,10142,13639,18438,24583,32861,43345,57268,75175,99119,

%U 129278,168796,219614,284887,368546,475919,614379,788845,1012117,1293980,1654090

%N Number of starting positions of Nim with 2n pieces such that 2nd player wins. Partitions of 2n such that xor-sum of partitions is 0.

%C Number of different prime signatures of the 2n-almost primes in A268390. - _Peter Munn_, Dec 02 2021

%H Alois P. Heinz, <a href="/A048833/b048833.txt">Table of n, a(n) for n = 0..750</a>

%H R. J. Nowakowski, G. Renault, E. Lamoureux, S. Mellon and T. Miller, <a href="https://hal.archives-ouvertes.fr/hal-00985731">The Game of timber!</a>, hal-00985731, 2013.

%F a(n) = A050314(2n, 0): column 0 of triangle.

%e For n=4 the 6 partitions of 8 are [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 2, 2], [2, 2, 2, 2], [1, 1, 1, 2, 3], [1, 1, 3, 3] and [4, 4].

%p read("transforms") : # defines XORnos

%p A048833 := proc(n)

%p local p, xrs,i,a ;

%p if n = 0 then

%p return 1 ;

%p end if;

%p a := 0 ;

%p for p in combinat[partition](2*n) do

%p xrs := op(1,p) ;

%p for i from 2 to nops(p) do

%p xrs := XORnos(xrs,op(i,p)) ;

%p end do:

%p if xrs = 0 then

%p a := a+1 ;

%p end if;

%p end do:

%p a ;

%p end proc: # _R. J. Mathar_, Apr 29 2022

%t b[n_, i_, k_] := b[n, i, k] = If[n == 0, x^k, If[i < 1, 0, Sum[b[n-i*j, i-1, If[EvenQ[j], k, BitXor[i, k]]], {j, 0, n/i}]]];

%t a[n_] := Coefficient[b[2n, 2n, 0], x, 0];

%t Table[a[n], {n, 0, 42}] (* _Jean-François Alcover_, Mar 25 2024, after _Alois P. Heinz_ in A050314 *)

%Y Cf. A050314.

%Y Cf. A003987, A268390.

%K nonn

%O 0,3

%A _Christian G. Bower_, Jun 15 1999

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 13:51 EDT 2024. Contains 371914 sequences. (Running on oeis4.)