cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A001132 Primes == +-1 (mod 8).

This page as a plain text file.
%I A001132 M4354 N1824 #80 May 22 2022 09:40:10
%S A001132 7,17,23,31,41,47,71,73,79,89,97,103,113,127,137,151,167,191,193,199,
%T A001132 223,233,239,241,257,263,271,281,311,313,337,353,359,367,383,401,409,
%U A001132 431,433,439,449,457,463,479,487,503,521,569,577,593,599
%N A001132 Primes == +-1 (mod 8).
%C A001132 Primes p such that 2 is a quadratic residue mod p.
%C A001132 Also primes p such that p divides 2^((p-1)/2) - 1. - _Cino Hilliard_, Sep 04 2004
%C A001132 A001132 is exactly formed by the prime numbers of A118905: in fact at first every prime p of A118905 is p = u^2 - v^2 + 2uv, with for example u odd and v even so that p - 1 = 4u'(u' + 1) + 4v'(2u' + 1 - v') when u = 2u' + 1 and v = 2v'. u'(u' + 1) is even and v'(2u' + 1 - v') is always even. At second hand if p = 8k +- 1, p has the shape x^2 - 2y^2; letting u = x - y and v = y, comes p = (x - y)^2 - y^2 + 2(x - y)y = u^2 - v^2 + 2uv so p is a sum of the two legs of a Pythagorean triangle. - _Richard Choulet_, Dec 16 2008
%C A001132 These are also the primes of form x^2 - 2y^2, excluding 2. See A038873. - _Tito Piezas III_, Dec 28 2008
%C A001132 Primes p such that p^2 mod 48 = 1. - _Gary Detlefs_, Dec 29 2011
%C A001132 Primes in A047522. - _Reinhard Zumkeller_, Jan 07 2012
%C A001132 This sequence gives the odd primes p which satisfy C(p, x = 0) = +1, where C(p, x) is the minimal polynomial of 2*cos(Pi/p) (see A187360). For the proof see a comment on C(n, 0) in A230075.  - _Wolfdieter Lang_, Oct 24 2013
%C A001132 Each a(n) corresponds to precisely one primitive Pythagorean triangle. For a proof see the W. Lang link, also for a table. See also the comment by _Richard Choulet_ above, where the case u even and v odd has not been considered. - _Wolfdieter Lang_, Feb 17 2015
%C A001132 Primes p such that p^2 mod 16 = 1. - _Vincenzo Librandi_, May 23 2016
%C A001132 Rational primes that decompose in the field Q(sqrt(2)). - _N. J. A. Sloane_, Dec 26 2017
%D A001132 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.
%D A001132 Ronald S. Irving, Integers, Polynomials, and Rings. New York: Springer-Verlag (2004): 274.
%D A001132 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A001132 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A001132 Ray Chandler, <a href="/A001132/b001132.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H A001132 Milton Abramowitz and Irene A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
%H A001132 C. Banderier, <a href="http://algo.inria.fr/banderier/Recipro/node17.html">Calcul de (2/p)</a>
%H A001132 Wolfdieter Lang, <a href="/A001132/a001132.pdf">A001132: Primes +1 (mod 8) or -1 (mod 8) and Sum of Legs of Primitive Pythagorean Triangles.</a>
%H A001132 <a href="/index/Pri#smp">Index entries for related sequences</a>
%H A001132 <a href="https://oeis.org/index/Pri#primes_decomp_of">Index to sequences related to decomposition of primes in quadratic fields</a>
%F A001132 a(n) ~ 2n log n. - _Charles R Greathouse IV_, May 18 2015
%p A001132 seq(`if`(member(ithprime(n) mod 8, {1,7}),ithprime(n),NULL),n=1..109); # _Nathaniel Johnston_, Jun 26 2011
%p A001132 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
%t A001132 Select[Prime[Range[250]], MemberQ[{1, 7}, Mod[#, 8]] &]  (* _Harvey P. Dale_, Apr 29 2011 *)
%t A001132 Select[Union[8Range[100] - 1, 8Range[100] + 1], PrimeQ] (* _Alonso del Arte_, May 22 2016 *)
%o A001132 (Haskell)
%o A001132 a001132 n = a001132_list !! (n-1)
%o A001132 a001132_list = [x | x <- a047522_list, a010051 x == 1]
%o A001132 -- _Reinhard Zumkeller_, Jan 07 2012
%o A001132 (PARI) select(p->p%8==1 ||p%8==7, primes(100)) \\ _Charles R Greathouse IV_, May 18 2015
%o A001132 (Magma) [p: p in PrimesUpTo (600) | p^2 mod 16 eq 1]; // _Vincenzo Librandi_, May 23 2016
%Y A001132 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.
%Y A001132 Agrees with A038873 except for initial term.
%Y A001132 Cf. A118905, A010051.
%Y A001132 Union of A007519 and A007522.
%K A001132 nonn,nice,easy
%O A001132 1,1
%A A001132 _N. J. A. Sloane_