cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A241219 Number of ways to choose two points on a centered hexagonal grid of size n.

Original entry on oeis.org

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

Views

Author

Martin Renner, Apr 17 2014

Keywords

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.

Crossrefs

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