OFFSET
1,2
COMMENTS
All terms in this sequence are composites.
Conjecture: This sequence is infinite and, except 1 and 15, all terms appear in the region between 6*k^2-16*k+11 and 6*k^2-14*k+9 or between 6*k^2-10*k+5 and 6*k^2-8*k+3, where k (>= 1) is the layer number on the hexagonal board.
If the conjecture is true, twin prime conjecture follows.
EXAMPLE
1 is a term because five of its six neighbors (3, 5, 7, 9, 11, and 13) are primes;
45 is a term because five of its six neighbors (17, 19, 43, 47, 83, and 85) are primes.
A hexagonal spiral board of odd numbers <= 169 is illustrated in the figure below, where terms in the sequence are shown in square brackets and primes in parentheses.
.
(151)<(149)<-147<--145<--143<--141
/ \
/ \
153 (97)<--95<---93<---91<--(89) (139)
/ / \ \
/ / \ \
155 99 55<--(53)<--51<---49 87 (137)
/ / / \ \ \
/ / / \ \ \
(157) (101) 57 25<--(23)<--21 (47) 85 135
/ / / / \ \ \ \
/ / / / \ \ \ \
159 (103) (59) 27 (7)<--(5) (19) [45] (83) 133
/ / / / / \ \ \ \ \
/ / / / / \ \ \ \ \
161 105 (61) (29) 9 [1]-->(3) (17) (43) 81 (131)
\ \ \ \ \ / / / /
\ \ \ \ \ / / / /
(163) (107) [63] (31) (11)->(13)->[15] (41) (79) 129
\ \ \ \ / / /
\ \ \ \ / / /
[165] (109) 65 33--->35-->(37)-->39 77 (127)
\ \ \ / /
\ \ \ / /
(167) 111 (67)-->69-->(71)->(73)-->75 125
\ \ /
\ \ /
169 (113)->115-->117-->119-->121-->123
PROG
(Python)
from sympy import isprime; from math import sqrt, ceil
def neib(m):
if m == 1: L = [3, 5, 7, 9, 11, 13]
elif m == 3: L = [17, 19, 5, 1, 13, 15]
else:
L = [m for i in range(6)]; n = int(ceil((3+sqrt(6*m+3))/6))
a0=6*n*n-18*n+15; a1=6*n*n-16*n+11; a2=6*n*n-14*n+9; a3=6*n*n-12*n+7; a4=6*n*n-10*n+5; a5=6*n*n-8*n+3; a6=6*n*n-6*n+1
p = 0 if m==a0 else 1 if m>a0 and m<a1 else 2 if m==a1 else 3 if m>a1 and m<a2 else 4 if m==a2 else 5 if m>a2 and m<a3 else 6 if m==a3 else 7 if m>a3 and m<a4 else 8 if m==a4 else 9 if m>a4 and m<a5 else 10 if m==a5 else 11 if m>a5 and m<a6 else 12
L[0] += 12*n-10 if p<=4 else -2 if p<=6 else -12*n+16 if p<=9 else 2
L[1] += 2 if p<=1 else 12*n-8 if p<=6 else -2 if p<=8 else -12*n+14
L[2] += -12*n+24 if p<=1 else 2 if p<=3 else 12*n-6 if p<=8 else -2 if p<=10 else -12*n+12
L[3] += -2 if p==0 else -12*n+22 if p<=3 else 2 if p<=5 else 12*n-4 if p<=10 else -2
L[4] += 12*n-14 if p==0 else -2 if p<=2 else -12*n+20 if p<=5 else 2 if p<=7 else 12*n-2
L[5] += 12*n-12 if p<=2 else -2 if p<=4 else -12*n+18 if p<=7 else 2 if p<=9 else 12*n
return L
for i in range(1, 60000):
m = 2*i-1; L1 = [neib(m)[j] for j in range(6)]
if sum(isprime(k) for k in L1) == 5: print(m)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Jun 21 2021
STATUS
approved