This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A333084 #66 Jun 09 2021 02:29:48 %S A333084 11,41,191,281,431,2351,2741,31721,32561,34631,35291,36821,37181, %T A333084 60761,62591,62981,63671,64301,65171,196541,238691,239201,241781, %U A333084 244301,246731,255191,310181,311021,358331,358901,360611,361481,363491,374771,376241,427991 %N 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). %C A333084 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 %C A333084 Start -> (1)-----(3) %C A333084 \ / %C A333084 \ / %C A333084 \ / %C A333084 (9) . %C A333084 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. %C A333084 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. %C A333084 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?" %H A333084 A.H.M. Smeets, <a href="/A333084/b333084.txt">Table of n, a(n) for n = 1..20000</a> %H A333084 R. J. Lemke Oliver and K. Soundararajan, <a href="http://arxiv.org/abs/1603.03720">Unexpected biases in the distribution of consecutive primes</a>, arXiv:1603.03720 [math.NT], 2016. %H A333084 R. J. Lemke Oliver and K. Soundararajan, <a href="https://doi.org/10.1073/pnas.1605366113">Unexpected biases in the distribution of consecutive primes</a>, Proceedings of the National Academy of Sciences of the United States of America, Vol. 113, No. 31 (2016), E4446-E4454. %F A333084 n = pi_(p,2p+1)(a(n);10,(1,3)) - pi_(p,2p+1)(a(n);10,(3,1)). %F A333084 n-1 = pi_(p,2p+1)(a(n);10,(3,9)) - pi_(p,2p+1)(a(n);10,(9,3)). %F A333084 n-1 = pi_(p,2p+1)(a(n);10,(9,1)) - pi_(p,2p+1)(a(n);10,(1,9)). %e A333084 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. %t A333084 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 *) %o A333084 (Python) %o A333084 def IsPrime(n): %o A333084 if n < 2: %o A333084 return 0 %o A333084 elif n == 2 or n == 3: %o A333084 return 1 %o A333084 elif n%2 == 0 or n%3 == 0: %o A333084 return 0 %o A333084 else: %o A333084 d, dd = 5, 2 %o A333084 while d*d <= n and n%d != 0: %o A333084 d, dd = d+dd, 6-dd %o A333084 if d*d <= n: %o A333084 return 0 %o A333084 else: %o A333084 return 1 %o A333084 p = 11 %o A333084 ptry = p %o A333084 cycle = 0 %o A333084 cmax = 0 %o A333084 while cmax < 36: %o A333084 ptry = ptry+6 %o A333084 if IsPrime(ptry) and IsPrime(2*ptry+1): %o A333084 pnext = ptry %o A333084 if p%10 == 1 and pnext%10 == 3: %o A333084 cycle = cycle+1 %o A333084 if p%10 == 3 and pnext%10 == 1: %o A333084 cycle = cycle-1 %o A333084 if cycle > cmax: %o A333084 print(cycle, p) %o A333084 cmax = cycle %o A333084 p = pnext %Y A333084 Cf. A005384. %K A333084 nonn %O A333084 1,1 %A A333084 _A.H.M. Smeets_, Mar 07 2020