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.

A033623 Grundy function for turn-at-most-4-coins game.

This page as a plain text file.
%I A033623 #14 Jul 07 2025 16:17:08
%S A033623 1,2,4,8,15,16,32,51,64,85,106,128,150,171,219,237,247,256,279,297,
%T A033623 455,512,537,557,594,643,803,863,998,1024,1051,1070,1112,1169,1333,
%U A033623 1345,1620,1866,2048,2076,2085,2185,2372
%N A033623 Grundy function for turn-at-most-4-coins game.
%D A033623 E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Table 3, page 433.
%F A033623 a(n)=smallest natural not the exclusive-or of at most three a(k) for k<n.
%t A033623 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 *)
%Y A033623 Cf. A000069, A054016, A054043, etc.
%K A033623 nonn,nice,easy
%O A033623 1,2
%A A033623 _David A. Madore_
%E A033623 More terms from _N. J. A. Sloane_ Apr 29 2000