This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A127596 #33 May 05 2025 16:36:15 %S A127596 2,4,14,22,28,233,249,261,488,497,511,515,519,526,531,534,548,562,620, %T A127596 633,635,2985,3119,3123,3128,3157,4350,4358,4392,4438,4474,4484,4606, %U A127596 4610,4759,5191,12493,1761067,2785124,2785152,2785718,2785729,2867471 %N A127596 Numbers k such that 1 + Sum_{i=1..k-1} A001223(i)*(-1)^i = 0. %C A127596 Or, with prime(0) = 1, numbers k such that Sum_{i=0..k-1} (prime(i+1)-prime(i))*(-1)^i = Sum_{i=0..k-1} (A008578(i+1)-A008578(i))*(-1)^i = 0. %C A127596 There are 313 terms < 10^7, 846 terms < 10^8, 1161 terms < 10^9. %H A127596 Jinyuan Wang, <a href="/A127596/b127596.txt">Table of n, a(n) for n = 1..1161</a> (first 846 terms from Klaus Brockhaus) %H A127596 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AndricasConjecture.html">Andrica's Conjecture</a> %H A127596 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeDifferenceFunction.html">Prime Difference Function</a> %e A127596 1 - A001223(1) = 1 - 1 = 0, hence 2 is a term. %e A127596 1 - A001223(1) + A001223(2) - A001223(3) = 1 - 1 + 2 - 2 = 0, hence 4 is a term. %t A127596 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}] %o A127596 (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 */ %Y A127596 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). %Y A127596 Cf. A282178 (prime(a(n))), A330545, A330547. %K A127596 nonn %O A127596 1,1 %A A127596 _Manuel Valdivia_, Apr 03 2007 %E A127596 Edited by _Klaus Brockhaus_, Apr 29 2007