This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A054704 #13 Aug 25 2024 09:58:50 %S A054704 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, %T A054704 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, %U A054704 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 %N A054704 Number of powers of 3 modulo n. %H A054704 Alois P. Heinz, <a href="/A054704/b054704.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from David W. Wilson) %F A054704 a(n) = A007734(n) + A007949(n). - _Amiram Eldar_, Aug 25 2024 %t A054704 a[n_] := Module[{e = IntegerExponent[n, 3]}, e + MultiplicativeOrder[3, n/3^e]]; Array[a, 100] (* _Amiram Eldar_, Aug 25 2024 *) %Y A054704 Cf. A007734, A007949. %Y A054704 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). %K A054704 easy,nonn %O A054704 1,3 %A A054704 _Henry Bottomley_, Apr 20 2000