login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of powers of 12 modulo n.
15

%I #9 Aug 25 2024 10:00:30

%S 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,

%T 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,

%U 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

%N Number of powers of 12 modulo n.

%H Amiram Eldar, <a href="/A054712/b054712.txt">Table of n, a(n) for n = 1..10000</a>

%t 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 *)

%Y Cf. A054703 (base 2), A054704 (3), A054705 (4), A054706 (5), A054707 (6), A054708 (7), A054709 (8), A054717 (9), A054710 (10), A351524 (11), A054713 (13), A054714 (14), A054715 (15), A054716 (16).

%K easy,nonn

%O 1,2

%A _Henry Bottomley_, Apr 20 2000