login
A039706
a(n) = n-th prime modulo 8.
18
2, 3, 5, 7, 3, 5, 1, 3, 7, 5, 7, 5, 1, 3, 7, 5, 3, 5, 3, 7, 1, 7, 3, 1, 1, 5, 7, 3, 5, 1, 7, 3, 1, 3, 5, 7, 5, 3, 7, 5, 3, 5, 7, 1, 5, 7, 3, 7, 3, 5, 1, 7, 1, 3, 1, 7, 5, 7, 5, 1, 3, 5, 3, 7, 1, 5, 3, 1, 3, 5, 1, 7, 7, 5, 3, 7, 5, 5, 1, 1, 3, 5, 7, 1, 7, 3, 1, 1, 5, 7, 3, 7, 7, 3, 3, 7, 5, 1, 3, 5, 3, 5, 3, 1, 3
OFFSET
1,1
LINKS
MAPLE
seq(ithprime(n) mod 8, n=1..105); # Nathaniel Johnston, Jun 29 2011
MATHEMATICA
Table[Mod[Prime[n], 8], {n, 105}] (* Nathaniel Johnston, Jun 29 2011 *)
Mod[Prime[Range[100]], 8] (* Vincenzo Librandi, May 06 2014 *)
PROG
(Magma) [p mod(8): p in PrimesUpTo(500)]; // Vincenzo Librandi, May 06 2014
(PARI) primes(100)%8 \\ Charles R Greathouse IV, May 06 2014
KEYWORD
nonn,easy
STATUS
approved