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.

A308882 Entries in row 0 of array of Sprague-Grundy values for single-quadrant Maharaja Nim as given in A308201.

Original entry on oeis.org

0, 2, 5, 1, 6, 4, 7, 3, 8, 9, 14, 12, 10, 17, 11, 19, 15, 21, 24, 26, 13, 27, 28, 30, 32, 33, 37, 31, 34, 35, 40, 39, 38, 16, 45, 42, 43, 51, 18, 47, 56, 49, 60, 52, 57, 20, 22, 23, 62, 64, 55, 59, 25, 70, 65, 67, 73, 77, 29, 76, 72, 79, 83, 68, 75, 81, 78, 88
Offset: 0

Views

Author

N. J. A. Sloane, Jun 30 2019

Keywords

Comments

If we add 1 to every term, we get A274632.

Crossrefs

Programs

  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Jun 30 2019

A274630 Square array T(n,k) (n>=1, k>=1) read by antidiagonals upwards in which the number entered in a square is the smallest positive number that is different from the numbers already filled in that are queens' or knights' moves away from that square.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 3, 7, 8, 2, 5, 1, 9, 4, 7, 6, 2, 10, 11, 1, 5, 7, 4, 12, 6, 3, 9, 8, 8, 9, 11, 13, 2, 10, 6, 4, 10, 12, 1, 3, 4, 7, 13, 11, 9, 9, 6, 2, 5, 8, 1, 12, 14, 3, 10, 11, 13, 3, 7, 6, 14, 9, 5, 1, 12, 15, 12, 8, 4, 14, 9, 11, 10, 3, 15, 2, 7, 13, 13, 10, 5, 1, 12, 15, 2, 16, 6, 4, 8, 14, 11
Offset: 1

Views

Author

N. J. A. Sloane following a suggestion from Joseph G. Rosenstein, Jul 07 2016

Keywords

Comments

If we only worry about queens' moves then we get the array in A269526.
Presumably, as in A269526, every column, every row, and every diagonal is a permutation of the natural numbers.
The knights only affect the squares in their immediate neighborhood, so this array will have very similar properties to A269526. The most noticeable difference is that the first column is no longer A000027, it is now A274631.
A piece that can move like a queen or a knight is known as a Maharaja. If we subtract 1 from the entries here we obtain A308201. - N. J. A. Sloane, Jun 30 2019

Examples

			The array begins:
1, 3, 6, 2, 7, 5, 8, 4, 9, 10, 15, 13, 11, 18, 12, 20, 16, 22, ...
2, 5, 8, 4, 1, 9, 6, 11, 3, 12, 7, 14, 17, 15, 10, 13, 19, 24, ...
4, 7, 9, 11, 3, 10, 13, 14, 1, 2, 8, 5, 6, 16, 22, 17, 21, 12, ...
3, 1, 10, 6, 2, 7, 12, 5, 15, 4, 16, 20, 13, 9, 11, 14, 25, 8, ...
5, 2, 12, 13, 4, 1, 9, 3, 6, 11, 10, 17, 19, 8, 7, 15, 23, 29, ...
6, 4, 11, 3, 8, 14, 10, 16, 13, 1, 2, 7, 15, 5, 24, 21, 9, 28, ...
7, 9, 1, 5, 6, 11, 2, 12, 8, 14, 3, 21, 23, 22, 4, 27, 18, 30, ...
8, 12, 2, 7, 9, 15, 1, 19, 4, 5, 6, 10, 18, 3, 26, 23, 11, 31, ...
10, 6, 3, 14, 12, 4, 5, 9, 11, 7, 1, 8, 16, 13, 2, 24, 28, 20, ...
9, 13, 4, 1, 10, 2, 7, 18, 12, 3, 17, 19, 24, 14, 20, 5, 8, 6, ...
11, 8, 5, 9, 13, 3, 15, 1, 2, 6, 20, 18, 10, 4, 17, 7, 12, 14, ...
12, 10, 7, 18, 11, 6, 4, 8, 14, 9, 5, 15, 21, 2, 16, 26, 3, 13, ...
13, 15, 17, 12, 14, 16, 18, 7, 10, 22, 11, 3, 8, 19, 23, 9, 2, 1, ...
14, 11, 19, 8, 5, 20, 3, 2, 16, 13, 12, 25, 4, 10, 6, 18, 7, 15, ...
16, 18, 21, 10, 15, 13, 11, 17, 5, 8, 9, 6, 7, 30, 25, 28, 20, 19, ...
15, 20, 13, 17, 16, 12, 19, 6, 7, 24, 18, 11, 28, 23, 14, 22, 5, 36, ...
17, 14, 22, 19, 18, 8, 20, 10, 23, 15, 4, 1, 3, 24, 13, 16, 33, 9, ...
18, 16, 23, 24, 25, 26, 14, 13, 17, 19, 22, 9, 5, 6, 8, 10, 15, 27, ...
...
Look at the entry in the second cell in row 3. It can't be a 1, because the 1 in cell(1,2) is a knight's move away, it can't be a 2, 3, 4, or 5, because it is adjacent to cells containing these numbers, and there is a 6 in cell (1,3) that is a knight's move away. The smallest free number is therefore 7.
		

Crossrefs

For first column, row, and main diagonal see A274631, A274632, A274633.
See A308883 for position of 1 in column n.
See A308201 for an essentially identical array.

Programs

  • Maple
    # Based on Alois P. Heinz's program for A269526
    A:= proc(n, k) option remember; local m, s;
             if n=1 and k=1 then 1
           else s:= {seq(A(i, k), i=1..n-1),
                     seq(A(n, j), j=1..k-1),
                     seq(A(n-t, k-t), t=1..min(n, k)-1),
                     seq(A(n+j, k-j), j=1..k-1)};
    # add knights moves
    if n >= 3            then s:={op(s),A(n-2,k+1)}; fi;
    if n >= 3 and k >= 2 then s:={op(s),A(n-2,k-1)}; fi;
    if n >= 2 and k >= 3 then s:={op(s),A(n-1,k-2)}; fi;
    if            k >= 3 then s:={op(s),A(n+1,k-2)}; fi;
                for m while m in s do od; m
             fi
         end:
    [seq(seq(A(1+d-k, k), k=1..d), d=1..15)];
  • Mathematica
    A[n_, k_] := A[n, k] = Module[{m, s}, If[n==1 && k==1, 1, s = Join[Table[ A[i, k], {i, 1, n-1}], Table[A[n, j], {j, 1, k-1}], Table[A[n-t, k-t], {t, 1, Min[n, k]-1}], Table[A[n+j, k-j], {j, 1, k-1}]] // Union; If[n >= 3, AppendTo[s, A[n-2, k+1]] // Union ]; If[n >= 3 && k >= 2, AppendTo[s, A[n-2, k-1]] // Union]; If[n >= 2 && k >= 3, AppendTo[s, A[n-1, k-2]] // Union]; If[k >= 3, AppendTo[s, A[n+1, k-2]] // Union]; For[m = 1, MemberQ[s, m], m++]; m]]; Table[A[1+d-k, k], {d, 1, 15}, {k, 1, d}] // Flatten (* Jean-François Alcover, Mar 14 2017, translated from Maple *)

A307282 Sprague-Grundy values for Maharaja Nim on the counterclockwise square spiral.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 4, 6, 5, 7, 9, 8, 10, 1, 9, 2, 10, 3, 9, 11, 10, 2, 0, 3, 11, 10, 4, 1, 0, 6, 12, 7, 5, 3, 0, 8, 7, 1, 4, 5, 0, 2, 1, 12, 13, 6, 7, 1, 14, 8, 12, 3, 2, 9, 8, 10, 3, 2, 13, 4, 6, 7, 11, 13, 6, 12, 15, 14, 16, 8, 10, 7, 14, 4, 5, 3, 15
Offset: 0

Views

Author

N. J. A. Sloane, Apr 05 2019

Keywords

Comments

A Maharaja is a piece which can move both like a queen and a knight.
A274641 is the analogous sequence if the piece is a chess queen.

Examples

			The counterclockwise square spiral begins:
.
  16--15--14--13--12
   |               |
  17   4---3---2  11   .
   |   |       |   |
  18   5   0---1  10   .
   |   |           |
  19   6---7---8---9   .
   |
  20--21--22--23--24--25
.
		

Crossrefs

For the P-positions see A307283.

Programs

  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Apr 06 2019

A307281 a(n) = second coordinate m of P-position (n,m) in Maharaja Nim.

Original entry on oeis.org

0, 3, 6, 1, 5, 4, 2, 10, 13, 16, 7, 19, 18, 8, 23, 26, 9, 29, 12, 11, 30, 34, 37, 14, 40, 39, 15, 44, 47, 17, 20, 49, 52, 55, 21, 58, 57, 22, 62, 25, 24, 66, 69, 72, 27, 71, 74, 28, 78, 31, 81, 84, 32, 87, 86, 33, 91, 36, 35, 95, 98, 101, 38, 100, 103, 106, 41
Offset: 0

Views

Author

N. J. A. Sloane, Apr 05 2019

Keywords

Comments

This is a self-inverse permutation of the nonnegative numbers.

Crossrefs

See A308201 for Sprague-Grundy values (the present sequence focuses on the 0 values in that table).
See A000201 and A001950 for Wythoff's Nim.

Programs

  • C
    See Links section.
  • Maple
    Larsson and Wastlund give Maple code.

Extensions

Data corrected by Rémy Sigrist, Apr 18 2019

A308883 a(n) = position of 1 in n-th column of array in A274630.

Original entry on oeis.org

1, 4, 7, 2, 6, 5, 3, 11, 14, 17, 8, 20, 19, 9, 24, 27, 10, 30, 13, 12, 31, 35, 38, 15, 41, 40, 16, 45, 48, 18, 21, 50, 53, 56, 22, 59, 58, 23, 63, 26, 25, 67, 70, 73, 28, 72, 75, 29, 79, 32, 82, 85, 33, 88, 87, 34, 92, 37, 36, 96, 99, 102, 39, 101, 104, 107, 42
Offset: 1

Views

Author

N. J. A. Sloane, Jun 30 2019

Keywords

Comments

Also, a(n) = 1 + position of 0 in column n-1 of A308201.
Equals A307281 + 1. This is a self-inverse permutation of the positive integers.

Crossrefs

Showing 1-5 of 5 results.