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.

A326406 Minesweeper sequence of positive integers arranged on a 2D grid along a triangular maze.

Original entry on oeis.org

3, -1, -1, 2, -1, 3, -1, 4, 4, 1, -1, 3, -1, 3, 2, 1, -1, 3, -1, 3, 2, 1, -1, 2, 3, 2, 3, 1, -1, 3, -1, 2, 2, 1, 2, 1, -1, 2, 3, 1, -1, 3, -1, 3, 2, 1, -1, 2, 3, 2, 3, 2, -1, 2, 1, 0, 1, 2, -1, 3, -1, 2, 2, 1, 2, 1, -1, 2, 2, 1, -1, 3, -1, 3, 4, 0, 1, 1
Offset: 1

Views

Author

Witold Tatkiewicz, Oct 02 2019

Keywords

Comments

Write positive integers on a 2D grid starting with 1 in the top left corner and continue along the triangular maze as in A056023.
Replace each prime with -1 and each nonprime with the number of primes in adjacent grid cells around it.
n is replaced by a(n).
This sequence treats prime numbers as "mines" and fills gaps according to the rules of the classic Minesweeper game.
a(n) < 5 (conjectured).
Set of n such that a(n) = 4 is unbounded (conjectured).

Examples

			Consider positive integers placed on the plane along a triangular maze:
   1  2  6  7 15 16 ...
   3  5  8 14 17 ...
   4  9 13 18 ...
  10 12 19 ...
  11 20 ...
  21 ...
  ...
1 is not prime and in adjacent grid cells there are 3 primes: 2, 3 and 5. Therefore a(1) = 3.
2 is prime, therefore a(2) = -1.
8 is not prime and in adjacent grid cells there are 4 primes: 2, 5, 7 and 13. Therefore a(8) = 4.
Replacing n by a(n) in the plane described above, and using "." for a(n) = 0 and "*" for negative a(n), we produce a graph resembling Minesweeper, where the mines are situated at prime n:
  3  *  3  *  2  1  1  *  2  1  1  * ...
  *  *  4  3  *  3  3  3  *  2  2  2
  2  4  *  3  2  *  *  2  1  2  *  1
  1  3  *  3  2  3  3  2  1  1  1  2
  *  3  2  2  *  2  2  *  2  1  .  1
  2  *  1  1  3  *  3  2  *  2  1  1
  1  2  3  2  3  *  3  2  3  *  1  .
  1  2  *  *  3  2  2  *  2  1  2  2
  *  2  2  4  *  2  1  2  3  2  2  *
  1  1  .  2  *  3  1  1  *  *  2  3
  .  1  2  3  3  *  2  2  3  2  1  1
  1  2  *  *  2  1  2  *  1  .  .  1
...
In order to produce sequence graph is read along original mapping.
		

Crossrefs

Cf. A056023 - plane mapping
Different arrangements of integers:
Cf. A326405 - antidiagonals,
Cf. A326407 - square mapping,
Cf. A326408 - square maze,
Cf. A326409 - Hamiltonian path,
Cf. A326410 - Ulam's spiral.

Programs