login
Primes congruent to {1, 2, 3, 7} (mod 8).
5

%I #16 Jun 26 2022 23:54:03

%S 2,3,7,11,17,19,23,31,41,43,47,59,67,71,73,79,83,89,97,103,107,113,

%T 127,131,137,139,151,163,167,179,191,193,199,211,223,227,233,239,241,

%U 251,257,263,271,281,283,307,311

%N Primes congruent to {1, 2, 3, 7} (mod 8).

%C Numbers x such that x^4 = 4 has a solution mod p.

%H Ray Chandler, <a href="/A045323/b045323.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Vincenzo Librandi)

%t Select[Prime[Range[300]],MemberQ[{1,2,3,7},Mod[#,8]]&] (* _Vincenzo Librandi_, Aug 07 2012 *)

%o (Magma) [ p: p in PrimesUpTo(400) | p mod 8 in {1, 2, 3, 7} ]; // _Vincenzo Librandi_, Aug 07 2012

%o (Haskell)

%o a045323 n = a045323_list !! (n-1)

%o a045323_list = filter ((== 1). a010051) a004776_list

%o -- _Reinhard Zumkeller_, Aug 17 2012

%Y Cf. A000040, A010051.

%Y Subsequence of A004776; see also A007521.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_