A054712 Number of powers of 12 modulo n.
1, 2, 2, 2, 4, 2, 6, 3, 3, 5, 1, 2, 2, 7, 5, 3, 16, 3, 6, 5, 7, 2, 11, 3, 20, 3, 4, 7, 4, 5, 30, 4, 2, 17, 12, 3, 9, 7, 3, 6, 40, 7, 42, 2, 6, 12, 23, 3, 42, 21, 17, 3, 52, 4, 4, 8, 7, 5, 29, 5, 15, 31, 8, 4, 4, 2, 66, 17, 12, 13, 35, 3, 36, 10, 21, 7, 6, 3, 26, 6, 5, 41, 41, 7, 16, 43, 5, 3, 8
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
a[n_] := Max[IntegerExponent[2*n, 4], IntegerExponent[n, 3]] + Module[{e = IntegerExponent[n, {2, 3}]}, MultiplicativeOrder[12, n/Times @@ ({2, 3}^e)]]; Array[a, 100] (* Amiram Eldar, Aug 25 2024 *)