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”).

A094918
a(n) = (3^n-1)/2 mod n.
2
0, 0, 1, 0, 1, 4, 1, 0, 4, 4, 1, 4, 1, 4, 13, 0, 1, 4, 1, 0, 13, 4, 1, 16, 21, 4, 13, 12, 1, 4, 1, 0, 13, 4, 23, 4, 1, 4, 13, 0, 1, 28, 1, 40, 31, 4, 1, 16, 15, 24, 13, 40, 1, 40, 33, 32, 13, 4, 1, 40, 1, 4, 13, 0, 56, 34, 1, 40, 13, 54, 1, 40, 1, 4, 28, 40, 37, 52, 1, 0, 40, 4, 1, 28, 36, 4, 13, 24
OFFSET
1,6
PROG
(PARI) A094918(n) = lift(Mod((3^n-1)/2, n)); \\ Antti Karttunen, May 19 2020
CROSSREFS
(k^n-1)/(k-1) mod n for k = 1, ..., 10 gives A082495, this sequence, A094919, A094920, A094921, A094922, A094923, A094924 and A095250.
Cf. A003462.
Sequence in context: A266392 A021713 A122388 * A110146 A303499 A108944
KEYWORD
nonn,look
AUTHOR
N. J. A. Sloane, Jun 18 2004
STATUS
approved