login
A063932
Average of largest prime less than or equal to n and smallest prime greater than or equal to n.
3
2, 3, 4, 5, 6, 7, 9, 9, 9, 11, 12, 13, 15, 15, 15, 17, 18, 19, 21, 21, 21, 23, 26, 26, 26, 26, 26, 29, 30, 31, 34, 34, 34, 34, 34, 37, 39, 39, 39, 41, 42, 43, 45, 45, 45, 47, 50, 50, 50, 50, 50, 53, 56, 56, 56, 56, 56, 59, 60, 61, 64, 64, 64, 64, 64, 67, 69, 69, 69, 71, 72, 73
OFFSET
2,1
LINKS
FORMULA
a(n) = (A007917(n) + A007918(n))/2 = n - A063933(n).
EXAMPLE
a(7) = (7 + 7)/2 = 7;
a(8) = (7 + 11)/2 = 9.
MATHEMATICA
Table[Mean[{NextPrime[n-1], NextPrime[n+1, -1]}], {n, 2, 80}] (* Harvey P. Dale, Nov 22 2011 *)
PROG
(PARI) { for (n=2, 1000, write("b063932.txt", n, " ", (precprime(n) + nextprime(n))/2) ) } \\ Harry J. Smith, Sep 02 2009
CROSSREFS
Interleaving of A000040 and A001223-1 copies of A024675. Cf. A063934.
Sequence in context: A187098 A187099 A284049 * A323785 A327626 A179464
KEYWORD
nonn
AUTHOR
Henry Bottomley, Aug 21 2001
STATUS
approved