login
Numbers with five neighboring primes on the hexagonal spiral board of odd numbers.
1

%I #13 Jul 01 2021 23:44:24

%S 1,15,45,63,165,195,231,459,693,909,969,1299,1785,2709,3699,4131,4449,

%T 5145,7041,8541,10209,16065,20355,22569,27489,28299,38151,47745,49365,

%U 49959,58479,77619,81021,84651,87555,92625,101115,104181,107271,107349,108225

%N Numbers with five neighboring primes on the hexagonal spiral board of odd numbers.

%C All terms in this sequence are composites.

%C 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.

%C If the conjecture is true, twin prime conjecture follows.

%e 1 is a term because five of its six neighbors (3, 5, 7, 9, 11, and 13) are primes;

%e 45 is a term because five of its six neighbors (17, 19, 43, 47, 83, and 85) are primes.

%e 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.

%e .

%e (151)<(149)<-147<--145<--143<--141

%e / \

%e / \

%e 153 (97)<--95<---93<---91<--(89) (139)

%e / / \ \

%e / / \ \

%e 155 99 55<--(53)<--51<---49 87 (137)

%e / / / \ \ \

%e / / / \ \ \

%e (157) (101) 57 25<--(23)<--21 (47) 85 135

%e / / / / \ \ \ \

%e / / / / \ \ \ \

%e 159 (103) (59) 27 (7)<--(5) (19) [45] (83) 133

%e / / / / / \ \ \ \ \

%e / / / / / \ \ \ \ \

%e 161 105 (61) (29) 9 [1]-->(3) (17) (43) 81 (131)

%e \ \ \ \ \ / / / /

%e \ \ \ \ \ / / / /

%e (163) (107) [63] (31) (11)->(13)->[15] (41) (79) 129

%e \ \ \ \ / / /

%e \ \ \ \ / / /

%e [165] (109) 65 33--->35-->(37)-->39 77 (127)

%e \ \ \ / /

%e \ \ \ / /

%e (167) 111 (67)-->69-->(71)->(73)-->75 125

%e \ \ /

%e \ \ /

%e 169 (113)->115-->117-->119-->121-->123

%o (Python)

%o from sympy import isprime; from math import sqrt, ceil

%o def neib(m):

%o if m == 1: L = [3, 5, 7, 9, 11, 13]

%o elif m == 3: L = [17, 19, 5, 1, 13, 15]

%o else:

%o L = [m for i in range(6)]; n = int(ceil((3+sqrt(6*m+3))/6))

%o 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

%o 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

%o L[0] += 12*n-10 if p<=4 else -2 if p<=6 else -12*n+16 if p<=9 else 2

%o L[1] += 2 if p<=1 else 12*n-8 if p<=6 else -2 if p<=8 else -12*n+14

%o 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

%o 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

%o 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

%o 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

%o return L

%o for i in range(1, 60000):

%o m = 2*i-1; L1 = [neib(m)[j] for j in range(6)]

%o if sum(isprime(k) for k in L1) == 5: print(m)

%Y Cf. A341542.

%K nonn

%O 1,2

%A _Ya-Ping Lu_, Jun 21 2021