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.

A002898 Number of n-step closed paths on hexagonal lattice.

Original entry on oeis.org

1, 0, 6, 12, 90, 360, 2040, 10080, 54810, 290640, 1588356, 8676360, 47977776, 266378112, 1488801600, 8355739392, 47104393050, 266482019232, 1512589408044, 8610448069080, 49144928795820, 281164160225520, 1612061452900080, 9261029179733760, 53299490722049520
Offset: 0

Views

Author

Keywords

Comments

Also, number of closed paths of length n on the honeycomb tiling.
The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
From David Callan, Aug 25 2009: (Start)
a(n) = number of 2 X n matrices, entries from {1,2,3}, second row a (multiset) permutation of the first, with no constant columns. For example, a(2)=6 counts the matrices
1 2 1 3 2 1 2 3 3 1 3 2
2 1 3 1 1 2 3 2 1 3 2 3. (End)
Also, a(n) is the constant coefficient in the expansion of (x + 1/x + y + 1/y + x/y + y/x)^n. - Christopher J. Smyth, Sep 25 2018
a(n) is the constant term in the expansion of (-2 + (1 + x) * (1 + y) + (1 + 1/x) * (1 + 1/y))^n. - Seiichi Manyama, Oct 27 2019
a(n) is the number of paths from (0,0,0) to (n,n,n) using the six permutations of (0,1,2) as steps, i.e., the steps (0,1,2), (0,2,1), (1,0,2), (1,2,0), (2,0,1), and (2,1,0). - William J. Wang, Dec 07 2020

Examples

			O.g.f.: 1 + 6*x^2 + 12*x^3 + 90*x^4 + 360*x^5 + 2040*x^6 + ...
O.g.f.: 1 + 6*x^2*(1+2*x) + 90*x^4*(1+2*x)^2 + 1680*x^6*(1+2*x)^3 + 34650*x^8*(1+2*x)^4 + ... + A006480(n)*x^(2*n)*(1+2*x)^n + .... - _Paul D. Hanna_, Feb 26 2012
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000172, A006480, A337905-A337907, A094060, A002894 (returns square lattice), A002893 (honeycomb net).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [1, 0, 6][n+1], ((n-1)*
          n*a(n-1) +24*(n-1)^2*a(n-2) +36*(n-1)*(n-2)*a(n-3))/n^2)
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Dec 08 2020
  • Mathematica
    a[n_] := Sum[(-2)^(n-i)*Binomial[i, j]^3*Binomial[n, i], {i, 0, n}, {j, 0, i}]; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Dec 21 2011, after Vasu Tewari *)
  • PARI
    {a(n)=polcoeff(sum(m=0,n, (3*m)!/m!^3*x^(2*m)*(1+2*x+x*O(x^n))^m),n)} /* Paul D. Hanna, Feb 26 2012 */

Formula

D-finite with recurrence a(0) = 1, a(1) = 0, a(2) = 6, 36*(n+2)*(n+1)*a(n) +24*(n+2)^2*a(n+1) +(n+3)*(n+2)*a(n+2) -(n+3)^2*a(n+3) = 0.
E.g.f.: (BesselI(0,2*x))^3 + 2*Sum_{k>=1} (BesselI(k,2*x))^3. - Karol A. Penson Aug 18 2006
a(n) = Sum_{i=0..n} (-2)^(n-i)*binomial(n, i)*(Sum_{j=0..i} binomial(i, j)^3). - Vasu Tewari (vasu(AT)math.ubc.ca), Aug 04 2010
O.g.f.: (4/Pi)*EllipticK( 8*sqrt(z^3*(1+3*z))/(1-12*z^2+sqrt((1-6*z)*(1+2*z)^3)) ) / sqrt(2 - 24*z^2 + 2*sqrt((1-6*z)*(1+2*z)^3)). - Sergey Perepechko, Feb 08 2011
O.g.f.: Sum_{n>=0} (3*n)!/n!^3 * x^(2*n)*(1+2*x)^n. - Paul D. Hanna, Feb 26 2012
a(n) ~ sqrt(3)*6^n/(2*Pi*n). - Vaclav Kotesovec, Aug 13 2013
O.g.f.: 2F1(1/3,2/3; 1; 27*x^2*(1+2*x)). - R. J. Mathar, Sep 29 2020

Extensions

More terms from David Bloom, Mar 1997
Formula and further terms from Cyril Banderier, Oct 12 2000