OFFSET
1,3
COMMENTS
Conjecture: a(n) > 0 for all n > 1.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..5000
EXAMPLE
a(4) = 4 since prime(4) = 7 with pi(7+2*4) - pi(7+4) = pi(7+4) - pi(7) = 1 > 0, but pi(2+2*4) - pi(2+4) = 1 < pi(2+4) - pi(2) = 2, pi(3+2*4) - pi(3+4) = 1 < pi(3+4) - pi(3) = 2, and pi(5+2*4) - pi(5+4) = 2 > pi(5+4) - pi(5) = 1.
MATHEMATICA
p[k_, n_]:=Prime[k]+n>=Prime[k+1]&&k+PrimePi[Prime[k]+2n]==2*PrimePi[Prime[k]+n]
Do[Do[If[p[k, n], Print[n, " ", k]; Goto[aa]], {k, 1, n}];
Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 24 2014
STATUS
approved