The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A128039 Numbers n such that 1 - Sum{k=1..n-1}A001223(k)*(-1)^k = 0. 2
3, 6, 10, 13, 18, 26, 29, 218, 220, 223, 491, 535, 538, 622, 628, 3121, 3126, 3148, 3150, 3155, 3159, 4348, 4436, 4440, 4444, 4458, 4476, 4485, 4506, 4556, 4608, 4611, 4761, 5066, 5783, 5788, 12528, 1061290, 2785126, 2785691, 2867466, 2867469, 2872437 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Sequence has 294 terms < 10^7. Being prime(n) = 3 + 2*(Sum{k=1..n-1}A000040(k)*(-1)^k)), for n odd and, prime(n) =(3 + 2*(Sum{k=1..n-1}A000040(k)*(-1)^k)))*(-1), for n even
LINKS
Eric Weisstein's World of Mathematics, Prime Difference Function
Eric Weisstein's World of Mathematics, Prime Sums
Eric Weisstein's World of Mathematics, Alternating Series
EXAMPLE
1 - ( -A001223(1) + A001223(2)) = 1-(-1+2) = 0, hence 3 is a term.
1 - ( -A001223(1) + A001223(2) - A001223(3) + A001223(4) - A001223(5)) = 1-(-1+2-2+4-2) = 0, hence 6 is a term.
MATHEMATICA
S=0; a=0; Do[S=S+((Prime[k+1]-Prime[k])*(-1)^k); If[1-S==0, a++; Print[a, " ", k+1]], {k, 1, 10^7, 1}]
CROSSREFS
Cf. A127596, A001223 (differences between consecutive primes), A000101 (increasing gaps between primes, upper end), A002386 (increasing gaps between primes, lower end), A066033.
Sequence in context: A267593 A248221 A189368 * A027428 A136850 A079248
KEYWORD
nonn
AUTHOR
Manuel Valdivia, May 07 2007
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 05:55 EDT 2024. Contains 372498 sequences. (Running on oeis4.)