OFFSET
3,1
COMMENTS
If p > 3 and k = 6n-2, then p(p+2) + k is composite. This follows from the fact that p and p+2 are both prime iff p = 3m+2 since p = 3m+1 => p+2 = 0 mod 3. Then p(p+2)+6n-2 = 9m^2+18m+8 + 6n-2 = 0 mod 3 composite. Therefore the above seq has no entry for k=10 = 6*2-2 because 8+10 = 0 mod 3. Similarly, if p>3, p=6m+5. As an aside, to test for twin primes > 3 we need only test numbers of the form 6m+5 = 5,11,17,23,29,..
EXAMPLE
3*5+2 = 17,3*5+4=19,5*7+6 = 41.
PROG
(PARI) pqpk(n, m, k) = { forstep(k=2, n, 2, forprime(x1=3, n, x2=x1+m; p=x1*x2+k; if(isprime(x2)&isprime(p), print1(p", "); break; ) ) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 31 2005
STATUS
approved