login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077133 Difference between the sum of odd-indexed primes and even-indexed primes. 3
1, 3, 5, 7, 13, 19, 21, 27, 29, 33, 39, 45, 49, 53, 57, 61, 63, 65, 71, 77, 79, 81, 83, 95, 97, 103, 113, 119, 121, 125, 135, 139, 143, 149, 151, 157, 163, 167, 175, 183, 185, 187, 191, 199, 201, 213, 217, 221, 233, 251, 261, 267, 273, 279, 281, 287, 289, 299 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Some odd numbers such as 11, 17, 23 and 25 never appear.

LINKS

Table of n, a(n) for n=1..58.

FORMULA

a(n) = Sum_{i=0..n-1} (prime(2i+2) - prime(2i+1)).

a(n) = A008347(2n). - Ridouane Oudra, Aug 31 2019

a(n) = A077126(n) - A077131(n). - Michel Marcus, Oct 05 2019

EXAMPLE

a(2)=3 as a_o(2)=10 and a_e(2)=7.

MAPLE

with(numtheory): A008347 := proc(n) option remember; if n = 0 then 0 else abs(A008347(n-1)-ithprime(n)); fi; end proc:

seq(A008347(2n), n=1..80); # Ridouane Oudra, Aug 31 2019

MATHEMATICA

Table[ Sum[ Prime[2i], {i, 1, n}] - Sum[ Prime[2i - 1], {i, 1, n}], {n, 1, 60}]

PROG

(PARI) pc=1; p1s=0; p2s=0; forprime (p=2, 500, pc=3-pc; if (pc==1, p1s=p1s+p, p2s=p2s+p); if (pc==1, print1(p1s-p2s", ")))

CROSSREFS

Cf. A008347, A077126, A077131.

Sequence in context: A291867 A219674 A075571 * A164642 A247633 A277717

Adjacent sequences:  A077130 A077131 A077132 * A077134 A077135 A077136

KEYWORD

nonn

AUTHOR

Jon Perry, Nov 29 2002

EXTENSIONS

Edited and extended by Robert G. Wilson v, Nov 30 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 28 19:06 EDT 2020. Contains 338064 sequences. (Running on oeis4.)