OFFSET
1,1
COMMENTS
LINKS
Eric Weisstein's World of Mathematics, Andrica's Conjecture
Eric Weisstein's World of Mathematics, Prime Difference Function
EXAMPLE
MATHEMATICA
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}]
PROG
(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
KEYWORD
nonn
AUTHOR
Manuel Valdivia, Apr 03 2007
EXTENSIONS
Edited by Klaus Brockhaus, Apr 29 2007
STATUS
approved