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-5 of 5 results.

A236305 The number of P-positions in the game of Nim with up to 3 piles, allowing for piles of zero, such that the number of objects in each pile does not exceed n.

Original entry on oeis.org

1, 4, 7, 16, 19, 28, 43, 64, 67, 76, 91, 112, 139, 172, 211, 256, 259, 268, 283, 304, 331, 364, 403, 448, 499, 556, 619, 688, 763, 844, 931, 1024, 1027, 1036, 1051, 1072, 1099, 1132, 1171, 1216, 1267, 1324, 1387, 1456, 1531, 1612, 1699
Offset: 0

Views

Author

Tanya Khovanova and Joshua Xiong, Apr 21 2014

Keywords

Comments

P-positions in the game of Nim are tuples of numbers with a Nim-Sum equal to zero.
(0,1,1) is considered different from (1,0,1) and (1,1,0).
a(2^n-1) = 2^(2*n).
Partial sums of A241717.
This sequence seems to be A256534(n+1)/4. - Thomas Baruchel, May 15 2018

Examples

			If the largest number is 1, then there should be an even number of piles of size 1. Thus, a(1)=4.
		

Crossrefs

Cf. A241522 (4 piles), A241523 (5 piles).
Cf. A241717 (first differences).

Programs

  • Mathematica
    Table[Length[Select[Flatten[Table[{n, k, BitXor[n, k]}, {n, 0, a}, {k, 0, a}], 1], #[[3]] <= a &]], {a, 0, 100}]

Formula

If b = floor(log_2(n)) is the number of digits in the binary representation of n and c = n + 1 - 2^b, then a(n) = 2^(2*b) + 3*c^2.
a(n) = 4^floor(log(n)/log(2)) + 3*(n mod 2^floor(log(n)/log(2)))^2 (conjectured). - Thomas Baruchel, May 15 2018

A241522 The number of P-positions in the game of Nim with up to 4 piles, allowing for piles of zero, such that the number of objects in each pile does not exceed n.

Original entry on oeis.org

1, 8, 21, 64, 89, 168, 301, 512, 561, 712, 965, 1344, 1801, 2408, 3165, 4096, 4193, 4488, 4981, 5696, 6585, 7720, 9101, 10752, 12433, 14408, 16677, 19264, 22121, 25320, 28861, 32768, 32961, 33544, 34517, 35904, 37657, 39848, 42477, 45568, 48881, 52680, 56965, 61760, 67017
Offset: 0

Views

Author

Tanya Khovanova and Joshua Xiong, Apr 24 2014

Keywords

Comments

P-positions in the game of Nim are tuples of numbers with a Nim-Sum equal to zero. (0,1,1,0) is considered different from (1,0,1,0).
Partial sums of A241718.

Examples

			If the largest number is 1, then there should be an even number of piles of size 1. Thus, a(1)=8.
		

Crossrefs

Cf. A236305 (3 piles), A241523 (5 piles).
Cf. A241718 (first differences).

Programs

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

Formula

If b = floor(log_2(n)) is the number of digits in the binary representation of n and c = n + 1 - 2^b, then a(n) = 2^(3*b) + 6*c^2*2^b + a(c-1).
a(2^n-1) = 2^(3*n).

A241731 The number of P-positions in the game of Nim with up to 5 piles, allowing for piles of zero, such that the number of objects in the largest pile is n.

Original entry on oeis.org

1, 15, 45, 195, 165, 555, 1125, 1995, 645, 1995, 3525, 5355, 7605, 10395, 13845, 18075, 2565, 7755, 13125, 18795, 24885, 31515, 38805, 46875, 55845, 65835, 76965, 89355, 103125, 118395, 135285, 153915, 10245, 30795, 51525, 72555, 94005, 115995
Offset: 0

Views

Author

Tanya Khovanova and Joshua Xiong, Apr 27 2014

Keywords

Comments

This is the finite difference of A241523.

Examples

			If the largest pile is 1, then there are 10 positions that are permutations of (0,0,0,1,1) plus 5 positions that are permutations of (0,1,1,1,1). Therefore, a(1)=15.
		

Crossrefs

Cf. A241523, A241717 (3 piles), A241718 (4 piles).

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], Max[#] == a &]], {a, 0, 50}]

Formula

If b = floor(log_2(n)) is the number of digits in the binary representation of n and c = n + 1 - 2^b, then a(n)= 10*2^(2*b)*(2*c-1) + 20*c^3 - 30*c^2 + 20*c - 5.

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).

A238759 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 is 2n.

Original entry on oeis.org

1, 10, 15, 100, 65, 150, 175, 1000, 565, 650, 475, 1500, 925, 1750, 1875, 10000, 5565, 5650, 3475, 6500, 3725, 4750, 3875, 15000, 8425, 9250, 6375, 17500, 10625, 18750, 19375, 100000, 55565, 55650, 33475, 56500, 31725, 34750, 23875, 65000
Offset: 0

Views

Author

Tanya Khovanova and Joshua Xiong, May 02 2014

Keywords

Comments

First differences of A238147.

Examples

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

Crossrefs

Cf. A238147 (partial sums), A048883 (3 piles), A237711 (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], Total[#] == a &]], {a, 0, 90, 2}]
    (* Second program: *)
    (* b = A238147 *) b[n_] := b[n] = Which[n <= 1, {1, 11}[[n+1]], OddQ[n], 11 b[(n-1)/2] + 5 b[(n-1)/2 - 1], EvenQ[n], b[(n-2)/2 + 1] + 15 b[(n-2)/2]];
    Join[{1}, Differences[Array[b, 40, 0]]] (* Jean-François Alcover, Dec 14 2018 *)

Formula

a(2n+1) = 10*a(n), a(2n+2) = a(n+1) + 5*a(n).
Showing 1-5 of 5 results.