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.

Showing 1-2 of 2 results.

A237711 The number of P-positions in the game of Nim with up to four piles, allowing for piles of zero, such that the total number of objects in all piles is 2n.

Original entry on oeis.org

1, 6, 7, 36, 13, 42, 43, 216, 49, 78, 55, 252, 85, 258, 259, 1296, 265, 294, 127, 468, 133, 330, 307, 1512, 337, 510, 343, 1548, 517, 1554, 1555, 7776, 1561, 1590, 559, 1764, 421, 762, 595, 2808, 601, 798, 463, 1980, 637, 1842, 1819, 9072, 1849
Offset: 0

Views

Author

Tanya Khovanova and Joshua Xiong, May 02 2014

Keywords

Comments

First differences of A237686.

Examples

			The P-positions with the total of 4 are permutations of (0,0,2,2) and (1,1,1,1). Therefore, a(2)=7.
		

Crossrefs

Cf. A237686 (partial sums), A048883 (3 piles), A238759 (5 piles), A241522, A241718.

Programs

  • Mathematica
    Table[Length[
      Select[Flatten[
        Table[{n, k, j, BitXor[n, k, j]}, {n, 0, a}, {k, 0, a}, {j, 0,
          a}], 2], Total[#] == a &]], {a, 0, 100, 2}]

Formula

a(2n+1) = 6a(n), a(2n+2) = a(n+1) + a(n).
G.f.: Product_{k>=0} (1 + 6*x^(2^k) + x^(2^(k+1))). - Ilya Gutkovskiy, Mar 16 2021

A238147 The number of P-positions in the game of Nim with up to five piles, allowing for piles of zero, such that the total number of objects in all piles doesn't exceed 2n.

Original entry on oeis.org

1, 11, 26, 126, 191, 341, 516, 1516, 2081, 2731, 3206, 4706, 5631, 7381, 9256, 19256, 24821, 30471, 33946, 40446, 44171, 48921, 52796, 67796, 76221, 85471, 91846, 109346, 119971, 138721, 158096, 258096, 313661, 369311
Offset: 0

Views

Author

Tanya Khovanova and Joshua Xiong, May 02 2014

Keywords

Comments

Partial sums of A238759.

Examples

			There is 1 position (0,0,0,0,0) with a total of zero. There are 10 positions with a total of 2 that are permutations of (0,0,0,1,1). Therefore, a(1)=11.
		

Crossrefs

Cf. A238759 (first differences), A130665 (3 piles), A237686 (4 piles), A241523, A241731.

Programs

  • Mathematica
    Table[Length[
      Select[Flatten[
        Table[{n, k, j, i, BitXor[n, k, j, i]}, {n, 0, a}, {k, 0, a}, {j,
          0, a}, {i, 0, a}], 3], #[[5]] <= a &]], {a, 0, 35}]
    (* Second program: *)
    a[n_] := a[n] = Which[n <= 1, {1, 11}[[n+1]], OddQ[n], 11 a[(n-1)/2] + 5 a[(n-1)/2 - 1], EvenQ[n], a[(n-2)/2 + 1] + 15*a[(n-2)/2]];
    Array[a, 34, 0] (* Jean-François Alcover, Dec 14 2018 *)

Formula

a(2n+1) = 11a(n) + 5a(n-1), a(2n+2) = a(n+1) + 15a(n).
Showing 1-2 of 2 results.