editing
approved
editing
approved
Project Euler, <a href="https://projecteuler.net/problem=128">problem Problem 128 - Hexagonal Tile Differences</a>.
proposed
editing
editing
proposed
Project Euler , <a href="https://projecteuler.net/problem=128">problem 128 - Hexagonal Tile Differences</a>, on which this sequence is based.
approved
editing
Antoine Mathys, <a href="/A372223/b372223_1.txt">Table of n, a(n) for n = 1..10000</a>
proposed
approved
editing
proposed
26--25--24--23
/ \
/ \
27 12--11--10 22
/ / \ \
/ / \ \
28 13 4---3 9 21
/ / / \ \ \
/ / / \ \ \
29 14 5 1 2 8 20
\ \ \ / / \
\ \ \ / / /
30 15 6---7 19 37 \ \ / /
\ \ / /
31 16--17--18 36
\ /
\ /
32---33--34---35.
.
proposed
editing
editing
proposed
Numbers in a hexagonal tiling (seen as concentric rings) which have exactly three neighbors whose difference from it is prime.
A hexagonal tile with number 1 is surrounded by a ring of six hexagonal tiles, starting at "noon" on the right and numbering the tiles 2 to 7 in a counterclockwise direction. New rings are added in the same fashion, with the next rings being numbered 8 to 19, 20 to 37, and so on (see the illustration below). By finding the difference between tile n and each of its six neighbors we shall define PD(n) to be the number of those differences which are prime. For example, working counter-clockwise around tile 8 the differences are 12, 29, 13, 1, 6, 11, 6, 1, and 1329. So PD(8)=3. In the same way, the differences around tile 17 are 1, 17, 16, 1, 10, 11, 1, 16, and 10, 17, hence PD(17) = 2. It can be shown that the maximum value of PD(n) is 3. This sequence lists all tiles for which PD(n)=3 in ascending order.
. __
__/38\__
__/39\__/61\__
__/40\__/20\__/60\__
__/41\__/21\__/37\__/59\__
/42\__/22\__/ 8\__/36\__/58\
\__/23\__/ 9\__/19\__/35\__/
/43\__/10\__/ 2\__/18\__/57\
\__/24\__/ 3\__/ 7\__/34\__/
/44\__/11\__/ 1\__/17\__/56\
\__/25\__/ 4\__/ 6\__/33\__/
/45\__/12\__/ 5\__/16\__/55\
\__/26\__/13\__/15\__/32\__/
/46\__/27\__/14\__/31\__/54\
\__/47\__/28\__/30\__/53\__/
\__/48\__/29\__/52\__/
\__/49\__/51\__/
\__/50\__/
\__/
26--25--24--23
/ \
27 12--11--10 22
/ / \ \
28 13 4---3 9 21
/ / / \ \ \
29 14 5 1 2 8 20
\ \ \ / / \
30 15 6---7 19 37 \ \ / /
31 16--17--18 36
\ /
32---33--34---35.
Using tile numbering as in A056105 (and rotated 90 degrees counterclockwise):
__
/66\__
.\__/65\__
. __/41\__/64\__
. __/42\__/40\__/63\__
__/43\__/22\__/39\__/62\
__/44\__/23\__/21\__/38\__/
/45\__/24\__/ 9\__/20\__/61\
\__/25\__/10\__/ 8\__/37\__/
/46\__/11\__/ 2\__/19\__/60\
\__/26\__/ 3\__/ 7\__/36\__/
/47\__/12\__/ 1\__/18\__/59\
\__/27\__/ 4\__/ 6\__/35\__/
/48\__/13\__/ 5\__/17\__/58\
\__/28\__/14\__/16\__/34\__/
/49\__/29\__/15\__/33\__/57\
\__/50\__/30\__/32\__/56\__/
\__/51\__/31\__/55\__/
\__/52\__/54\__/
\__/53\__/
\__/
(C++)
(C++)#include <iostream>