OFFSET
1,1
COMMENTS
This sequence is a variation of the sequence in the reference. However, this sequence should have an infinite number of terms.
REFERENCES
R. Crandall and C. Pomerance, Prime Numbers A Computational Perspective, Springer Verlag 2002, p. 49, exercise 1.18.
EXAMPLE
19 is a prime and 19*3 = 57 which is two away from 59 which is prime.
31 is not in the table because 31*3 = 93 which is 2 away from 91 and 95, both not prime.
MATHEMATICA
Select[Prime[Range[200]], PrimeQ[3#+2]||PrimeQ[3#-2]&] (* Harvey P. Dale, Aug 10 2011 *)
PROG
(PARI) primepm2(n, k) { local(x, p1, p2, f1, f2, r); if(k%2, r=2, r=1); for(x=1, n, p1=prime(x); p2=prime(x+1); if(isprime(p1*k+r)||isprime(p1*k-r), print1(p1", ") ) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Aug 17 2006
STATUS
approved