Number of 2's in the n X n multiplication table (mod n).
2, 4, 4, 6, 6, 8, 6, 12, 10, 8, 12, 18, 8, 16, 16, 18, 18, 16, 12, 30, 22, 16, 20, 36, 18, 24, 28, 24, 30, 32, 20, 48, 24, 24, 36, 54, 24, 32, 40, 36, 42, 40, 24, 66, 46, 32, 42, 60, 32, 48, 52, 54, 40, 48, 36, 84, 58, 32, 60, 90, 36, 64, 48, 60, 66, 64, 44, 72
3
When n is prime, then a(n) = n-1. The number of 2’s is the same as the number of -2’s.
T. D. Noe, Plot of terms 3..1000
T. D. Noe, Table of terms 3..1000
(Mma) Table[s = Flatten[Table[Mod[i*j, n], {i, 0, n - 1}, {j, 0, n - 1}]]; Transpose[Tally[Sort[s]]][[2, 3]], {n, 3, 100}]
Cf. A000010 (number of ones), A018804 (number of zeros), A095026.
nonn
T. D. Noe, May 14 2014