

A038873


Primes p such that 2 is a square mod p; or, primes congruent to {1, 2, 7} mod 8.


70



2, 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, 601, 607, 617
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Same as A001132 except for initial term.
Primes p such that x^2 = 2 has a solution mod p.
The prime values of the form x^2 + 2xy  y^2 coincide with this sequence. These are also primes of the form u^2  2v^2.  Tito Piezas III, Dec 28 2008
Therefore these are composite in Z[sqrt(2)], as they can be factored as (u^2  2v^2)(u^2 + 2v^2).  Alonso del Arte, Oct 03 2012
After a(1) = 2, these are the primes p such that p^4 == 1 (mod 96).  Gary Detlefs, Jan 22 2014
Also primes of the form 2v^2u^2. Example 23=2X4^23^2.  Jerzy R Borysowicz, Oct 27 2015


REFERENCES

W. J. LeVeque, Topics in Number Theory. AddisonWesley, Reading, MA, 2 vols., 1956, Vol. 1, Theorem 55, p. 68.


LINKS

Nathaniel Johnston, Table of n, a(n) for n = 1..10000
K. S. Brown, Pythagorean graphs
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Index entries for related sequences


FORMULA

a(n) ~ 2n log n.  Charles R Greathouse IV, Nov 29 2016


MAPLE

seq(`if`(member(ithprime(n) mod 8, {1, 2, 7}), ithprime(n), NULL), n=1..113); # Nathaniel Johnston, Jun 26 2011


MATHEMATICA

fQ[n_] := MemberQ[{1, 2, 7}, Mod[n, 8]]; Select[ Prime[Range[114]], fQ] (* Robert G. Wilson v, Oct 18 2011 *)


PROG

(MAGMA) [ p: p in PrimesUpTo(617)  IsSquare(R!2) where R:=ResidueClassRing(p) ]; // Klaus Brockhaus, Dec 02 2008
(PARI) is(n)=isprime(n) && issquare(Mod(2, n)) \\ Charles R Greathouse IV, Apr 23 2015
(PARI) is(n)=abs(centerlift(Mod(n, 8)))<3 && isprime(n) \\ Charles R Greathouse IV, Nov 14 2017


CROSSREFS

Cf. A057126, A087780, A226523, A003629 (complement).
Primes in A035251.
For primes p such that x^m == 2 mod p has a solution for m = 2,3,4,5,6,7,... see A038873, A040028, A040098, A040159, A040992, A042966, ...
Sequence in context: A074884 A227144 A105911 * A141131 A049594 A049590
Adjacent sequences: A038870 A038871 A038872 * A038874 A038875 A038876


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane.


STATUS

approved



