login
A226756
Number of elements X in the matrix ring M_2(Z_n) such that X^2 == X (mod n).
1
1, 8, 14, 26, 32, 112, 58, 98, 110, 256, 134, 364, 184, 464, 448, 386, 308, 880, 382, 832, 812, 1072, 554, 1372, 752, 1472, 974, 1508, 872, 3584, 994, 1538, 1876, 2464, 1856, 2860, 1408, 3056, 2576, 3136, 1724, 6496, 1894, 3484, 3520, 4432, 2258, 5404, 2746
OFFSET
1,2
MATHEMATICA
ring[n_] := Flatten[Table[{{a, b}, {c, d}}, {a, 0, n - 1}, {b, 0, n - 1}, {c, 0, n - 1}, {d, 0, n - 1}], 3]; a[n_] := Length@Select[ring[n], Mod[#.#, n] == # &]; Table[a[n], {n, 44}]
PROG
(PARI) a(n) = sum(i=0, n-1, sum(j=0, n-1, sum(k=0, n-1, sum(l=0, n-1, m = Mod([i, j; k, l], n); m^2 == m)))); \\ Michel Marcus, Apr 04 2016
CROSSREFS
Cf. A087726.
Sequence in context: A014002 A301787 A029625 * A029631 A187062 A153340
KEYWORD
nonn,mult
AUTHOR
STATUS
approved