login

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”).

A250211
Square array read by antidiagonals: A(m,n) = multiplicative order of m mod n, or 0 if m and n are not coprime.
3
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, 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, 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
OFFSET
1,9
COMMENTS
Read by antidiagonals:
m\n 1 2 3 4 5 6 7 8 9 10 11 12 13
1 1 1 1 1 1 1 1 1 1 1 1 1 1
2 1 0 2 0 4 0 3 0 6 0 10 0 12
3 1 1 0 2 4 0 6 2 0 4 5 0 3
4 1 0 1 0 2 0 3 0 3 0 5 0 6
5 1 1 2 1 0 2 6 2 6 0 5 2 4
6 1 0 0 0 1 0 2 0 0 0 10 0 12
7 1 1 1 2 4 1 0 2 3 4 10 2 12
8 1 0 2 0 4 0 1 0 2 0 10 0 4
9 1 1 0 1 2 0 3 1 0 2 5 0 3
10 1 0 1 0 0 0 6 0 1 0 2 0 6
11 1 1 2 2 1 2 3 2 6 1 0 2 12
12 1 0 0 0 4 0 6 0 0 0 1 0 2
13 1 1 1 1 4 1 2 2 3 4 10 1 0
etc.
A(m,n) = Least k>0 such that m^k=1 (mod n), or 0 if no such k exists.
It is easy to prove that column n has period n.
A(1,n) = 1, A(m,1) =1.
If A(m,n) differs from 0, it is period length of 1/n in base m.
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.
Except the first row, every row contains all natural numbers.
EXAMPLE
A(3,7) = 6 because:
3^0 = 1 (mod 7)
3^1 = 3 (mod 7)
3^2 = 2 (mod 7)
3^3 = 6 (mod 7)
3^4 = 4 (mod 7)
3^5 = 5 (mod 7)
3^6 = 1 (mod 7)
...
And the period is 6, so A(3,7) = 6.
MAPLE
f:= proc(m, n)
if igcd(m, n) <> 1 then 0
elif n=1 then 1
else numtheory:-order(m, n)
fi
end proc:
seq(seq(f(t-j, j), j=1..t-1), t=2..65); # Robert Israel, Dec 30 2014
MATHEMATICA
a250211[m_, n_] = If[GCD[m, n] == 1, MultiplicativeOrder[m, n], 0]
Table[a250211[t-j, j], {t, 2, 65}, {j, 1, t-1}]
CROSSREFS
See A139366 for another version.
Sequence in context: A284256 A354841 A339772 * A243753 A219238 A025918
KEYWORD
nonn,easy,tabl
AUTHOR
Eric Chen, Dec 29 2014
STATUS
approved