login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A042998 Primes congruent to {1, 2, 3, 5} mod 8. 7
2, 3, 5, 11, 13, 17, 19, 29, 37, 41, 43, 53, 59, 61, 67, 73, 83, 89, 97, 101, 107, 109, 113, 131, 137, 139, 149, 157, 163, 173, 179, 181, 193, 197, 211, 227, 229, 233, 241, 251, 257, 269, 277, 281, 283, 293, 307 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Primes of the form x^2 + y^2 + z^2.

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

Wikipedia, Legendre's three-square theorem

MATHEMATICA

Select[Prime[Range[300]], MemberQ[{1, 2, 3, 5}, Mod[#, 8]]&] (* Vincenzo Librandi, Aug 08 2012 *)

PROG

(MAGMA) [p: p in PrimesUpTo(500) | p mod 8 in [1, 2, 3, 5]]; // Vincenzo Librandi, Aug 08 2012

(PARI) is(n)=n%8<6 && isprime(n) \\ Charles R Greathouse IV, Sep 15 2015

CROSSREFS

Cf. A000040, A045403.

Sequence in context: A126148 A264866 A038933 * A091317 A088254 A089191

Adjacent sequences:  A042995 A042996 A042997 * A042999 A043000 A043001

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 08:27 EDT 2018. Contains 316405 sequences. (Running on oeis4.)