The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A225606 Number of distinct lines passing through 3 or more points in an n X n grid. 4
 0, 0, 0, 8, 14, 32, 58, 108, 174, 296, 406, 628, 898, 1216, 1582, 2188, 2754, 3528, 4398, 5524, 6778, 8336, 9778, 11812, 14038, 16456, 19066, 22540, 25954, 29968, 34270, 39116, 44282, 50312, 56026, 63196, 70798, 78984 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 LINKS P. Haukkanen, J. K. Merikoski, Some formulas for numbers of line segments and lines in a rectangular grid, arXiv:1108.1041 FORMULA a(n) = A018808(n) - A018809(n) = A018810(n) + A018811(n) + A018812(n) + A018813(n)+.... MATHEMATICA f[n_, k_] := Sum[x = kx/k; y = ky/k; If[IntegerQ[x] && IntegerQ[y] && CoprimeQ[x, y], (n - Abs[kx])(n - Abs[ky]), 0], {kx, -n + 1, n - 1}, {ky, -n + 1, n - 1}]; a[n_] := (f[n, 2] - f[n, 3])/2; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 30 2018, after Seppo Mustonen in A018808 *) CROSSREFS Sequence in context: A273843 A227867 A254034 * A117132 A064969 A236332 Adjacent sequences:  A225603 A225604 A225605 * A225607 A225608 A225609 KEYWORD nonn AUTHOR R. J. Mathar, Aug 06 2013 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 4 03:40 EDT 2020. Contains 334815 sequences. (Running on oeis4.)