login
Discrete logarithm of n to the base 2 modulo 11.
1

%I #15 Sep 08 2022 08:44:36

%S 0,1,8,2,4,9,7,3,6,5

%N Discrete logarithm of n to the base 2 modulo 11.

%C Equivalently, a(n) is the multiplicative order of n with respect to base 2 (modulo 11), i.e., a(n) is the base-2 logarithm of the smallest k such that 2^k mod 11 = n. - _Jon E. Schoenfield_, Aug 21 2021

%D I. M. Vinogradov, Elements of Number Theory, p. 220.

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DiscreteLogarithm.html">Discrete Logarithm</a>.

%F 2^a(n) == n (mod 11). - _Michael S. Branicky_, Aug 13 2021

%e From _Jon E. Schoenfield_, Aug 21 2021: (Start)

%e Sequence is a permutation of the 10 integers 0..9:

%e k 2^k 2^k mod 11

%e -- ------ ----------

%e 0 1 1 so a(1) = 0

%e 1 2 2 so a(2) = 1

%e 2 4 4 so a(4) = 2

%e 3 8 8 so a(8) = 3

%e 4 16 5 so a(5) = 4

%e 5 32 10 so a(10) = 5

%e 6 64 9 so a(9) = 6

%e 7 128 7 so a(7) = 7

%e 8 256 3 so a(3) = 8

%e 9 512 6 so a(6) = 9

%e 10 1024 1

%e but a(1) = 0, so the sequence is finite with 10 terms.

%e (End)

%p a:= n-> numtheory[mlog](n, 2, 11):

%p seq(a(n), n=1..10); # _Alois P. Heinz_, Aug 21 2021

%o (Magma) j := 11; F := FiniteField(j); PrimitiveElement(F); [ Log(F!n) : n in [ 1..j-1 ]];

%o (Python)

%o from sympy.ntheory import discrete_log

%o def a(n): return discrete_log(11, n, 2)

%o print([a(n) for n in range(1, 11)]) # _Michael S. Branicky_, Aug 13 2021

%Y Cf. A036117.

%K nonn,base,fini,full

%O 1,3

%A _N. J. A. Sloane_