login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A137724
Prime numbers p such that p +- ((p-1)/6) are primes.
1
37, 181, 397, 757, 829, 1657, 2089, 2161, 2341, 3061, 5077, 6337, 7057, 7309, 7561, 8389, 9109, 9829, 10369, 10729, 13789, 17137, 21061, 21817, 21961, 23869, 24517, 24877, 25237, 26209, 28297, 29269, 31177, 31249, 32077, 32257, 33049, 33301, 35281, 38377, 39709, 41221, 42337, 44641, 47161
OFFSET
1,1
LINKS
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
Sequence in context: A195546 A142410 A164940 * A172080 A142181 A107196
KEYWORD
nonn,easy
AUTHOR
STATUS
approved