cp's OEIS Frontend

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.

A250211 Square array read by antidiagonals: A(m,n) = multiplicative order of m mod n, or 0 if m and n are not coprime.

This page as a plain text file.
%I A250211 #65 Jan 18 2015 06:18:04
%S A250211 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 A250211 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 A250211 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 A250211 Square array read by antidiagonals: A(m,n) = multiplicative order of m mod n, or 0 if m and n are not coprime.
%C A250211 Read by antidiagonals:
%C A250211 m\n   1    2    3    4    5    6    7    8    9    10    11    12    13
%C A250211 1     1    1    1    1    1    1    1    1    1     1     1     1     1
%C A250211 2     1    0    2    0    4    0    3    0    6     0    10     0    12
%C A250211 3     1    1    0    2    4    0    6    2    0     4     5     0     3
%C A250211 4     1    0    1    0    2    0    3    0    3     0     5     0     6
%C A250211 5     1    1    2    1    0    2    6    2    6     0     5     2     4
%C A250211 6     1    0    0    0    1    0    2    0    0     0    10     0    12
%C A250211 7     1    1    1    2    4    1    0    2    3     4    10     2    12
%C A250211 8     1    0    2    0    4    0    1    0    2     0    10     0     4
%C A250211 9     1    1    0    1    2    0    3    1    0     2     5     0     3
%C A250211 10    1    0    1    0    0    0    6    0    1     0     2     0     6
%C A250211 11    1    1    2    2    1    2    3    2    6     1     0     2    12
%C A250211 12    1    0    0    0    4    0    6    0    0     0     1     0     2
%C A250211 13    1    1    1    1    4    1    2    2    3     4    10     1     0
%C A250211 etc.
%C A250211 A(m,n) = Least k>0 such that m^k=1 (mod n), or 0 if no such k exists.
%C A250211 It is easy to prove that column n has period n.
%C A250211 A(1,n) = 1, A(m,1) =1.
%C A250211 If A(m,n) differs from 0, it is period length of 1/n in base m.
%C A250211 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 A250211 Except the first row, every row contains all natural numbers.
%e A250211 A(3,7) = 6 because:
%e A250211 3^0 = 1 (mod 7)
%e A250211 3^1 = 3 (mod 7)
%e A250211 3^2 = 2 (mod 7)
%e A250211 3^3 = 6 (mod 7)
%e A250211 3^4 = 4 (mod 7)
%e A250211 3^5 = 5 (mod 7)
%e A250211 3^6 = 1 (mod 7)
%e A250211 ...
%e A250211 And the period is 6, so A(3,7) = 6.
%p A250211 f:= proc(m,n)
%p A250211   if igcd(m,n) <> 1 then 0
%p A250211   elif n=1 then 1
%p A250211   else numtheory:-order(m,n)
%p A250211   fi
%p A250211 end proc:
%p A250211 seq(seq(f(t-j,j),j=1..t-1),t=2..65); # _Robert Israel_, Dec 30 2014
%t A250211 a250211[m_, n_] = If[GCD[m, n] == 1, MultiplicativeOrder[m, n], 0]
%t A250211 Table[a250211[t-j, j], {t, 2, 65}, {j, 1, t-1}]
%Y A250211 Cf. A002322, A111076, A111725, A001918, A008330, A007733, A002326, A007732, A051626, A066799.
%Y A250211 See A139366 for another version.
%K A250211 nonn,easy,tabl
%O A250211 1,9
%A A250211 _Eric Chen_, Dec 29 2014