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!)
A073703 Smallest prime p such that also p+prime(n)*2 is a prime. 17

%I #15 Mar 29 2015 11:46:01

%S 3,5,3,3,7,3,3,3,7,3,5,5,7,3,3,3,13,5,3,7,3,5,7,3,3,31,5,13,5,3,3,7,3,

%T 3,13,5,3,5,3,3,31,5,7,3,3,3,11,3,3,3,13,13,5,7,7,31,3,5,3,7,3,7,3,19,

%U 5,7,11,3,7,3,3,43,5,5,3,3,19,3,7,3,19,11,19,11,3,43,13,5,7,3,3,13,3

%N Smallest prime p such that also p+prime(n)*2 is a prime.

%C If Polignac's conjecture (1849) is correct, the sequence is defined for all n (as is A020483).

%C Also: least k-prime(n) such that k-prime(n) and k+prime(n) are both primes. - _Pierre CAMI_, Aug 27 2004

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

%e n=5: prime(5)=11; 2+11*2=24, 3+11*2=25 and 5+11*2=27 are not prime, but 7+11*2=29 is prime, therefore a(5)=7.

%t f[n_] := Block[{k = Prime[n], p = Prime[n]}, While[ !PrimeQ[k - p] || !PrimeQ[k + p], k++ ]; k - p]; Table[ f[n], {n, 95}] (* _Robert G. Wilson v_, Aug 28 2004 *)

%o (PARI) forprime(q=2,500,forprime(p=2,default(primelimit),if(isprime(2*q+p),print1(p", ");next(2)));error("Not enough precomputed primes")) \\ _Charles R Greathouse IV_, Aug 21 2011

%o (Haskell)

%o a073703 n = head [p | p <- a000040_list, a010051 (p + 2 * a000040 n) == 1]

%o -- _Reinhard Zumkeller_, Oct 29 2013

%Y Cf. A073704, A001747, A000040, A020483.

%Y Cf. A010051.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Aug 04 2002

%E Merged with Pierre CAMI's submission of Aug 2004 - _R. J. Mathar_, Jul 29 2008

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 July 2 23:09 EDT 2024. Contains 373960 sequences. (Running on oeis4.)