OFFSET
1,1
COMMENTS
Each term yields a pair of sexy primes, i.e., {3541, 3547}, {3733, 3739}, etc. - K. D. Bajpai, Oct 05 2020
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
8*107 = 856 and 856 +-3 are primes, so 107 is a term.
From K. D. Bajpai, Oct 05 2020: (Start)
443 is a term because 443, 8*443 + (443 mod 8) = 3547, and 8*443 - (443 mod 8) = 3541 are all primes.
467 is a term because 467, 8*467 + (467 mod 8) = 3739, and 8*467 - (467 mod 8) = 3733 are all primes.
(End)
MAPLE
q:=8: select(p->isprime(p) and isprime(q*p + modp(p, q)) and isprime(q*p - modp(p, q)), [$1..8!]); # K. D. Bajpai, Oct 05 2020
MATHEMATICA
q=8; lst={}; Do[p=Prime[n]; If[PrimeQ[q*p-Mod[p, q]]&&PrimeQ[q*p+Mod[p, q]], AppendTo[lst, p]], {n, 8!}]; lst
q=8; Select[Prime[Range[5000]], AllTrue[q*# + {Mod[#, q], - Mod[#, q]}, PrimeQ] &] (* K. D. Bajpai, Oct 05 2020 *)
PROG
(PARI) q=8; forprime(p=1, 5e4, if(isprime(q*p +(p%q)) && isprime(q*p - (p%q)) , print1(p, ", "))) \\ K. D. Bajpai, Oct 05 2020
(Magma) [p: p in PrimesUpTo(50000) | IsPrime(q*p - p mod q) and IsPrime(q*p + p mod q) where q is 8]; // K. D. Bajpai, Oct 05 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 27 2010
EXTENSIONS
a(39)-a(41) from K. D. Bajpai, Oct 05 2020
STATUS
approved