A039710 a(n) = n-th prime modulo 12.
2, 3, 5, 7, 11, 1, 5, 7, 11, 5, 7, 1, 5, 7, 11, 5, 11, 1, 7, 11, 1, 7, 11, 5, 1, 5, 7, 11, 1, 5, 7, 11, 5, 7, 5, 7, 1, 7, 11, 5, 11, 1, 11, 1, 5, 7, 7, 7, 11, 1, 5, 11, 1, 11, 5, 11, 5, 7, 1, 5, 7, 5, 7, 11, 1, 5, 7, 1, 11, 1, 5, 11, 7, 1, 7, 11, 5, 1, 5, 1, 11
Offset: 1
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[p mod(12): p in PrimesUpTo(500)]; // Vincenzo Librandi, May 06 2014
-
Maple
seq(ithprime(n) mod 12, n=1..100); # Nathaniel Johnston, Jun 29 2011
-
Mathematica
Table[Mod[Prime[n], 12], {n, 100}] (* Nathaniel Johnston, Jun 29 2011 *) Mod[Prime[Range[100]], 12] (* Vincenzo Librandi, May 06 2014 *)
-
PARI
primes(100)%11 \\ Charles R Greathouse IV, Dec 12 2024
-
Sage
[mod(p, 12) for p in primes(500)] # Bruno Berselli, May 05 2014
Formula
Sum_k={1..n} a(k) ~ 6*n. - Amiram Eldar, Dec 11 2024