login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039702 a(n) = n-th prime modulo 4. 24
2, 3, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 3, 1, 3, 3, 1, 3, 1, 3, 1, 1, 3, 3, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1, 3, 1, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 1, 3, 1, 3, 1, 3, 3, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Except for the first term, A100672(n) = (A039702(n)-1)/2 = parity of A005097. - Jeremy Gardiner, May 17 2008

LINKS

Nathaniel Johnston, Table of n, a(n) for n = 1..10000

MAPLE

seq(ithprime(n) mod 4, n=1..105); # Nathaniel Johnston, Jun 29 2011

MATHEMATICA

Table[Mod[Prime[n], 4], {n, 105}] (* Nathaniel Johnston, Jun 29 2011 *)

Mod[Prime[Range[100]], 4] (* Vincenzo Librandi, May 06 2014 *)

PROG

(Haskell)

a039702 = (`mod` 4) . a000040  -- Reinhard Zumkeller, Feb 20 2012

(PARI) a(n)=prime(n)%4 \\ Charles R Greathouse IV, Jun 13 2013

(MAGMA) [p mod 4: p in PrimesUpTo(500)]; // Vincenzo Librandi, May 06 2014

CROSSREFS

Cf. A000040, A039701, A039703-A039706, A100672, A005097, A038194, A007652, A039709-A039715.

Sequence in context: A257070 A289171 A231633 * A230294 A104483 A080717

Adjacent sequences:  A039699 A039700 A039701 * A039703 A039704 A039705

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 20 19:53 EST 2020. Contains 331096 sequences. (Running on oeis4.)