login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:27 EDT 2024. Contains 371916 sequences. (Running on oeis4.)