OFFSET
2,2
COMMENTS
5, 11, 17, 23, 29 is the smallest set of 5 primes in arithmetic progression, and may be written (1+i)*3#-1 for i=0 to 4.
Conjecture: for all n>1, there exists an integer k to get 5 primes in arithmetic progression starting with k*prime(n)# - 1.
LINKS
Pierre CAMI, PFGW Script
EXAMPLE
12*30-1=359 prime, (12+1)*30-1=389 prime, (12+2)*30-1=419 prime, (12+3)*30-1=449 prime, (12+4)*30-1=479 prime, as 30 = 2*3*5 = prime(3)#, so a(2)=12.
MATHEMATICA
Table[Function[p, k = 1; While[Times @@ Boole@ Map[PrimeQ[p (k + #) - 1] &, Range[0, 4]] == 0, k++]; k]@ Product[Prime@ j, {j, n}], {n, 2, 17}] (* or *)
Do[Function[p, k = 1; While[Times @@ Boole@ Map[PrimeQ[p (k + #) - 1] &, Range[0, 4]] == 0, k++]; Print@ k]@ Product[Prime@ j, {j, n}], {n, 2, 23}] (* Michael De Vlieger, Oct 27 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Oct 27 2016
STATUS
approved