login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Lucky primes k such that k+6 is also a lucky prime.
1

%I #12 Mar 03 2022 10:54:29

%S 7,31,37,67,73,613,991,1087,1117,2467,3301,3307,3607,4561,4987,4993,

%T 6367,6373,8263,8641,9643,10903,11827,11953,12373,12547,15187,15901,

%U 17047,18043,19603,20353,21751,23671,25147,28837,31033,31231,37957,38707,38917,43201,44383,46021,49627

%N Lucky primes k such that k+6 is also a lucky prime.

%C A031157(k) for k such that A309334(k)=6.

%C The minimum gap between lucky primes (after the first) is 6.

%H Robert Israel, <a href="/A309381/b309381.txt">Table of n, a(n) for n = 1..1615</a>

%e 37 and 37+6=43 are both lucky primes, so 37 is in the sequence.

%p N:= 10^5: # for terms <= N

%p L:= [seq(i,i=1..N+6,2)]:

%p for n from 2 while n < nops(L) do

%p r:= L[n];

%p L:= subsop(seq(r*i=NULL, i=1..nops(L)/r), L);

%p od:

%p L:= convert(select(isprime,L),set):

%p A:= L intersect map(`-`,L,6):

%p sort(convert(A,list));

%Y Cf. A031157, A309334.

%K nonn

%O 1,1

%A _Robert Israel_, Jul 26 2019