Asymptotics for numbers of line segments and lines in a square grid
  We present an asymptotic formula for the number of line segments connecting q+1 points of an nxn square grid, and a sharper formula, assuming the Riemann hypothesis. We also present asymptotic formulas for the number of lines through at least q points and, respectively, through exactly q points of the grid. The well-known case q=2 is so generalized. 
Pentti Haukkanen and Jorma K. Merikoski
math.NT cs.IT math.CO math.IT