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.
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
Links
- Heinrich Ludwig, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (7,-21,35,-35,21,-7,1).
Crossrefs
Programs
-
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 *)
-
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
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
Comments