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
KEYWORD
nonn,easy
AUTHOR
STATUS
approved