OFFSET
1,1
COMMENTS
The asymptotic density of this sequence is 1/4 (by Dirichlet's theorem). - Amiram Eldar, Mar 01 2021
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 7 because prime(7) = 17 and 17 == 1 (mod 8).
MAPLE
Res:= NULL: count:= 0:
p:= 2:
for n from 2 while count < 100 do
p:= nextprime(p);
if p mod 8 = 1 then count:= count+1; Res:= Res, n fi
od:
Res; # Robert Israel, May 06 2019
MATHEMATICA
Select[Range[300], Mod[Prime[#], 8] == 1 &]
PROG
(Magma) [n: n in [1..500] | NthPrime(n) mod 8 eq 1];
(PARI) lista(nn) = for(n=1, nn, if(Mod(prime(n), 8)==1, print1(n, ", "))); \\ Altug Alkan, Mar 04 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Vincenzo Librandi, Mar 04 2016
STATUS
approved