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.

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

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

Views

Author

Tanya Khovanova and Joshua Xiong, Apr 27 2014

Keywords

Comments

This is the finite difference of A236305.
Starting from index 1 all elements are divisible by 3, and can be grouped into sets of size 2^k of an arithmetic progression 6n-3.
It appears that the sum of all terms of the first n rows of triangle gives A000302(n-1), see Example section. - Omar E. Pol, May 01 2015

Examples

			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)
		

Crossrefs

Cf. A011782, A068156, A236305 (partial sums), A241718 (4 piles), A241731 (5 piles).

Programs

  • Mathematica
    Table[Length[Select[Flatten[Table[{n, k, BitXor[n, k]}, {n, 0, a}, {k, 0, a}], 1], Max[#] == 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) = 6*c-3.

A237686 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 doesn't exceed 2n.

Original entry on oeis.org

1, 7, 14, 50, 63, 105, 148, 364, 413, 491, 546, 798, 883, 1141, 1400, 2696, 2961, 3255, 3382, 3850, 3983, 4313, 4620, 6132, 6469, 6979, 7322, 8870, 9387, 10941, 12496, 20272, 21833, 23423, 23982, 25746, 26167, 26929, 27524, 30332, 30933
Offset: 0

Views

Author

Tanya Khovanova and Joshua Xiong, May 02 2014

Keywords

Comments

Partial sums of A237711.

Examples

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

Crossrefs

Cf. A237711 (first differences), A130665 (3 piles), A238147 (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) = 7a(n) + a(n-1), a(2n+2) = a(n+1) + 7a(n).

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