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

A098036
First occurrence of primes p such that p = (prime(k) + prime(k+n))/2 for some positive integer k and n=2, 3, ...
0
5, 7, 11, 59, 11, 13, 41, 17, 23, 43, 23, 29, 53, 31, 67, 53, 37, 59, 41, 43, 97, 53, 103, 53, 79, 59, 83, 149, 67, 167, 71, 127, 89, 113, 83, 89, 101, 149, 311, 97, 101, 109, 101, 107, 113, 127, 137, 131, 157, 137, 127, 149, 137, 163, 137, 281, 193, 149, 229, 191, 157
OFFSET
2,1
COMMENTS
No primes exist for n=1, as (prime(k) + prime(k+1))/2 is between prime(k) and prime(k+1) and so cannot be prime. See the Weisstein link.
LINKS
Eric Weisstein's World of Mathematics, Interprime Numbers
EXAMPLE
For n=2, (prime(2) + prime(2+2))/2 = (3+7)/2 = 5, so a(2)=5.
For n=4, (prime(2) + prime(2+4))/2 = (3+13)/2 = 8, which is not prime, but (prime(3) + prime(3+4))/2 = (5+17)/2 = 11, so a(4)=11.
PROG
(PARI) a(n) = {k=2; while(!isprime(p=(prime(k)+prime(k+n))/2), k++); p}
CROSSREFS
Sequence in context: A106819 A045968 A066367 * A127269 A071781 A091509
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Sep 10 2004
EXTENSIONS
Edited by Michael B. Porter, Oct 07 2009
STATUS
approved