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!)
A063934 Numbers which are either prime or the average of consecutive odd primes. 7
2, 3, 4, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19, 21, 23, 26, 29, 30, 31, 34, 37, 39, 41, 42, 43, 45, 47, 50, 53, 56, 59, 60, 61, 64, 67, 69, 71, 72, 73, 76, 79, 81, 83, 86, 89, 93, 97, 99, 101, 102, 103, 105, 107, 108, 109, 111, 113, 120, 127, 129, 131, 134, 137, 138 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Numbers n such that nextprime(n-1) + prevprime(n+1) = 2n. - Wesley Ivan Hurt, May 13 2017
LINKS
FORMULA
For n >= 1: a(2n)=A000040(n+1); a(2n+1)=(A000040(n+1)+A000040(n+2))/2 =A024675(n).
EXAMPLE
7 is prime, 9 is the average of 7 and 11, 11 is prime, 12 is the average of 11 and 13; so 7, 9, 11 and 13 are in the sequence.
MATHEMATICA
Function[p, Union@ Join[p, Rest@ Map[Mean, Partition[p, 2, 1]]]]@ Prime@ Range@ 34 (* Michael De Vlieger, May 13 2017 *)
PROG
(PARI) { for (n=1, 1000, if (n==1, a=2; p=3, if (n%2, a=(q + p=nextprime(q + 1))/2, a=q=p)); write("b063934.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 03 2009
CROSSREFS
Sequence in context: A140297 A234853 A060863 * A326643 A222030 A327261
KEYWORD
nonn
AUTHOR
Henry Bottomley, Aug 21 2001
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 July 13 02:50 EDT 2024. Contains 374265 sequences. (Running on oeis4.)