TITLE: Is Carlitz's paper correct about the number of similarity classes of commuting matrices?
QUESTION [18 upvotes]: L. Carlitz has a paper, Classes of pairs of commuting matrices over a finite field, that computes the number of simultaneous similarity classes of of pairs of commuting matrices in $\operatorname{Mat}_n(\mathbb F_q)$. Two pairs $(A,B)$ and $(A',B')$ are called simultaneously similar if there is $U\in \operatorname{GL}_n(\mathbb F_q)$ such that $A'=UAU^{-1}$, $B'=UBU^{-1}$.
However, from the proof (specifically, to go from equation (4) to (5) on p. 193), it seems that he implicitly uses the statement that $(A,B)$ and $(A,B')$ belong to different similarity classes whenever $B\neq B'$. But it is possible that there is $U\in \operatorname{GL}_n(\mathbb F_q)$ that commutes with $A$ and such that $UBU^{-1}=B'$. In this case, they belong to the same class.
Is that it? If this paper turns out to be wrong, is there any result about the same question?

REPLY [17 votes]: It is wrong. See the correction published in AMM 71 (1964), issue 8, page 900. (You have to scroll down to the bottom of the last page to find this correction.)
Unfortunately this was published in the "Mathematical Notes" section, making it hard to find (as these notes are not individually indexed much of the time, and don't get separate DOIs). I've only managed to find it by looking at the back references to Carlitz's original paper (always a good first step if you suspect something is wrong in a paper; whoever cited it might too have noticed), and realizing that one of these back references also cites a correction.