OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
37+-6 = primes,
181+-30 = primes,
397+-(396/6) = primes.
MATHEMATICA
w=6; 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[50000]], PrimeQ[# + (# - 1) / 6]&& PrimeQ[# - (# - 1) / 6] &] (* Vincenzo Librandi, Jun 15 2013 °)
Select[Prime[Range[5000]], AllTrue[#+{(#-1)/6, -(#-1)/6}, PrimeQ]&] (* Harvey P. Dale, Jan 09 2024 *)
PROG
(Magma) [p: p in PrimesInInterval(5, 50000)| IsPrime((7*p-1) div 6 ) and IsPrime((5*p+1) div 6)]; // Vincenzo Librandi, Jun 15 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Apr 27 2008
STATUS
approved