OFFSET
1,1
COMMENTS
The asymptotic density of this sequence is 1/2 (by Dirichlet's theorem). - Amiram Eldar, Mar 01 2021
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000
FORMULA
Numbers k such that prime(k) AND 2 = 0. - Gary Detlefs, Dec 26 2011
EXAMPLE
7 is in the sequence because the 7th prime, 17, is of the form 4k+1.
4 is not in the sequence because the 4th prime, 7, is not of the form 4k+1.
MAPLE
with(numtheory, ithprime); pos_of_primes_k_mod_n(300, 1, 4);
pos_of_primes_k_mod_n := proc(upto_i, k, n) local i, a; a := []; for i from 1 to upto_i do if(k = (ithprime(i) mod n)) then a := [op(a), i]; fi; od; RETURN(a); end;
with(Bits): for n from 1 to 135 do if (And(ithprime(n), 2)=0) then print(n) fi od; # Gary Detlefs, Dec 26 2011
MATHEMATICA
Select[Range[135], Mod[Prime[#], 4] == 1 &] (* Amiram Eldar, Mar 01 2021 *)
PROG
(PARI) k=0; forprime(p=2, 1e4, k++; if(p%4==1, print1(k", "))) \\ Charles R Greathouse IV, Dec 27 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Feb 11 2003
STATUS
approved