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

A062047
Sum of odd numbers between consecutive primes.
1
0, 0, 0, 9, 0, 15, 0, 21, 52, 0, 68, 39, 0, 45, 100, 112, 0, 128, 69, 0, 152, 81, 172, 279, 99, 0, 105, 0, 111, 720, 129, 268, 0, 576, 0, 308, 320, 165, 340, 352, 0, 744, 0, 195, 0, 1025, 1085, 225, 0, 231, 472, 0, 984, 508, 520, 532, 0, 548, 279, 0, 1152, 1800, 309, 0
OFFSET
1,4
LINKS
FORMULA
a(n) = {prime(n+1) + prime(n)}*{prime(n+1) - prime(n)-2}/4.
a(n) = (prime(n)+e(n) )*( e(n)-1 ), where e(n) = A001223(n) / 2, for n > 1.
EXAMPLE
a(4) = 9 is the single odd number between 7 and 11.
MATHEMATICA
Plus@@Range[ #[[1]]+2, #[[2]]-2, 2]&/@Partition[Prime[Range[100]], 2, 1] (* Harvey P. Dale, Aug 13 2009 *)
PROG
(PARI) { for (n=1, 1000, q=prime(n + 1); p=prime(n); a=(q + p)*(q - p - 2)/4; if (n==1, a=0); write("b062047.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 30 2009
CROSSREFS
Sequence in context: A320379 A308102 A338016 * A117465 A136679 A299154
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 06 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org) and Jason Earls, Jun 07 2001
OFFSET changed from 0 to 1 by Harry J. Smith, Jul 30 2009
STATUS
approved