This question was inspired by the numerous other king on chessboard questions asked on this site. Specifically this one:
My question is "just more general: "What is the number of ways to place $k$ nonattacking kings of a $p \times q$ chessboard?"
I know that the solution incorporates generating function but I am unsure how to use them.
Please help.