login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A033623
Grundy function for turn-at-most-4-coins game.
5
1, 2, 4, 8, 15, 16, 32, 51, 64, 85, 106, 128, 150, 171, 219, 237, 247, 256, 279, 297, 455, 512, 537, 557, 594, 643, 803, 863, 998, 1024, 1051, 1070, 1112, 1169, 1333, 1345, 1620, 1866, 2048, 2076, 2085, 2185, 2372
OFFSET
1,2
REFERENCES
E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Table 3, page 433.
FORMULA
a(n)=smallest natural not the exclusive-or of at most three a(k) for k<n.
MATHEMATICA
Clear[a]; a[1] = 1; a[n_] := a[n] = (xor = BitXor @@@ Subsets[Array[a, n-1], 3] // Union ; r = Range[0, m = Last[xor]]; cp = Complement[r, xor]; If[cp == {}, m+1, First[cp]]); Table[a[n], {n, 1, 43}] (* Jean-François Alcover, Jan 09 2013 *)
CROSSREFS
Cf. A000069, A054016, A054043, etc.
Sequence in context: A328677 A039743 A070008 * A094398 A277728 A287163
KEYWORD
nonn,nice,easy
EXTENSIONS
More terms from N. J. A. Sloane Apr 29, 2000
STATUS
approved