login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A004649
a(n) = prime(n) mod (n-1).
8
0, 1, 1, 3, 3, 5, 5, 7, 2, 1, 4, 5, 4, 5, 8, 11, 10, 13, 14, 13, 16, 17, 20, 1, 1, 25, 26, 25, 26, 7, 7, 9, 7, 13, 11, 13, 15, 15, 17, 19, 17, 23, 21, 21, 19, 27, 35, 35, 33, 33, 35, 33, 39, 41, 43, 45, 43, 45, 45, 43, 49, 59, 59, 57, 57, 1, 2, 7, 4, 3, 4, 7, 8
OFFSET
2,4
LINKS
MATHEMATICA
Table[Mod[Prime[n], n - 1], {n, 2, 100}] (* Vincenzo Librandi, Sep 11 2014 *)
PROG
(PARI) a(n) = prime(n) % (n-1) \\ Michel Marcus, Jun 12 2013
(Magma) [NthPrime(n) mod (n-1): n in [2..90]]; // Vincenzo Librandi, Sep 11 2014
CROSSREFS
Sequence in context: A338215 A266251 A021302 * A367004 A328298 A002374
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Daniel Wild (wild(AT)edumath.u-strasbg.fr)
STATUS
approved