Just a long comment: I tried to look at the diagonal of the Smith Normal form of the matrices. I counted the number of occurrences of each number. For example, the row $\{8,3\} \to 1^1\, 2^4\, 4^1\, 8^1 $ encodes $n$, $\lfloor \frac{n-1}{2} \rfloor$ and then the non-zero entries on the diagonal. In this case, 1 entry is 1, 4 entries are equal to 2, and then there is a single 4, and a single 8.
\begin{array}{l} \{1,0\}\to 1^1 \\ \{2,0\}\to 1^1\, 2^1 \\ \{3,1\}\to 1^1\, 2^2 \\ \{4,1\}\to 1^1\, 2^2\, 4^1 \\ \{5,2\}\to 1^1\, 2^3 \\ \{6,2\}\to 1^1\, 2^3\, 4^2 \\ \{7,3\}\to 1^1\, 2^4 \\ \{8,3\}\to 1^1\, 2^4\, 4^1\, 8^1 \\ \{9,4\}\to 1^1\, 2^5\, 6^1 \\ \{10,4\}\to 1^1\, 2^4\, 4^3 \\ \{11,5\}\to 1^1\, 2^5\, 6^1 \\ \{12,5\}\to 1^1\, 2^6\, 4^1\, 8^3 \\ \{13,6\}\to 1^1\, 2^6\, 10^1 \\ \{14,6\}\to 1^1\, 2^5\, 4^4 \\ \{15,7\}\to 1^1\, 2^9\, 60^1 \\ \{16,7\}\to 1^1\, 2^7\, 4^1\, 8^2\, 16^1 \\ \{17,8\}\to 1^1\, 2^8\, 34^1 \\ \{18,8\}\to 1^1\, 2^7\, 4^4\, 12^2 \\ \{19,9\}\to 1^1\, 2^9\, 54^1 \\ \{20,9\}\to 1^1\, 2^8\, 4^1\, 8^5 \\ \{21,10\}\to 1^1\, 2^{12}\, 504^1 \\ \{22,10\}\to 1^1\, 2^7\, 4^4\, 12^2 \\ \{23,11\}\to 1^1\, 2^{11}\, 534^1 \\ \{24,11\}\to 1^1\, 2^{10}\, 4^3\, 8^1\, 16^4 \\ \{25,12\}\to 1^1\, 2^{12}\, 10^1\, 410^1 \\ \{26,12\}\to 1^1\, 2^8\, 4^5\, 20^2 \\ \{27,13\}\to 1^1\, 2^{13}\, 6^1\, 18^1\, 342^1 \\ \{28,13\}\to 1^1\, 2^{10}\, 4^1\, 8^6\, 16^1 \\ \{29,14\}\to 1^1\, 2^{12}\, 4^2\, 2260^1 \\ \{30,14\}\to 1^1\, 2^{10}\, 4^9\, 60^1\, 120^1 \\ \{31,15\}\to 1^1\, 2^{14}\, 62^1\, 558^1 \\ \{32,15\}\to 1^1\, 2^{11}\, 4^3\, 8^2\, 16^3\, 32^1 \\ \{33,16\}\to 1^1\, 2^{16}\, 6^1\, 66^1\, 2904^1 \\ \{34,16\}\to 1^1\, 2^{10}\, 4^7\, 68^2 \\ \{35,17\}\to 1^1\, 2^{18}\, 18^1\, 81900^1 \\ \{36,17\}\to 1^1\, 2^{14}\, 4^1\, 8^6\, 24^4 \\ \{37,18\}\to 1^1\, 2^{18}\, 524290^1 \\ \{38,18\}\to 1^1\, 2^{11}\, 4^8\, 108^2 \\ \{39,19\}\to 1^1\, 2^{20}\, 520^1\, 32760^1 \\ \{40,19\}\to 1^1\, 2^{13}\, 4^5\, 8^1\, 16^6\, 48^1 \\ \end{array}
The Mathematica code:
aa[n_] :=
aa[n] = Table[(-1)^Floor[2 i j/n], {i, 0, n - 1}, {j, 0,
n - 1}]; {#, Floor[(# - 1)/2]} ->
Row[(Superscript[#1, #2] & @@@
Tally[DeleteCases[Diagonal[SmithDecomposition[aa[#]][[2]]],
0]]), " "] & /@ Range[40] // Column