Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #65 Jan 18 2015 06:18:04
%S 1,1,1,1,0,1,1,1,2,1,1,0,0,0,1,1,1,1,2,4,1,1,0,2,0,4,0,1,1,1,0,1,2,0,
%T 3,1,1,0,1,0,0,0,6,0,1,1,1,2,2,1,2,3,2,6,1,1,0,0,0,4,0,6,0,0,0,1,1,1,
%U 1,1,4,1,2,2,3,4,10,1,1,0,2,0,2,0,0,0,6,0,5,0,1,1,1,0,2,0,0,1,2,0,0,5,0,12,1
%N Square array read by antidiagonals: A(m,n) = multiplicative order of m mod n, or 0 if m and n are not coprime.
%C Read by antidiagonals:
%C m\n 1 2 3 4 5 6 7 8 9 10 11 12 13
%C 1 1 1 1 1 1 1 1 1 1 1 1 1 1
%C 2 1 0 2 0 4 0 3 0 6 0 10 0 12
%C 3 1 1 0 2 4 0 6 2 0 4 5 0 3
%C 4 1 0 1 0 2 0 3 0 3 0 5 0 6
%C 5 1 1 2 1 0 2 6 2 6 0 5 2 4
%C 6 1 0 0 0 1 0 2 0 0 0 10 0 12
%C 7 1 1 1 2 4 1 0 2 3 4 10 2 12
%C 8 1 0 2 0 4 0 1 0 2 0 10 0 4
%C 9 1 1 0 1 2 0 3 1 0 2 5 0 3
%C 10 1 0 1 0 0 0 6 0 1 0 2 0 6
%C 11 1 1 2 2 1 2 3 2 6 1 0 2 12
%C 12 1 0 0 0 4 0 6 0 0 0 1 0 2
%C 13 1 1 1 1 4 1 2 2 3 4 10 1 0
%C etc.
%C A(m,n) = Least k>0 such that m^k=1 (mod n), or 0 if no such k exists.
%C It is easy to prove that column n has period n.
%C A(1,n) = 1, A(m,1) =1.
%C If A(m,n) differs from 0, it is period length of 1/n in base m.
%C The maximum number in column n is psi(n) (A002322(n)), and all numbers in column n (except 0) divide psi(n), and all factors of psi(n) are in column n.
%C Except the first row, every row contains all natural numbers.
%e A(3,7) = 6 because:
%e 3^0 = 1 (mod 7)
%e 3^1 = 3 (mod 7)
%e 3^2 = 2 (mod 7)
%e 3^3 = 6 (mod 7)
%e 3^4 = 4 (mod 7)
%e 3^5 = 5 (mod 7)
%e 3^6 = 1 (mod 7)
%e ...
%e And the period is 6, so A(3,7) = 6.
%p f:= proc(m,n)
%p if igcd(m,n) <> 1 then 0
%p elif n=1 then 1
%p else numtheory:-order(m,n)
%p fi
%p end proc:
%p seq(seq(f(t-j,j),j=1..t-1),t=2..65); # _Robert Israel_, Dec 30 2014
%t a250211[m_, n_] = If[GCD[m, n] == 1, MultiplicativeOrder[m, n], 0]
%t Table[a250211[t-j, j], {t, 2, 65}, {j, 1, t-1}]
%Y Cf. A002322, A111076, A111725, A001918, A008330, A007733, A002326, A007732, A051626, A066799.
%Y See A139366 for another version.
%K nonn,easy,tabl
%O 1,9
%A _Eric Chen_, Dec 29 2014