OFFSET
0,2
COMMENTS
In a triangular lattice, draw a regular hexagon of side length n (that is, n+1 points on a side). Then a(n) is the number of ways to choose two lattice points that do not lie on a line parallel to any side of the hexagon. (See the Bennett and Potts paper.) - Mikhail Lavrov, Jun 12 2023
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
B. T. Bennett and R. B. Potts, Arrays and brooks, J. Austral. Math. Soc., 7 (1967), 23-31 (see p. 30).
B. T. Bennett and R. B. Potts, Arrays and brooks, J. Austral. Math. Soc., 7 (1967), 23-31. [Annotated scanned copy]
Index entries for linear recurrences with constant coefficients, signature (5, -10, 10, -5, 1).
FORMULA
O.g.f.: 3*x*(2 + 19*x + 14*x^2 + x^3)/(1-x)^5. - R. J. Mathar, Feb 26 2008
E.g.f.: x*(12 + 75*x + 58*x^2 + 9*x^3)*exp(x)/2. - Robert Israel, May 29 2016
EXAMPLE
From Mikhail Lavrov, Jun 12 2023: (Start)
For n=1 the a(1)=6 ways to choose two points are illustrated below:
.
. X o o X o o o o X o o X
. o o X o o o o o X X o o o o o X o o
. o o o X X o o X X o o o
.
(End)
MATHEMATICA
Table[(9n^4+4n^3-n)/2, {n, 0, 30}] (* or *) LinearRecurrence[{5, -10, 10, -5, 1}, {0, 6, 87, 417, 1278}, 30] (* Harvey P. Dale, May 26 2016 *)
PROG
(Magma) [(9*n^4+4*n^3-n)/2: n in [0..40]]; // Vincenzo Librandi, May 29 2016
(PARI) {a(n) = n*(9*n^3 +4*n^2 -1)/2}; \\ G. C. Greubel, May 17 2019
(Sage) [n*(9*n^3 +4*n^2 -1)/2 for n in (0..30)] # G. C. Greubel, May 17 2019
(GAP) List([0..30], n-> n*(9*n^3 +4*n^2 -1)/2) # G. C. Greubel, May 17 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved