I was reading the problem given in How many squares contains paint It looks like I don't understand how the hint given in an answer leads to the solution. Assume that corners of the board are $(0,0), (0,m), (n,0), (n,m)$, the line the brush paints is always at the maximum width and the center of the brush travels along the line $y=\frac{m}{n}x$. Does this have a closed form solution?
Edit: Looks like there is a formula, https://oeis.org/A226246/internal . But I don't have any idea about its proof.