login
(( Primes == -1 (mod 4) ) + 1)/4.
11

%I #28 Oct 26 2023 23:16:05

%S 1,2,3,5,6,8,11,12,15,17,18,20,21,26,27,32,33,35,38,41,42,45,48,50,53,

%T 56,57,60,63,66,68,71,77,78,83,87,90,92,95,96,105,108,110,111,116,117,

%U 120,122,123,125,126,131,137,141,143,147,150,152,155,158,161,162,165

%N (( Primes == -1 (mod 4) ) + 1)/4.

%C Numbers k such that 4*k - 1 is prime. - _Michel Marcus_, Dec 10 2015

%H Vincenzo Librandi, <a href="/A005099/b005099.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = (A002145(n) + 1)/4. - _R. J. Mathar_, Jun 07 2011

%t lst={};Do[p=4*n-1;If[PrimeQ[p], AppendTo[lst, n]], {n, 0, 10^3}];lst (* _Vladimir Joseph Stephan Orlovsky_, Sep 10 2008 *)

%t (Select[Prime@ Range@ 120, Mod[#, 4] == 3 &] + 1)/4 (* or *) Select[Range@165, PrimeQ[4 # - 1] &] (* _Michael De Vlieger_, Dec 10 2015 *)

%o (Magma) [ (p+1)/4: p in PrimesUpTo(700) | p mod 4 eq 3 ]; // _Klaus Brockhaus_, Dec 22 2008

%o (PARI) isok(n) = isprime(4*n-1); \\ _Michel Marcus_, Dec 10 2015

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_

%E More terms from _Klaus Brockhaus_, Dec 22 2008