login
A137771
Prime numbers p such that p +- ((p-1)/8) are primes.
1
241, 433, 1153, 2593, 3121, 5521, 6673, 7393, 8353, 8641, 10513, 13681, 19441, 21121, 22273, 32401, 34273, 43441, 48193, 49201, 54721, 62401, 68881, 69313, 71473, 74161, 77761, 86161, 87121, 104113, 105601, 114913, 116833, 119953
OFFSET
1,1
LINKS
EXAMPLE
241+-(240/8) = primes;
433+-(432/8) = primes.
MATHEMATICA
w=8; s=""; For[i=1, i<10^3*2, p=Prime[i]; If[PrimeQ[p-((p-1)/w)]&&PrimeQ[p+((p-1)/w)], (*Print[p, ":", p-((p-1)/w), ", ", p+((p-1)/w)]; *)s=s<>ToString[p]<>", "]; i++ ]; Print[s]
Select[Prime[Range[15000]], PrimeQ[ # + (# - 1)/8] && PrimeQ[ # - (# - 1)/8] &] (* Stefan Steinerberger, May 02 2008 *)
Select[Prime[Range[15000]], AllTrue[#+{(#-1)/8, -(#-1)/8}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 04 2017 *)
PROG
(Magma) [p: p in PrimesInInterval(5, 120000)| IsPrime((9*p-1) div 8 ) and IsPrime((7*p+1) div 8)]; // Vincenzo Librandi, Jun 15 2013
CROSSREFS
Sequence in context: A140629 A325088 A321582 * A342681 A108831 A068706
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Stefan Steinerberger, May 02 2008
STATUS
approved