[go: up one dir, main page]

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

A006045
Sum of orders of all 2 X 2 matrices with entries mod n.
(Formerly M3946)
2
1, 26, 272, 722, 5270, 5260, 37358, 18414, 56216, 95668, 487714, 99796, 1304262, 627046, 593398, 481982, 7044222, 931396, 11570384, 1602940, 4037650, 8694134, 40220524, 2069292, 15855230, 21686124, 13215872, 10948486, 129952894, 10451648
OFFSET
1,2
COMMENTS
The order of a matrix M over Z/(nZ) is the smallest k such that M^k is idempotent.
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..150 (first 61 terms from Sean A. Irvine)
Michael S. Branicky, Python program
A. Wilansky, Spectral decomposition of matrices for high school students, Math. Mag., vol. 41, 1968, pp. 51-59.
A. Wilansky, Spectral decomposition of matrices for high school students, Math. Mag., vol. 41, 1968, pp. 51-59. (Annotated scanned copy)
PROG
(PARI) order(m) = {kk = 1; ok = 0; while (! ok, mk = m^kk; if (mk^2 == mk, ok = 1, kk++); ); return(kk); }
a(n) = {ret = 0; m = matrix(2, 2); for (i=0, n-1, m[1, 1] = Mod(i, n); for (j=0, n-1, m[1, 2] = Mod(j, n); for (k=0, n-1, m[2, 1] = Mod(k, n); for (l=0, n-1, m[2, 2] = Mod(l, n); ret += order(m); ); ); ); ); return (ret); }
(Python) # see link for faster version
from itertools import product
def mmm2(A, B, modder): # matrix multiply modulo for 2x2
return ((A[0]*B[0]+A[1]*B[2])%modder, (A[0]*B[1]+A[1]*B[3])%modder,
(A[2]*B[0]+A[3]*B[2])%modder, (A[2]*B[1]+A[3]*B[3])%modder)
def order(A, modder):
Ak, k = A, 1
while mmm2(Ak, Ak, modder) != Ak: Ak, k = mmm2(Ak, A, modder), k+1
return k
def a(n): return sum(order(A, n) for A in product(range(n), repeat=4))
print([a(n) for n in range(1, 12)]) # Michael S. Branicky, Jan 26 2021
CROSSREFS
Sequence in context: A328874 A195755 A186261 * A022686 A200555 A130901
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Albert Wilansky
EXTENSIONS
The article gives an incorrect value for a(5).
More terms from Michel Marcus, Jun 07 2013
More terms from Sean A. Irvine, Dec 18 2016
STATUS
approved