A238289 Least positive integer k such that prime(k*n), prime((k+1)*n) and prime((k+2)*n) form an arithmetic progression, or 0 if such a number k does not exist.
2, 2, 17, 4, 1, 1, 59, 3, 56, 1, 39, 10, 9, 130, 2, 18, 11, 7, 80, 67, 2, 19, 27, 17, 92, 73, 180, 65, 5, 110, 282, 4, 6, 8, 16, 2, 23, 198, 20, 3, 99, 83, 217, 13, 110, 28, 16, 6, 5, 3, 144, 31, 9, 187, 176, 145, 75, 11, 43, 424, 4, 54, 272, 8, 26, 131, 123, 107, 8, 4, 52, 9, 127, 84, 264, 33, 145, 663, 16, 285
Offset: 1
Keywords
Examples
a(2) = 2 since prime(2*2) = 7, prime(3*2) = 13 and prime(4*2) = 19 form a 3-term arithmetic progression, but prime(1*2) = 3, prime(2*2) = 7 and prime(3*2) = 13 do not form a 3-term arithmetic progression.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..8000
- B. Green and T. Tao, The primes contain arbitrarily long arithmetic progressions, Annals of Math. 167(2008), 481-547.
- Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
Programs
-
Mathematica
d[k_,n_]:=Prime[(k+1)*n]-Prime[k*n] Do[Do[If[d[k,n]==d[k+1,n],Print[n," ",k];Goto[aa]],{k,1,3*Prime[n]+8}]; Print[n," ",0];Label[aa];Continue,{n,1,80}]
-
PARI
okpr(p, q, r) = (q - p) == (r - q); a(n) = {k = 1; while(! okpr(prime(k*n), prime((k+1)*n), prime((k+2)*n)), k++); k;} \\ Michel Marcus, Aug 28 2014
Comments