A241219 Number of ways to choose two points on a centered hexagonal grid of size n.
0, 21, 171, 666, 1830, 4095, 8001, 14196, 23436, 36585, 54615, 78606, 109746, 149331, 198765, 259560, 333336, 421821, 526851, 650370, 794430, 961191, 1152921, 1371996, 1620900, 1902225, 2218671, 2573046, 2968266, 3407355, 3893445, 4429776, 5019696, 5666661
Offset: 1
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).
Programs
-
Magma
[Binomial(3*n^2-3*n+1, 2): n in [1..35]]; // Vincenzo Librandi, Apr 19 2014
-
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 *)
-
PARI
concat(0, Vec(-3*x^2*(7*x^2+22*x+7) / (x-1)^5 + O(x^100))) \\ Colin Barker, Apr 18 2014
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
Extensions
Typo in Mathematica program fixed by Martin Renner, Apr 27 2014
Comments