The number a(n) of conjugacy classes in the group GL(n, q) is the coefficient of t^n in the infinite product: product k=1, 2, ... (1-t^k)/(1-qt^k) - Noam Katz (noamkj(AT)hotmail.com), Mar 30 2001.
(Magma) /* The program does not work for n>8: */ [1] cat [NumberOfClasses(GL(n, 7)): n in [1..8]]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006; edited by Vincenzo Librandi, Jan 23 2013