OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Apr 27 2008
EXTENSIONS
More terms from Stefan Steinerberger, May 02 2008
STATUS
approved