The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A121066 Least positive k such that 10^n + {k, k+2, k+6, k+8} are all prime. 1

%I #18 Jun 18 2022 13:31:35

%S 4,1,1,481,3001,1111,2341,13951,5461,25261,57421,7531,123691,56581,

%T 945721,67441,1346491,325231,430711,2139271,2561161,81721,4319041,

%U 571381,4331251,1232251,7114471,3185011,407581,1500631,1846021,1346611

%N Least positive k such that 10^n + {k, k+2, k+6, k+8} are all prime.

%C For n >= 1, k == 1 (mod 30). - _Robert Israel_, May 06 2015

%H Tim Johannes Ohrtmann, <a href="/A121066/b121066.txt">Table of n, a(n) for n = 0..105</a>

%p A[0]:= 4:

%p for n from 1 to 30 do

%p for k from 1 by 30 do

%p if andmap(isprime, map(`+`,[0,2,6,8],10^n+k)) then

%p A[n]:= k; break

%p fi;

%p od od:

%p seq(A[n],n=0..30); # _Robert Israel_, May 06 2015

%t lpk[n_]:=Module[{k=1,x=10^n},While[AnyTrue[x+ k+{0,2,6,8}, CompositeQ], k++];k]; Table[lpk[n],{n,0,15}] (* The program generates the first 16 terms of the sequence. *) (* _Harvey P. Dale_, Jun 18 2022 *)

%o (PARI) print1(4,", "); n=0; until(n==100, n++; x=1; y=0; until(y==1, if(isprime(10^n+x), if(isprime(10^n+x+2), if(isprime(10^n+x+6), if(isprime(10^n+x+8), y++, x=x+30), x=x+30), x=x+30), x=x+30); if(y==1, print1(x,", ")))) \\ _Tim Johannes Ohrtmann_, May 04 2015

%o (PARI) a(n)=if(n==0, return(4)); my(k=10^n+1); while(!isprime(k) || !isprime(k+2) || !isprime(k+6) || !isprime(k+8), k+=30); k-10^n \\ _Charles R Greathouse IV_, May 06 2015

%Y Cf. A064281.

%K nonn

%O 0,1

%A _Jason Earls_, Aug 10 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 2 21:38 EDT 2024. Contains 373051 sequences. (Running on oeis4.)