login
a(n) = prime(k) where k = n-th prime congruent to 3 mod 4.
2

%I #9 Sep 08 2022 08:45:08

%S 5,17,31,67,83,127,191,211,277,331,353,401,431,563,587,709,739,797,

%T 877,967,991,1063,1153,1217,1297,1409,1433,1499,1597,1669,1741,1847,

%U 2027,2063,2221,2341,2417,2477,2609,2647,2897,3001,3067,3109,3299,3319,3407

%N a(n) = prime(k) where k = n-th prime congruent to 3 mod 4.

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

%F a(n) = A000040(A002145(n)). [_Bruno Berselli_, Aug 14 2012]

%t With[{pc14=Select[Prime[Range[1000]],Mod[#,4]==3&]},Flatten[Table[Prime[Take[pc14,{n}]],{n,100}]]] (* _Vincenzo Librandi_, Aug 13 2012 *)

%o (PARI) tpip(n,m,r) = {sr=0; forprime(x=3,n, if(x%m == r,v=prime(x); sr+=1.0/v; print1(v" "); ) ); print(); print("m="m" r="r" sr="sr); }

%o (Magma) [NthPrime(n): n in PrimesUpTo(500) | n mod 4 eq 3]; // _Bruno Berselli_, Aug 14 2012

%Y Cf. A006450, A078653, A078655.

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Dec 14 2002

%E Offset changed from 0 to 1 by _Vincenzo Librandi_, Aug 14 2012