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.

Showing 1-1 of 1 results.

A226756 Number of elements X in the matrix ring M_2(Z_n) such that X^2 == X (mod n).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A087726.

Programs

  • 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}]
  • 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
Showing 1-1 of 1 results.