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!)
A078496 Smallest prime p such that p>n and 2*n-p is also prime. 12
5, 7, 7, 11, 11, 11, 13, 17, 13, 19, 17, 17, 19, 23, 19, 31, 23, 23, 31, 29, 29, 31, 29, 31, 37, 41, 31, 43, 41, 37, 37, 41, 41, 43, 47, 41, 43, 53, 43, 67, 47, 47, 61, 53, 53, 61, 53, 59, 61, 59, 61, 67, 59, 61, 73, 71, 61, 79, 71, 67, 67, 71, 71, 73, 83, 71, 73, 83, 73, 79 (list; graph; refs; listen; history; text; internal format)
OFFSET
4,1
COMMENTS
Suggested by Goldbach Conjecture.
Values of q from A143697. This follows from the factorization n^2-k^2 = (n-k)(n+k).
LINKS
FORMULA
n>3 integer; a(n)=min{p: p>n; p, 2*n-p are primes}.
EXAMPLE
a(11)=17.
MATHEMATICA
Table[p=n+1; q=2n-p; While[q>0&&!(PrimeQ[p]&&PrimeQ[q]), p++; q-- ]; p, {n, 4, 100}]
PROG
(PARI) a(n) = {my(p=nextprime(n+1)); while(!isprime(2*n-p), p = nextprime(p+1)); p; } \\ Michel Marcus, Oct 22 2016
CROSSREFS
a(n) = 2n - A078587(n).
Sequence in context: A201459 A053672 A087525 * A114521 A258653 A159482
KEYWORD
nonn
AUTHOR
Serhat Sevki Dincer (sevki(AT)ug.bilkent.edu.tr), Nov 26 2002
EXTENSIONS
Edited by N. J. A. Sloane, Jan 24 2009 at the suggestion of R. J. Mathar and T. D. Noe.
STATUS
approved

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 April 19 04:04 EDT 2024. Contains 371782 sequences. (Running on oeis4.)