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
KEYWORD
nonn,mult
AUTHOR
José María Grau Ribas, Jun 16 2013
STATUS
approved