OFFSET
1,1
COMMENTS
Except for the Sophie Germain primes 2 and 5, all Sophie Germain primes have either 1, 3 or 9 as least significant digit. Excluding 2 and 5, we start at 11. The sequence of the least significant digits of these prime numbers, i.e., A005384, travels to the following graph
Start -> (1)-----(3)
\ /
\ /
\ /
(9) .
Pairs (A005384(i) mod 10, A005384(i+1) mod 10) denote the edges, and the trajectory prefers to travel in this graph in clockwise direction as is shown here. Term a(n), for n > 0, is the least Sophie Germain prime where the (n-1)-th net clockwise cycle has been completed and the Sophie Germain prime next to a(n) has 3 as least significant digit. The start is at vertex (1) in the graph, due to the fact that the first Sophie Germain prime after 2, 3 and 5 is 11, i.e., a(1) = 11.
pi_(p,2p+1)(x;10,(1,3)) is the number of outgoing arrows from vertex (1) in clockwise direction in the graph; pi_(p,2p+1)(x;10,(3,1)) is the number of outgoing arrows from vertex (1) in counterclockwise direction in the graph.
For other prime pairs, like prime twins with vertices (1), (7) and (9) for the lesser of a twin pair and clockwise defined by the order (1) -> (7) -> (9), it seems that their trajectories prefer clockwise cycles through similar graphs too, so an open question is, "is the clockwise preference always the case for prime constellation pairs?"
LINKS
A.H.M. Smeets, Table of n, a(n) for n = 1..20000
R. J. Lemke Oliver and K. Soundararajan, Unexpected biases in the distribution of consecutive primes, arXiv:1603.03720 [math.NT], 2016.
R. J. Lemke Oliver and K. Soundararajan, Unexpected biases in the distribution of consecutive primes, Proceedings of the National Academy of Sciences of the United States of America, Vol. 113, No. 31 (2016), E4446-E4454.
FORMULA
n = pi_(p,2p+1)(a(n);10,(1,3)) - pi_(p,2p+1)(a(n);10,(3,1)).
n-1 = pi_(p,2p+1)(a(n);10,(3,9)) - pi_(p,2p+1)(a(n);10,(9,3)).
n-1 = pi_(p,2p+1)(a(n);10,(9,1)) - pi_(p,2p+1)(a(n);10,(1,9)).
EXAMPLE
The sequence starts at 11 so a(1) = 11, because the next Sophie Germain prime after 11 is 23. For 41 the first clockwise cycle is completed, and the next Sophie Germain prime after 41 is 43, so a(2) = 41. For 131 the number of net clockwise cycles is returned to 0, so 131 is not in the sequence. For 191, the number of net clockwise cycles becomes 2, while the next Sophie Germain prime after 191 is 233, so a(3) = 191.
MATHEMATICA
togo = 35; mx = togo; T = 0 Range[++togo]; T[[1]] = 11; c = 0; q = 17; While[togo > 1, p=q; While[! PrimeQ[2 (q = NextPrime[q]) + 1]]; t = Mod[{p, q}, 10]; If[t == {3, 1}, c--]; If[t == {1, 3}, c++]; If[0 <= c <= mx && T[[c + 1]] == 0, togo--; T[[c + 1]] = p]]; T (* Giovanni Resta, May 07 2020 *)
PROG
(Python)
def IsPrime(n):
if n < 2:
return 0
elif n == 2 or n == 3:
return 1
elif n%2 == 0 or n%3 == 0:
return 0
else:
d, dd = 5, 2
while d*d <= n and n%d != 0:
d, dd = d+dd, 6-dd
if d*d <= n:
return 0
else:
return 1
p = 11
ptry = p
cycle = 0
cmax = 0
while cmax < 36:
ptry = ptry+6
if IsPrime(ptry) and IsPrime(2*ptry+1):
pnext = ptry
if p%10 == 1 and pnext%10 == 3:
cycle = cycle+1
if p%10 == 3 and pnext%10 == 1:
cycle = cycle-1
if cycle > cmax:
print(cycle, p)
cmax = cycle
p = pnext
CROSSREFS
KEYWORD
nonn
AUTHOR
A.H.M. Smeets, Mar 07 2020
STATUS
approved