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”).

Numbers k such that k, q+k, 2*q+k, 3*q+k, 4*q+k, and 5*q+k are all averages of twin primes, where q is the product of the first 8 primes.
1

%I #18 Apr 09 2023 09:33:06

%S 6341442,6837222,11285508,15315720,174710022,326603400,434021520,

%T 508246812,711829818,1177207878,1442665452,1802819172,1917309882,

%U 2010186978,2055080892,2502111192,2692872672,2926907538,3101732970,3111432660,3167425578,3487611162,3497310852,3592253772

%N Numbers k such that k, q+k, 2*q+k, 3*q+k, 4*q+k, and 5*q+k are all averages of twin primes, where q is the product of the first 8 primes.

%C q = 2*3*5*7*11*13*17*19 = 9699690.

%H David A. Corneth, <a href="/A141594/b141594.txt">Table of n, a(n) for n = 1..164</a> (Terms <= 10^11)

%e 6341442, q+6341442, 2*q+6341442, 3*q+6341442, 4*q+6341442, and 5*q+6341442 are all averages of twin primes, so 6341442 is a term.

%t q=9699690; lst={};

%t Do[If[PrimeQ[n-1]&&PrimeQ[n+1] && PrimeQ[n+q*1-1] && PrimeQ[n+q*1+1] && PrimeQ[n+q*2-1] && PrimeQ[n+q*2+1] && PrimeQ[n+q*3-1] && PrimeQ[n+q*3+1] && PrimeQ[n+q*4-1] && PrimeQ[n+q*4+1] && PrimeQ[n+q*5-1] && PrimeQ[n+q*5+1],Print[n]; AppendTo[lst,n]],{n,10^6,10^9}];

%t lst

%t mkQ[k_]:=Module[{q=Times@@Prime[Range[8]]},AllTrue[Flatten[Table[x q+k+{1,-1},{x,0,5}],1],PrimeQ]]; Select[Range[154*10^5],mkQ] (* The program generates the first 4 terms of the sequence. To generate more, increase the Range constant but the program may take a long time to run. *) (* _Harvey P. Dale_, Apr 09 2023 *)

%o (PARI) is(n) = { for(i = 0, 5, if(!isprime(n + i*9699690 - 1), return(0) ); if(!isprime(n + i*9699690 + 1), return(0) ); ); 1 } \\ _David A. Corneth_, Feb 24 2021

%K nonn,less

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Aug 20 2008

%E Edited by _Jon E. Schoenfield_, Feb 24 2021