# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a137771 Showing 1-1 of 1 %I A137771 #13 Sep 08 2022 08:45:33 %S A137771 241,433,1153,2593,3121,5521,6673,7393,8353,8641,10513,13681,19441, %T A137771 21121,22273,32401,34273,43441,48193,49201,54721,62401,68881,69313, %U A137771 71473,74161,77761,86161,87121,104113,105601,114913,116833,119953 %N A137771 Prime numbers p such that p +- ((p-1)/8) are primes. %H A137771 Vincenzo Librandi, Table of n, a(n) for n = 1..1000 %e A137771 241+-(240/8) = primes; %e A137771 433+-(432/8) = primes. %t A137771 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 A137771 Select[Prime[Range[15000]], PrimeQ[ # + (# - 1)/8] && PrimeQ[ # - (# - 1)/8] &] (* _Stefan Steinerberger_, May 02 2008 *) %t A137771 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 A137771 (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 A137771 nonn,easy %O A137771 1,1 %A A137771 _Vladimir Joseph Stephan Orlovsky_, Apr 27 2008 %E A137771 More terms from _Stefan Steinerberger_, May 02 2008 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE