login
A178416
Primes p such that q*p +- (p mod q) are primes, for q=8.
1
107, 163, 443, 467, 1307, 3163, 3467, 3907, 4283, 5507, 5563, 5923, 6067, 6323, 6427, 8147, 8563, 11083, 11587, 12347, 12763, 14747, 16987, 18443, 18947, 19963, 23227, 24043, 24107, 25867, 26227, 26683, 26987, 27827, 28867, 30347, 31123, 31907, 32843, 33427, 33563
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
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
EXTENSIONS
a(39)-a(41) from K. D. Bajpai, Oct 05 2020
STATUS
approved