A001132 Primes == +-1 (mod 8).
7, 17, 23, 31, 41, 47, 71, 73, 79, 89, 97, 103, 113, 127, 137, 151, 167, 191, 193, 199, 223, 233, 239, 241, 257, 263, 271, 281, 311, 313, 337, 353, 359, 367, 383, 401, 409, 431, 433, 439, 449, 457, 463, 479, 487, 503, 521, 569, 577, 593, 599
Offset: 1
References
- Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
- Ronald S. Irving, Integers, Polynomials, and Rings. New York: Springer-Verlag (2004): 274.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- C. Banderier, Calcul de (2/p)
- Wolfdieter Lang, A001132: Primes +1 (mod 8) or -1 (mod 8) and Sum of Legs of Primitive Pythagorean Triangles.
- Index entries for related sequences
- Index to sequences related to decomposition of primes in quadratic fields
Crossrefs
For primes p such that x^m = 2 (mod p) has a solution see A001132 (for m = 2), A040028 (m = 3), A040098 (m = 4), A040159 (m = 5), A040992 (m = 6), A042966 (m = 7), A045315 (m = 8), A049596 (m = 9), A049542 (m = 10) - A049595 (m = 63). Jeff Lagarias (lagarias(AT)umich.edu) points out that all these sequences are different, although this may not be apparent from looking just at the initial terms.
Agrees with A038873 except for initial term.
Programs
-
Haskell
a001132 n = a001132_list !! (n-1) a001132_list = [x | x <- a047522_list, a010051 x == 1] -- Reinhard Zumkeller, Jan 07 2012
-
Magma
[p: p in PrimesUpTo (600) | p^2 mod 16 eq 1]; // Vincenzo Librandi, May 23 2016
-
Maple
seq(`if`(member(ithprime(n) mod 8, {1,7}),ithprime(n),NULL),n=1..109); # Nathaniel Johnston, Jun 26 2011 for n from 1 to 600 do if (ithprime(n)^2 mod 48 = 1) then print(ithprime(n)) fi od. # Gary Detlefs, Dec 29 2011
-
Mathematica
Select[Prime[Range[250]], MemberQ[{1, 7}, Mod[#, 8]] &] (* Harvey P. Dale, Apr 29 2011 *) Select[Union[8Range[100] - 1, 8Range[100] + 1], PrimeQ] (* Alonso del Arte, May 22 2016 *)
-
PARI
select(p->p%8==1 ||p%8==7, primes(100)) \\ Charles R Greathouse IV, May 18 2015
Formula
a(n) ~ 2n log n. - Charles R Greathouse IV, May 18 2015
Comments