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!)
 A189346 Number of sets of four points on a (n X n)-grid (or geoboard), exactly three of which are collinear. 3
 0, 0, 48, 532, 3088, 11340, 33824, 83288, 183344, 364304, 681872, 1194100, 1992976, 3182332, 4941360, 7420640, 10874720, 15539952, 21812720, 30011924, 40650368, 54187196, 71463440, 92990296, 119675712, 152314920, 192393872, 240690060 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS The four points build a triangle on a (n X n)-grid, with one of them located on a side of the triangle. The number of sets of four points with the three collinear points in a horizontal or vertical line is 2*n^2*(n-1)*binomial(n,3) = 4*A090448(n). The number of sets of four points with the three collinear points in a diagonal line of slope 1 is 2*n*(n-1)*binomial(n,3) + 4*Sum_{k=3..n-1}(n^2-k)*binomial(k,3). The sum of these two values is a lower bound for this sequence. - Nathaniel Johnston, Apr 23 2011 LINKS Martin Renner, Table of n, a(n) for n = 1..76 MAPLE A189346 := proc(n)local a, b, j, k, l, m, s, slopes, num, den, tot: tot := 0: slopes := {}: for b from 1 to ceil(n/2)-1 do for a from 0 to b do slopes := slopes union {a/b}: od: od: for s from 1 to nops(slopes) do num := numer(slopes[s]): den := denom(slopes[s]): if(num = 0)then tot := tot + 2*n^2*(n-1)*binomial(n, 3): elif(num = den)then tot := tot + 2*(2*add(binomial(k, 3)*(n^2-k), k=3..n) - binomial(n, 3)*(n^2 - n)): else for j from 1 to n - 2*den do for k from 1 to n - 2*num do tot := tot + 4*(n^2 - 3): for l from 1 to n do for m from 1 to n do if((not l = j or not m = k) and (not l = j + den or not m = k + num) and (not l = j + 2*den or not m = k + 2*num) and (m - k)*den = num*(l - j))then tot := tot - 4: fi: od: od: od: od: fi: od: return tot: end: seq(A189346(n), n=1..15); # Nathaniel Johnston, Apr 23 2011 CROSSREFS Cf. A000938, A175383, A178256, A189345. Sequence in context: A060674 A233165 A247743 * A334713 A266210 A245953 Adjacent sequences:  A189343 A189344 A189345 * A189347 A189348 A189349 KEYWORD nonn AUTHOR Martin Renner, Apr 20 2011 EXTENSIONS a(6)-a(28) from Nathaniel Johnston, Apr 23 2011 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 April 16 16:22 EDT 2021. Contains 343050 sequences. (Running on oeis4.)