OFFSET
1,2
COMMENTS
A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.
a(n) is also the number of segments on a centered hexagonal grid of size n.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Hex Number.
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = binomial(A003215(n-1), 2).
= binomial(3*n^2-3*n+1, 2).
= 3/2*n*(n-1)*(3*n^2-3*n+1).
= 9/2*n^4-9*n^3+6*n^2-3/2*n.
G.f.: -3*x^2*(7*x^2+22*x+7) / (x-1)^5. - Colin Barker, Apr 18 2014
Sum_{n>=2} 1/a(n) = 8/3 - 2*Pi*tanh(Pi/(2*sqrt(3)))/sqrt(3). - Amiram Eldar, Feb 17 2024
MAPLE
seq(binomial(3*n^2-3*n+1, 2), n=1..34); # Martin Renner, Apr 27 2014
op(PolynomialTools[CoefficientList](convert(series(-3*x^2*(7*x^2+22*x+7)/(x-1)^5, x=0, 35), polynom), x)[2..35]); # Martin Renner, Apr 27 2014
MATHEMATICA
CoefficientList[Series[-3 x^2 (7 x^2 + 22 x + 7)/(x - 1)^5, {x, 0, 50}], x] (* Vincenzo Librandi, Apr 19 2014 *)
PROG
(PARI) concat(0, Vec(-3*x^2*(7*x^2+22*x+7) / (x-1)^5 + O(x^100))) \\ Colin Barker, Apr 18 2014
(Magma) [Binomial(3*n^2-3*n+1, 2): n in [1..35]]; // Vincenzo Librandi, Apr 19 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Martin Renner, Apr 17 2014
EXTENSIONS
Typo in Mathematica program fixed by Martin Renner, Apr 27 2014
STATUS
approved