Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A127596
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A127596 Numbers n such that 1 + Sum{k=1..n-1} A001223(k)*(-1)^k = 0. +0
4
2, 4, 14, 22, 28, 233, 249, 261, 488, 497, 511, 515, 519, 526, 531, 534, 548, 562, 620, 633, 635, 2985, 3119, 3123, 3128, 3157, 4350, 4358, 4392, 4438, 4474, 4484, 4606, 4610, 4759, 5191, 12493, 1761067, 2785124, 2785152, 2785718, 2785729, 2867471 (list; graph; listen)
OFFSET

1,1

COMMENT

Or, with prime(0) = 1, numbers n such that Sum{k=0..n-1} (prime(k+1)-prime(k))*(-1)^k = Sum{k=0..n-1} (A008578(k+1)-A008578(k))*(-1)^k = 0.

Sequence has 313 terms < 10^7, 846 terms < 10^8.

LINKS

K. Brockhaus, Table of n, a(n) for n=1..846

Eric Weisstein's World of Mathematics, Andrica's Conjecture

Eric Weisstein's World of Mathematics, Prime Difference Function

EXAMPLE

1 - A001223(1) = 1-1 = 0, hence 2 is a term.

1 - A001223(1) + A001223(2) - A001223(3) = 1-1+2-2 = 0, hence 4 is a term.

MAPLE

S=0; Do[j=Prime[n+1]; i=Prime[n]; d[n]=j-i; S=S+(d[n]*(-1)^n); If[S+1==0, Print[Table[j|PrimePi[j]|S+1]]], {n, 1, 10^7, 1}]

PROGRAM

(PARI) {m=10^8; n=1; p=1; e=1; s=0; while(n<m, q=nextprime(p+1); s=s+(q-p)*e; if(s==0, print1(n, ", ")); p=q; e=-e; n++)} /* Klaus Brockhaus, Apr 29 2007 */

CROSSREFS

Cf. A001223 (differences between consecutive primes), A008578 (prime numbers at the beginning of the 20th century), A000101 (increasing gaps between primes, upper end), A002386 (increasing gaps between primes, lower end).

Adjacent sequences: A127593 A127594 A127595 this_sequence A127597 A127598 A127599

Sequence in context: A032309 A008519 A071865 this_sequence A111871 A090808 A074716

KEYWORD

nonn

AUTHOR

Manuel Valdivia (mvaldivia(AT)ugr.es), Apr 03 2007

EXTENSIONS

Edited by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Apr 29 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 7 08:31 EDT 2008. Contains 144667 sequences.


AT&T Labs Research