login
A279437
Number of ways to place 3 points on an n X n square grid so that no more than 2 points are on a vertical or horizontal straight line.
9
0, 4, 78, 528, 2200, 6900, 17934, 40768, 83808, 159300, 284350, 482064, 782808, 1225588, 1859550, 2745600, 3958144, 5586948, 7739118, 10541200, 14141400, 18711924, 24451438, 31587648, 40380000, 51122500, 64146654, 79824528, 98571928, 120851700, 147177150, 178115584
OFFSET
1,2
COMMENTS
Column 4 of triangle A279445.
Rotations and reflections of placements are counted. For numbers if they are to be ignored see A279447.
For condition "no more than 2 points on straight lines at any angle", see A045996.
FORMULA
a(n) = (n^6 - 5*n^4 + 6*n^3 - 2*n^2)/6.
a(n) = 7*a(n-1) - 21*a(n-2) + 35*a(n-3) - 35*a(n-4) + 21*a(n-5) - 7*a(n-6) + a(n-7).
G.f.: 2*x^2*(2 + 25*x + 33*x^2 + x^3 - x^4) / (1 - x)^7. - Colin Barker, Dec 12 2016
MATHEMATICA
Table[(n^6 - 5 n^4 + 6 n^3 - 2 n^2)/6, {n, 32}] (* or *)
Rest@ CoefficientList[Series[2 x^2*(2 + 25 x + 33 x^2 + x^3 - x^4)/(1 - x)^7, {x, 0, 32}], x] (* Michael De Vlieger, Dec 12 2016 *)
PROG
(PARI) concat(0, Vec(2*x^2*(2 + 25*x + 33*x^2 + x^3 - x^4) / (1 - x)^7 + O(x^50))) \\ Colin Barker, Dec 12 2016
CROSSREFS
Same problem but 2, 4..9 points: A083374, A279438, A279439, A279440, A279441, A279442, A279443.
Sequence in context: A370953 A201984 A210519 * A296997 A220240 A246606
KEYWORD
nonn,easy
AUTHOR
Heinrich Ludwig, Dec 12 2016
STATUS
approved