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

A063933
Difference between n and the average of largest prime less than or equal to n and smallest prime greater than or equal to n.
3
0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, -2, -1, 0, 1, 2, 0, 0, 0, -2, -1, 0, 1, 2, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, -2, -1, 0, 1, 2, 0, -2, -1, 0, 1, 2, 0, 0, 0, -2, -1, 0, 1, 2, 0, -1, 0, 1, 0, 0, 0, -2, -1, 0, 1, 2, 0, -1, 0, 1, 0, -2, -1, 0, 1, 2, 0, -3, -2, -1, 0, 1, 2, 3, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0
OFFSET
2,23
LINKS
FORMULA
a(n) = n - (A007917(n) + A007918(n))/2 = n - A063932(n).
a(n) = 0 for numbers in A063934 (i.e., in A000040 or A024675).
EXAMPLE
a(10) = 10 - (11 - 7)/2 = 1; a(11) = 11 - (11 + 11)/2 = 0.
PROG
(PARI) { for (n=2, 1000, write("b063933.txt", n, " ", n - (precprime(n) + nextprime(n))/2) ) } \\ Harry J. Smith, Sep 03 2009
CROSSREFS
Sequence in context: A051126 A168120 A355682 * A085860 A178665 A170958
KEYWORD
sign
AUTHOR
Henry Bottomley, Aug 21 2001
STATUS
approved