%I #19 Sep 08 2022 08:45:29
%S 31,127,191,223,383,479,607,863,991,1087,1151,1279,1439,1471,1567,
%T 1663,1759,1823,1951,2111,2143,2207,2239,2399,2591,2687,2719,2879,
%U 3167,3359,3391,3583,3967,4127,4159,4447,4639,4703,4799,4831,5023,5087,5119,5279
%N Primes congruent to 31 mod 32.
%H Vincenzo Librandi, <a href="/A127578/b127578.txt">Table of n, a(n) for n = 1..1000</a>
%t lst={};Do[p=Prime[n];If[Mod[p,32]==31,AppendTo[lst,p]],{n,7!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Feb 26 2009 *)
%t Select[Prime[Range[6000]],Mod[#,32]==31&] (* _Vincenzo Librandi_, Aug 14 2012 *)
%t Select[Range[31,5300,32],PrimeQ] (* _Harvey P. Dale_, Oct 03 2012 *)
%o (Magma) [p: p in PrimesUpTo(6000) | p mod 32 eq 31 ]; // _Vincenzo Librandi_, Aug 14 2012
%o (PARI) is(n)=isprime(n) && n%32==31 \\ _Charles R Greathouse IV_, Jul 01 2016
%Y Cf. A000040, A127575, A127576, A127577, A127579, A127580, A127581.
%K nonn,easy
%O 1,1
%A _Artur Jasinski_, Jan 19 2007
%E Corrected by _N. J. A. Sloane_, Jul 11 2008
%E Edited by _N. J. A. Sloane_ at the suggestion of _R. J. Mathar_, Jul 20 2008
|