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.

A308897 Walk a rook along the square spiral numbered 1, 2, 3, ... (cf. A274640); a(n) = mex of earlier values the rook can move to.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 02 2019

Keywords

Comments

Mex here means "smallest positive missing number".
Add 1 to the terms of A308896.

Crossrefs

Extensions

More terms from Rémy Sigrist, Jul 02 2019

A337108 Square spiral constructed by greedy algorithm, so that each diagonal and antidiagonal contains distinct numbers.

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 2, 1, 2, 2, 0, 2, 3, 3, 2, 3, 3, 2, 0, 2, 4, 3, 1, 3, 4, 4, 3, 0, 4, 4, 5, 5, 5, 1, 4, 5, 5, 4, 5, 0, 3, 4, 6, 5, 5, 1, 6, 5, 6, 6, 5, 6, 0, 6, 3, 6, 7, 7, 4, 7, 1, 7, 6, 7, 7, 6, 3, 6, 0, 6, 7, 6, 8, 7, 8, 7, 1, 7, 4, 7, 8, 8, 7, 4, 2, 0, 2
Offset: 0

Views

Author

Rémy Sigrist, Aug 16 2020

Keywords

Comments

This sequence is a variant of A308896; here we walk a bishop, there a rook.
Visually, we have a superposition of two images that we can separate by considering the parity of the x and y coordinates (see illustrations in Links section).

Examples

			The spiral begins:
        7----7----6----7----1----7----4----7----7
        |                                       |
        6    5----5----4----1----5----5----5    6
        |    |                             |    |
        3    4    3----3----2----3----3    4    3
        |    |    |                   |    |    |
        6    5    2    1----1----1    2    4    6
        |    |    |    |         |    |    |    |
        0    0    0    0    0----0    0    0    0
        |    |    |    |              |    |    |
        6    3    2    2----1----2----2    3    6
        |    |    |                        |    |
        7    4    4----3----1----3----4----4    5
        |    |                                  |
        6    6----5----5----1----6----5----6----6
        |
        8----7----8----7----1----7----4----7----8
		

Crossrefs

See A274641 and A308896 for similar sequences.
Cf. A035608.

Programs

  • PARI
    \\ See Links section.

Formula

a(n) = 0 iff n belongs to A035608.
Showing 1-2 of 2 results.