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

A062046
Sum of even numbers between consecutive primes.
2
0, 4, 6, 18, 12, 30, 18, 42, 78, 30, 102, 78, 42, 90, 150, 168, 60, 192, 138, 72, 228, 162, 258, 372, 198, 102, 210, 108, 222, 840, 258, 402, 138, 720, 150, 462, 480, 330, 510, 528, 180, 930, 192, 390, 198, 1230, 1302, 450, 228, 462, 708, 240, 1230, 762, 780
OFFSET
1,2
COMMENTS
First differences of A024701. - Gionata Neri, May 25 2015
LINKS
FORMULA
a(n) = (prime(n+1)+prime(n))*(prime(n+1)-prime(n))/4 = (prime(n+1)^2-prime(n)^2)/4.
EXAMPLE
a(4) = 18 = 8+10 as the even numbers between 7 and 11 are 8 and 10. a(4) = (11+7)(11-7)/4 = 18.
MATHEMATICA
Total[Select[Range[#[[1]]+1, #[[2]]-1], EvenQ]]&/@ Partition[ Prime[ Range[ 60]], 2, 1] (* Harvey P. Dale, May 28 2013 *)
PROG
(PARI) { for (n=1, 1000, a=(prime(n + 1)^2 - prime(n)^2)/4; if (n==1, a=0); write("b062046.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 30 2009
CROSSREFS
a(n)= ( p(n) + e(n)) * e(n), e(n) := A001223(n) / 2, for n > 1
Sequence in context: A113610 A309334 A263319 * A102020 A125133 A109310
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 06 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jun 07 2001
Offset changed from 0 to 1 by Harry J. Smith, Jul 30 2009
STATUS
approved