Suppose that we are given a integer grid, e.g. . Let be the number of different lines that intersect with at least two points on the grid.
For , there are exactly 20 such lines, as drawn on the image below.
:::align{center}
:::
Compute for all given .