login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039702 a(n) = n-th prime modulo 4. 25
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
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
Sequence in context: A257070 A289171 A231633 * A230294 A104483 A080717
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)