

A326405


Minesweeper sequence of positive integers arranged on a 2D grid along ascending antidiagonals.


7



3, 1, 1, 3, 1, 2, 1, 4, 4, 0, 1, 4, 1, 2, 0, 3, 1, 3, 1, 1, 0, 2, 1, 3, 3, 1, 1, 0, 1, 3, 1, 2, 2, 1, 2, 0, 1, 3, 3, 2, 1, 2, 1, 2, 0, 2, 1, 2, 3, 2, 3, 2, 1, 1, 0, 1, 2, 2, 1, 3, 1, 2, 2, 1, 1, 0, 1, 1, 1, 3, 1, 3, 1, 1, 2, 1, 2, 0
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Map the positive integers on a 2D grid starting with 1 in top left corner and continue along increasing antidiagonals.
Replace each prime with 1 and each nonprime with the number of primes in adjacent grid cells around it.
If n is the original number, a(n) is the number that replaces it.
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).


LINKS

Michael De Vlieger, Minesweeperstyle graph read along original mapping, replacing 1 with a "mine", and 0 with blank space.
Michael De Vlieger, Square plot of a million terms read along original mapping, with black indicating a prime and levels of gray commensurate to a(n).


EXAMPLE

Consider positive integers distributed on the plane along antidiagonals:
1 2 4 7 11 16 ...
3 5 8 12 17 ...
6 9 13 18 ...
10 14 19 ...
15 20 ...
21 ...
...
1 is not prime and in its 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 with 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 * * 3 2 * * 2 1 * ...
* * 4 4 * * 3 3 * 2 1 2
2 4 * 3 3 * 3 2 2 1 1 1
. 2 * 3 2 2 3 * 3 1 1 *
. 1 1 2 * 2 3 * * 2 1 1
. 1 1 2 3 * 3 3 * 3 1 .
. 2 * 2 2 * 3 2 3 * 2 1
. 2 * 2 1 1 2 * 2 1 3 *
. 1 1 2 1 1 1 2 3 2 3 *
. 1 1 2 * 2 1 1 * * 2 2
. 2 * 3 2 * 1 1 2 2 1 1
. 2 * 3 2 2 1 1 1 1 . 1
... (End)


MATHEMATICA

Block[{n = 12, s}, s = ArrayPad[Array[1 + PolygonalNumber[#1 + #2  1]  #2 &, {# + 1, # + 1}], 1] &@ n; Table[If[PrimeQ@ m, 1, Count[#, _?PrimeQ] &@ Union@ Map[s[[#1, #2]] & @@ # &, Join @@ Array[FirstPosition[s, m] + {##}  2 &, {3, 3}]]], {m, PolygonalNumber@ n}]] (* Michael De Vlieger, Sep 30 2019 *)


PROG

(Java) See Links section.


CROSSREFS

Different arrangements of integers:


KEYWORD



AUTHOR



STATUS

approved



