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

A054704
Number of powers of 3 modulo n.
15
1, 1, 2, 2, 4, 2, 6, 2, 3, 4, 5, 3, 3, 6, 5, 4, 16, 3, 18, 4, 7, 5, 11, 3, 20, 3, 4, 6, 28, 5, 30, 8, 6, 16, 12, 4, 18, 18, 4, 4, 8, 7, 42, 10, 6, 11, 23, 5, 42, 20, 17, 6, 52, 4, 20, 6, 19, 28, 29, 5, 10, 30, 8, 16, 12, 6, 22, 16, 12, 12, 35, 4, 12, 18, 21, 18, 30, 4, 78, 4, 5, 8, 41, 7, 16
OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from David W. Wilson)
FORMULA
a(n) = A007734(n) + A007949(n). - Amiram Eldar, Aug 25 2024
MATHEMATICA
a[n_] := Module[{e = IntegerExponent[n, 3]}, e + MultiplicativeOrder[3, n/3^e]]; Array[a, 100] (* Amiram Eldar, Aug 25 2024 *)
CROSSREFS
Cf. A054703 (base 2), A054705 (4), A054706 (5), A054707 (6), A054708 (7), A054709 (8), A054717 (9), A054710 (10), A351524 (11), A054712 (12), A054713 (13), A054714 (14), A054715 (15), A054716 (16).
Sequence in context: A329733 A289624 A258446 * A143525 A086087 A284476
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Apr 20 2000
STATUS
approved