%I #13 Sep 08 2022 08:45:33
%S 241,433,1153,2593,3121,5521,6673,7393,8353,8641,10513,13681,19441,
%T 21121,22273,32401,34273,43441,48193,49201,54721,62401,68881,69313,
%U 71473,74161,77761,86161,87121,104113,105601,114913,116833,119953
%N Prime numbers p such that p +- ((p-1)/8) are primes.
%H Vincenzo Librandi, <a href="/A137771/b137771.txt">Table of n, a(n) for n = 1..1000</a>
%e 241+-(240/8) = primes;
%e 433+-(432/8) = primes.
%t 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]
%t Select[Prime[Range[15000]], PrimeQ[ # + (# - 1)/8] && PrimeQ[ # - (# - 1)/8] &] (* _Stefan Steinerberger_, May 02 2008 *)
%t 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 *)
%o (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
%K nonn,easy
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Apr 27 2008
%E More terms from _Stefan Steinerberger_, May 02 2008