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 A008831 #24 Aug 06 2024 07:11:56 %S A008831 0,1,4,2,9,5,11,3,8,10,7,6 %N A008831 Discrete logarithm of n to the base 2 modulo 13. %C A008831 This is also a (12,1)-sequence. %C A008831 Equivalently, a(n) is the multiplicative order of n with respect to base 2 (modulo 13), i.e., a(n) is the base-2 logarithm of the smallest k such that 2^k mod 13 = n. %D A008831 I. M. Vinogradov, Elements of Number Theory, p. 220. %H A008831 H. Y. Song and S. W. Golomb, <a href="https://citeseerx.ist.psu.edu/pdf/20e087f1e3d60c14180d4c27a3183f942de29e94">Generalized Welch-Costas sequences and their application to Vatican arrays</a>, in Proc. 2nd International Conference on Finite Fields: Theory, Algorithms and Applications (Las Vegas 1993) Contemp. Math. vol. 168 344 1994. %H A008831 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DiscreteLogarithm.html">Discrete Logarithm</a>. %F A008831 2^a(n) == n (mod 13). - _Michael S. Branicky_, Aug 22 2021 %e A008831 From _Jon E. Schoenfield_, Aug 21 2021: (Start) %e A008831 Sequence is a permutation of the 12 integers 0..11: %e A008831 k 2^k 2^k mod 13 %e A008831 -- ------ ---------- %e A008831 0 1 1 so a(1) = 0 %e A008831 1 2 2 so a(2) = 1 %e A008831 2 4 4 so a(4) = 2 %e A008831 3 8 8 so a(8) = 3 %e A008831 4 16 3 so a(3) = 4 %e A008831 5 32 6 so a(6) = 5 %e A008831 6 64 12 so a(12) = 6 %e A008831 7 128 11 so a(11) = 7 %e A008831 8 256 9 so a(9) = 8 %e A008831 9 512 5 so a(5) = 9 %e A008831 10 1024 10 so a(10) = 10 %e A008831 11 2048 7 so a(7) = 11 %e A008831 12 4096 1 %e A008831 but a(1) = 0, so the sequence is finite with 12 terms. %e A008831 (End) %p A008831 [ seq(numtheory[mlog](n, 2, 13), n=1..12) ]; %t A008831 a[1] = 0; a[n_] := MultiplicativeOrder[2, 13, {n}]; Array[a, 12] (* _Jean-François Alcover_, Feb 09 2018 *) %o A008831 (Python) %o A008831 from sympy.ntheory import discrete_log %o A008831 def a(n): return discrete_log(13, n, 2) %o A008831 print([a(n) for n in range(1, 13)]) # _Michael S. Branicky_, Aug 22 2021 %Y A008831 A row of A054503. %K A008831 nonn,base,fini,full %O A008831 1,3 %A A008831 _N. J. A. Sloane_