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!)
A283145 a(1)=5; for n > 1, and a(n) is the least prime p > a(n-1) such that both q = p + 2n and r = q + 2n + 2 are prime. 3

%I #20 Mar 01 2017 23:47:11

%S 5,7,17,23,31,41,53,67,71,89,127,149,173,199,251,281,283,347,383,409,

%T 461,479,523,593,641,691,719,773,823,887,971,1033,1097,1163,1231,1301,

%U 1373,1447,1619,1709,1741,1823,1907

%N a(1)=5; for n > 1, and a(n) is the least prime p > a(n-1) such that both q = p + 2n and r = q + 2n + 2 are prime.

%C Note that p,q,r are not required to be consecutive primes.

%H Charles R Greathouse IV, <a href="/A283145/b283145.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1)=5 because both 5 + 2 = 7 and 7 + 4 = 11 are prime;

%e n=2: d=4, p=7 because both p + d = 11 and 11 + 6 = 17 are prime;

%e n=3: d=6: primes 11,13 are not qualified while 17 + 6 = 23 and 23 + 8 = 31 are prime hence a(3)=17.

%t m=0;p=3;s={};Do[p = NextPrime[p]; m=m+2;While[!PrimeQ[p+m]||!PrimeQ[p+2*m+2], p=NextPrime[p]]; AppendTo[s,p],{50}];s

%o (PARI) first(n)=my(v=vector(n),k=4); v[1]=5; forprime(p=5,, if(isprime(p+k) && isprime(p+2*k+2), v[k/2]=p; if(k==2*n, return(v)); k+=2)) \\ _Charles R Greathouse IV_, Mar 01 2017

%Y Cf. A283159.

%K nonn

%O 1,1

%A _Zak Seidov_, Mar 01 2017

%E a(16)-a(17) corrected by _Charles R Greathouse IV_, Mar 01 2017

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 23 20:17 EDT 2024. Contains 373653 sequences. (Running on oeis4.)