A333084 a(n) equals the smallest Sophie Germain prime q such that pi_(p,2p+1)(q,10,(1,3)) - pi_(p,2p+1)(q,10,(3,1)) = n, where pi_(p,2p+1)(q,10,(b,c)) equals the number of Sophie Germain primes A005384(i) such A005384(i) <= q and (A005384(i),A005384(i+1)) == (b,c) (mod 10).
11, 41, 191, 281, 431, 2351, 2741, 31721, 32561, 34631, 35291, 36821, 37181, 60761, 62591, 62981, 63671, 64301, 65171, 196541, 238691, 239201, 241781, 244301, 246731, 255191, 310181, 311021, 358331, 358901, 360611, 361481, 363491, 374771, 376241, 427991
Offset: 1
Keywords
Examples
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.
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.
Crossrefs
Cf. A005384.
Programs
-
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 *)
-
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
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)).
Comments