A241717
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 the largest pile is n.
Original entry on oeis.org
1, 3, 3, 9, 3, 9, 15, 21, 3, 9, 15, 21, 27, 33, 39, 45, 3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93, 3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123, 129, 135, 141, 147, 153, 159, 165, 171
Offset: 0
If the largest number is 1, then there should be exactly two piles of size 1 and one empty pile. There are 3 ways to permute this configuration, so a(1)=3.
From _Omar E. Pol_, Feb 26 2015: (Start)
Also written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
1;
3;
3, 9;
3, 9, 15, 21;
3, 9, 15, 21, 27, 33, 39, 45;
3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93;
...
Observation: the first six terms of the right border coincide with the first six terms of A068156.
(End)
From _Omar E. Pol_, Apr 20 2015: (Start)
An illustration of initial terms in the fourth quadrant of the square grid:
---------------------------------------------------------------------------
n a(n) Compact diagram
---------------------------------------------------------------------------
. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0 1 |_| |_ |_ _ _ |_ _ _ _ _ _ _ |
1 3 |_ _| | |_ _ | |_ _ _ _ _ _ | |
2 3 | |_ _| |_ | | |_ _ _ _ _ | | |
3 9 |_ _ _ _| | | | |_ _ _ _ | | | |
4 3 | | | |_ _| | | |_ _ _ | | | | |
5 9 | | |_ _ _ _| | |_ _ | | | | | |
6 15 | |_ _ _ _ _ _| |_ | | | | | | |
7 21 |_ _ _ _ _ _ _ _| | | | | | | | |
8 3 | | | | | | | |_ _| | | | | | | |
9 9 | | | | | | |_ _ _ _| | | | | | |
10 15 | | | | | |_ _ _ _ _ _| | | | | |
11 21 | | | | |_ _ _ _ _ _ _ _| | | | |
12 27 | | | |_ _ _ _ _ _ _ _ _ _| | | |
13 33 | | |_ _ _ _ _ _ _ _ _ _ _ _| | |
14 39 | |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |
15 45 |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
It appears that a(n) is also the number of cells in the n-th region of the diagram, and A236305(n) is also the total number of cells after n-th stage.
(End)
-
Table[Length[Select[Flatten[Table[{n, k, BitXor[n, k]}, {n, 0, a}, {k, 0, a}], 1], Max[#] == a &]], {a, 0, 100}]
A241523
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 each pile does not exceed n.
Original entry on oeis.org
1, 16, 61, 256, 421, 976, 2101, 4096, 4741, 6736, 10261, 15616, 23221, 33616, 47461, 65536, 68101, 75856, 88981, 107776, 132661, 164176, 202981, 249856, 305701, 371536, 448501, 537856, 640981, 759376, 894661, 1048576, 1058821, 1089616
Offset: 0
If the largest number is not more than 1, then there should be an even number of piles of size 1. We can choose the first four piles to be either 0 or 1, then the last pile is uniquely defined. Thus, a(1)=16.
-
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}]
A241718
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 the largest pile is n.
Original entry on oeis.org
1, 7, 13, 43, 25, 79, 133, 211, 49, 151, 253, 379, 457, 607, 757, 931, 97, 295, 493, 715, 889, 1135, 1381, 1651, 1681, 1975, 2269, 2587, 2857, 3199, 3541, 3907, 193, 583, 973, 1387, 1753, 2191, 2629, 3091, 3313, 3799, 4285, 4795, 5257, 5791, 6325
Offset: 0
If the largest pile is 2, then there are 6 positions that are permutations of (0,0,2,2) plus 6 positions that are permutations of (1,1,2,2) and one position (2,2,2,2). Therefore, a(2)=13.
-
Table[Length[Select[Flatten[Table[{n, k, j, BitXor[n, k, j]}, {n, 0, a}, {k, 0, a}, {j, 0, a}], 2], Max[#] == a &]], {a, 0, 50}]
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
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.
-
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 *)
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
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.
-
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 *)
Showing 1-5 of 5 results.
Comments