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.

Showing 1-4 of 4 results.

A002212 Number of restricted hexagonal polyominoes with n cells.

Original entry on oeis.org

1, 1, 3, 10, 36, 137, 543, 2219, 9285, 39587, 171369, 751236, 3328218, 14878455, 67030785, 304036170, 1387247580, 6363044315, 29323149825, 135700543190, 630375241380, 2938391049395, 13739779184085, 64430797069375, 302934667061301, 1427763630578197
Offset: 0

Views

Author

N. J. A. Sloane, Ronald C. Read

Keywords

Comments

Number of Schroeder paths (i.e., consisting of steps U=(1,1), D=(1,-1), H=(2,0) and never going below the x-axis) from (0,0) to (2n,0) with no peaks at odd level. Example: a(2)=3 because we have UUDD, UHD and HH. - Emeric Deutsch, Dec 06 2003
Number of 3-Motzkin paths of length n-1 (i.e., lattice paths from (0,0) to (n-1,0) that do not go below the line y=0 and consist of steps U=(1,1), D=(1,-1) and three types of steps H=(1,0)). Example: a(4)=36 because we have 27 HHH paths, 3 HUD paths, 3 UHD paths and 3 UDH paths. - Emeric Deutsch, Jan 22 2004
Number of rooted, planar trees having edges weighted by strictly positive integers (multi-trees) with weight-sum n. - Roland Bacher, Feb 28 2005
Number of skew Dyck paths of semilength n. A skew Dyck path is a path in the first quadrant which begins at the origin, ends on the x-axis, consists of steps U=(1,1)(up), D=(1,-1)(down) and L=(-1,-1)(left) so that up and left steps do not overlap. The length of the path is defined to be the number of its steps. - Emeric Deutsch, May 10 2007
Equivalently, number of self-avoiding paths of semilength n in the first quadrant beginning at the origin, staying weakly above the diagonal, ending on the diagonal, and consisting of steps r=(+1,0) (right), U=(0,+1) (up), and D=(0,-1) (down). Self-avoidance implies that factors UD and DU and steps D reaching the diagonal before the end are forbidden. The a(3) = 10 such paths are UrUrUr, UrUUrD, UrUUrr, UUrrUr, UUrUrD, UUrUrr, UUUDrD, UUUrDD, UUUrrD, and UUUrrr. - Joerg Arndt, Jan 15 2024
Hankel transform of [1,3,10,36,137,543,...] is A000012 = [1,1,1,1,...]. - Philippe Deléham, Oct 24 2007
From Gary W. Adamson, May 17 2009: (Start)
Convolved with A026375, (1, 3, 11, 45, 195, ...) = A026378: (1, 4, 17, 75, ...)
(1, 3, 10, 36, 137, ...) convolved with A026375 = A026376: (1, 6, 30, 144, ...).
Starting (1, 3, 10, 36, ...) = INVERT transform of A007317: (1, 2, 5, 15, 51, ...). (End)
Binomial transform of A032357. - Philippe Deléham, Sep 17 2009
a(n) = number of rooted trees with n vertices in which each vertex has at most 2 children and in case a vertex has exactly one child, it is labeled left, middle or right. These are the hex trees of the Deutsch, Munarini, Rinaldi link. This interpretation yields the second MATHEMATICA recurrence below. - David Callan, Oct 14 2012
The left shift (1,3,10,36,...) of this sequence is the binomial transform of the left-shifted Catalan numbers (1,2,5,14,...). Example: 36 =1*14 + 3*5 + 3*2 + 1*1. - David Callan, Feb 01 2014
Number of Schroeder paths from (0,0) to (2n,0) with no level steps H=(2,0) at even level. Example: a(2)=3 because we have UUDD, UHD and UDUD. - José Luis Ramírez Ramírez, Apr 27 2015
This is the Riordan transform with the Riordan matrix A097805 (of the associated type) of the Catalan sequence A000108. See a Feb 17 2017 comment in A097805. - Wolfdieter Lang, Feb 17 2017
a(n) is the number of parking functions of size n avoiding the patterns 132 and 231. - Lara Pudwell, Apr 10 2023

Examples

			G.f. = 1 + x + 3*x^2 + 10*x^3 + 36*x^4 + 137*x^5 + 543*x^6 + 2219*x^7 + 9285*x^8 + ...
		

References

  • J. Brunvoll, B. N. Cyvin, and S. J. Cyvin, Studies of some chemically relevant polygonal systems: mono-q-polyhexes, ACH Models in Chem., 133 (3) (1996), 277-298, Eq 14.
  • S. J. Cyvin, J. Brunvoll, G. Xiaofeng, and Z. Fuji, Number of perifusenes with one internal vertex, Rev. Roumaine Chem., 38(1) (1993), 65-78.
  • 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

First differences of A007317.
Row sums of triangle A104259.

Programs

  • Magma
    I:= [1,3]; [1] cat [n le 2 select I[n]  else ((6*n-3)*Self(n-1)-5*(n-2)*Self(n-2)) div (n+1): n in [1..30]]; // Vincenzo Librandi, Jun 15 2015
  • Maple
    t1 := series(1+ (1-3*x-(1-x)^(1/2)*(1-5*x)^(1/2))/(2*x), x, 50):
    A002212_list := len -> seq(coeff(t1,x,n),n=0..len): A002212_list(40);
    a[0] := 1: a[1] := 1: for n from 2 to 50 do a[n] := (3*(2*n-1)*a[n-1]-5*(n-2)*a[n-2])/(n+1) od: print(convert(a,list)); # Zerinvary Lajos, Jan 01 2007
    a := n -> `if`(n=0,1,simplify(GegenbauerC(n-1, -n, -3/2)/n)):
    seq(a(n), n=0..23); # Peter Luschny, May 09 2016
  • Mathematica
    InverseSeries[Series[(y)/(1+3*y+y^2), {y, 0, 24}], x] (* then A(x)=1+y(x) *) (* Len Smiley, Apr 14 2000 *)
    (* faster *)
    a[0]=1;a[1]=1;
    a[n_]/;n>=2 := a[n] = a[n-1] +  Sum[a[i]a[n-1-i],{i,0,n-1}];
    Table[a[n],{n,0,14}] (* See COMMENTS above, [David Callan, Oct 14 2012] *)
    (* fastest *)
    s[0]=s[1]=1;
    s[n_]/;n>=2 := s[n] = (3(2n-1)s[n-1]-5(n-2)s[n-2])/(n+1);
    Table[s[n],{n,0,14 }] (* See Deutsch, Munarini, Rinaldi link, [David Callan, Oct 14 2012] *)
    (* 2nd fastest *)
    a[n_] := Hypergeometric2F1[3/2, 1-n, 3, -4]; a[0]=1; Table[a[n], {n, 0, 14}]  (* Jean-François Alcover, May 16 2013 *)
    CoefficientList[Series[(1 - x - Sqrt[1 - 6x + 5x^2])/(2x), {x, 0, 20}], x] (* Nikolaos Pantelidis, Jan 30 2023 *)
  • Maxima
    makelist(sum(binomial(n,k)*binomial(n-k,k)*3^(n-2*k)/(k+1),k,0,n/2),n,0,24); /* for a(n+1) */ /* Emanuele Munarini, May 18 2011 */
    
  • PARI
    {a(n) = polcoeff( (1 - x - sqrt(1 - 6*x + 5*x^2 + x^2 * O(x^n))) / 2, n+1)};
    
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( serreverse( x / (1 + 3*x + x^2) + x * O(x^n)), n))}; /* Michael Somos */
    
  • PARI
    my(N=66,x='x+O('x^N)); Vec((1 - x - sqrt(1-6*x+5*x^2))/(2*x)) \\ Joerg Arndt, Jan 13 2024
    
  • Sage
    def A002212():
        x, y, n = 1, 1, 1
        while True:
            yield x
            n += 1
            x, y = y, ((6*n - 3)*y - (5*n - 10)*x) / (n + 1)
    a = A002212()
    [next(a) for i in range(24)]  # Peter Luschny, Oct 12 2013
    

Formula

a(0)=1, for n > 0: a(n) = Sum_{j=0..n-1} Sum_{i=0..j} a(i)*a(j-i). G.f.: A(x) = 1 + x*A(x)^2/(1-x). - Mario Catalani (mario.catalani(AT)unito.it), Jun 19 2003
a(n) = Sum_{i=ceiling((n-1)/2)..n-1} (3^(2i+1-n)*binomial(n, i)*binomial(i, n-i-1))/n. - Emeric Deutsch, Jul 23 2002
a(n) = Sum_{k=1..n} binomial(2k, k)*binomial(n-1, k-1)/(k+1), i.e., binomial transform of the Catalan numbers 1, 2, 5, 14, 42, ... (A000108). a(n) = Sum_{k=0..floor((n-1)/2)} 3^(n-1-2*k)*binomial(2k, k)*binomial(n-1, 2k)/(k+1). - Emeric Deutsch, Aug 05 2002
D-finite with recurrence: a(1)=1, a(n) = (3(2n-1)*a(n-1)-5(n-2)*a(n-2))/(n+1) for n > 1. - Emeric Deutsch, Dec 18 2002
a(n) is asymptotic to c*5^n/n^(3/2) with c=0.63.... - Benoit Cloitre, Jun 23 2003
In closed form, c = (1/2)*sqrt(5/Pi) = 0.63078313050504... - Vaclav Kotesovec, Oct 04 2012
Reversion of Sum_{n>0} a(n)x^n = -Sum_{n>0} A001906(n)(-x)^n.
G.f. A(x) satisfies xA(x)^2 + (1-x)(1-A(x)) = 0.
G.f.: (1 - x - sqrt(1 - 6x + 5x^2))/(2x). For n > 1, a(n) = 3*a(n-1) + Sum_{k=1..n-2} a(k)*a(n-k-1). - John W. Layman, Feb 22 2001
The Hankel transform of this sequence gives A001519 = 1, 2, 5, 13, 34, 89, ... E.g., Det([1, 1, 3, 10, 36; 1, 3, 10, 36, 137; 3, 10, 36, 137, 543; 10, 36, 137, 543, 2219; 36, 137, 543, 2219, 9285 ])= 34. - Philippe Deléham, Jan 25 2004
a(m+n+1) = Sum_{k>=0} A091965(m, k)*A091965(n, k) = A091965(m+n, 0). - Philippe Deléham, Sep 14 2005
a(n+1) = Sum_{k=0..n} 2^(n-k)*M(k)*binomial(n,k), where M(k) = A001006(k) is the k-th Motzkin number (from here it follows that a(n+1) and M(n) have the same parity). - Emeric Deutsch, May 10 2007
a(n+1) = Sum_{k=0..n} A097610(n,k)*3^k. - Philippe Deléham, Oct 02 2007
G.f.: 1/(1-x/(1-x-x/(1-x/(1-x-x/(1-x/(1-x-x/(1-... (continued fraction). - Paul Barry, May 16 2009
G.f.: (1-x)/(1-2x-x^2/(1-3x-x^2/(1-3x-x^2/(1-3x-x^2/(1-3x-x^2/(1-.... (continued fraction). - Paul Barry, Oct 17 2009
G.f.: 1/(1-z/(1-z/(1-z/(...)))) where z=x/(1-x) (continued fraction); more generally g.f. C(x/(1-x)) where C(x) is the g.f. for the Catalan numbers (A000108). - Joerg Arndt, Mar 18 2011
a(n) = -5^(1/2)/(10*(n+1)) * (5*hypergeom([1/2, n], [1], 4/5) -3*hypergeom([1/2, n+1], [1], 4/5)) (for n>0). - Mark van Hoeij, Nov 12 2009
For n >= 1, a(n) = (1/(2*Pi))*Integral_{x=1..5} x^(n-1)*sqrt((x-1)*(5-x)) dx. - Groux Roland, Mar 16 2011
a(n+1) = [x^n](1-x^2)(1+3*x+x^2)^n. - Emanuele Munarini, May 18 2011
From Gary W. Adamson, Jul 21 2011: (Start)
a(n) = upper left term in M^(n-1), M = an infinite square production matrix as follows (with 3,2,2,2,... as the main diagonal):
3, 1, 0, 0, 0, 0, ...
1, 2, 1, 0, 0, 0, ...
1, 1, 2, 1, 0, 0, ...
1, 1, 1, 2, 1, 0, ...
1, 1, 1, 1, 2, 0, ...
...
Alternatively, let M = the previous matrix but change the 3 to a 2. Then a(n) = sum of top row terms of M^(n-1). (End)
a(n) = hypergeometric([1-n,3/2],[3],-4), for n>0. - Peter Luschny, Aug 15 2012
a(n) = GegenbauerC(n-1, -n, -3/2)/n for n >= 1. - Peter Luschny, May 09 2016
E.g.f.: 1 + Integral (exp(3*x) * BesselI(1,2*x) / x) dx. - Ilya Gutkovskiy, Jun 01 2020
G.f.: 1 + x/G(0) with G(k) = (1 - 3*x - x^2/G(k+1)) (continued fraction). - Nikolaos Pantelidis, Dec 12 2022
From Peter Bala, Feb 03 2024: (Start)
G.f.: 1 + x/(1 - x) * c(x/(1 - x))^2 = 1 + x/(1 - 5*x) * c(-x/(1 - 5*x))^2, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108.
a(n+1) = Sum_{k = 0..n} binomial(n, k)*Catalan(k+1).
a(n+1) = hypergeom([-n, 3/2], [3], -4).
a(n+1) = 5^n * Sum_{k = 0..n} (-5)^(-k)*binomial(n, k)*Catalan(k+1).
a(n+1) = 5^n * hypergeom([-n, 3/2], [3], 4/5). (End)

A045868 Expansion of g.f.: ((1 - x - sqrt(1-6*x+5*x^2))/(2*x))^2.

Original entry on oeis.org

1, 2, 7, 26, 101, 406, 1676, 7066, 30302, 131782, 579867, 2576982, 11550237, 52152330, 237005385, 1083211410, 4975796735, 22960105510, 106377393365, 494674698190, 2308015808015, 10801388134690, 50691017885290, 238503869991926, 1124828963516896, 5316520644648026, 25179670936870021
Offset: 0

Views

Author

Keywords

Comments

Convolution of A002212 with itself.
Number of skew Dyck paths of semilength n+1 starting with UU. A skew Dyck path is a path in the first quadrant which begins at the origin, ends on the x-axis, consists of steps U=(1,1)(up), D=(1,-1)(down) and L=(-1,-1)(left) so that up and left steps do not overlap. The length of the path is defined to be the number of its steps. Example: a(2)=7 because we have UUDDUD, UUDUDD, UUDUDL, UUUDDD, UUUDDL, UUUDLD and UUUDLL. - Emeric Deutsch, May 11 2007
a(n) is also the number of path-pairs (u,v) having the following six properties: 1) the lengths of u and v sum up to 2n, 2) u and v both start at (0,0), 3) (0,0) is the only vertex that u and v have in common, 4) the steps that u can make are (1,0), (0,1) and (0,-1), 5) the steps that v can make are (1,0), (-1,0) and (0,1), 6) if A and B are the termini of u and v, respectively, then B=A+(1,-1). - Svjetlan Feretic, Jun 09 2013

Crossrefs

Cf. A055450.
Essentially the first differences of A002212 and A025238.

Programs

  • Magma
    [n le 2 select n else (2*(3*n-2)*Self(n-1) - 5*(n-3)*Self(n-2))/(n+1): n in [1..30]]; // G. C. Greubel, Jan 12 2024
    
  • Maple
    a := n->(2/n)*sum(binomial(n,j)*binomial(2*j+1,j-1),j=1..n): 1,seq(a(n),n=1..22);
  • Mathematica
    a[n_] := 2*Hypergeometric2F1[ 5/2, 1-n, 4, -4]; a[0] = 1; Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Apr 30 2012, after Maple *)
  • PARI
    a(n)=polcoeff((1-x-sqrt(1-6*x+5*x^2+x^2*O(x^n)))^2/4,n+2)
    
  • PARI
    my(x='x+O('x^66)); Vec(((1-x-sqrt(1-6*x+5*x^2))/(2*x))^2) \\ Joerg Arndt, May 04 2013
    
  • SageMath
    def A045868(n): return 1 if n==0 else (2/n)*sum( binomial(n,j)*binomial(2*j+1,j-1) for j in range(1,n+1))
    [A045868(n) for n in range(31)] # G. C. Greubel, Jan 12 2024

Formula

a(n) = (2/n)*Sum_{j=1..n} binomial(n, j)*binomial(2j+1, j-1) for n >= 1.
a(n) = A055450(n, n-1).
D-finite with recurrence: (n+2)*a(n) = (6*n+2)*a(n-1) - (5*n-10)*a(n-2). - Vladeta Jovovic, Jul 16 2004
a(n) = 2*Hypergeometric2F1(5/2, 1-n, 4, -4). - Jean-François Alcover, Apr 30 2012
a(n) ~ 2*5^(n+1/2)/(sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 08 2012
G.f.: 1 - 1/x + Q(0)*(1-x)/x, where Q(k) = 1 + (4*k+1)*x/((1-x)*(k+1) - x*(1-x)*(2*k+2)*(4*k+3)/(x*(8*k+6)+(2*k+3)*(1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 14 2013
G.f.: 1/x - 1 - 2*(1-x)/x/( G(0) + 1), where G(k) = 1 + 2*x*(4*k+1)/( (2*k+1)*(1-x) - x*(1-x)*(2*k+1)*(4*k+3)/(x*(4*k+3) + (1-x)*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 24 2013

Extensions

More terms from Emeric Deutsch, May 11 2007

A126186 Triangle read by rows: T(n,k) is number of hex trees with n edges and level of first leaf (in the preorder traversal) equal to k (1 <= k <= n).

Original entry on oeis.org

3, 1, 9, 3, 6, 27, 10, 19, 27, 81, 36, 66, 90, 108, 243, 137, 245, 325, 378, 405, 729, 543, 954, 1242, 1416, 1485, 1458, 2187, 2219, 3848, 4944, 5563, 5760, 5589, 5103, 6561, 9285, 15942, 20286, 22620, 23235, 22410, 20412, 17496, 19683, 39587, 67442, 85194
Offset: 1

Views

Author

Emeric Deutsch, Dec 22 2006

Keywords

Comments

A hex tree is a rooted tree where each vertex has 0, 1, or 2 children and, when only one child is present, it is either a left child, or a middle child, or a right child (name due to an obvious bijection with certain tree-like polyhexes; see the Harary-Read reference).

Examples

			Triangle starts:
   3;
   1,   9;
   3,   6,  27;
  10,  19,  27,  81;
  36,  66,  90, 108, 243;
		

Crossrefs

Programs

  • Maple
    G:=2/(2-t-3*t*z+t*sqrt(1-6*z+5*z^2))-1: Gser:=simplify(series(G,z=0,14)): for n from 1 to 10 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 1 to 10 do seq(coeff(P[n],t,k),k=1..n) od; # yields sequence in triangular form
  • Mathematica
    n = 10; g[t_, z_] = 2/(2 - t - 3t*z + t*Sqrt[1 - 6z + 5z^2]) - 1; Flatten[ Rest[ CoefficientList[#, t]] & /@ Rest[ CoefficientList[ Series[g[t, z], {z, 0, n}], z]]] (* Jean-François Alcover, Jul 22 2011, after g.f. *)

Formula

T(n,k) = [k/(n-k)] sum(3^(2k+2j-n)*binomial(n-k,j)*binomial(k-1+j,n-k-1-j), j=ceiling((n-2k)/2)..n-k) if 1<=k
G.f.: 2/[2-t-3tz+t*sqrt(1-6z+5z^2)]-1.
Sum of terms in row n = A002212(n+1).
T(n,1) = A025238(n); T(n,1) = A002212(n-1) for n>=2.
T(n,n) = 3^n = A000244(n); T(n,n-1) = (n-1)*3^(n-2) = A027471(n) (n>=2).
Sum_{k=1..n} k*T(n,k) = A126187(n).

A128888 Table with g.f. [1-x*n-sqrt(x^2*n^2-2*n*x+1+4*x^2-4*x)]/(2*x).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 3, 8, 10, 0, 1, 4, 15, 36, 36, 0, 1, 5, 24, 84, 176, 137, 0, 1, 6, 35, 160, 510, 912, 543, 0, 1, 7, 48, 270, 1152, 3279, 4928, 2219, 0, 1, 8, 63, 420, 2240, 8768, 21975, 27472, 9285, 0, 1, 9, 80, 616, 3936, 19605, 69504, 151905, 156864
Offset: 0

Author

R. J. Mathar, Apr 19 2007

Keywords

Comments

Column m=2 is essentially the same as A005563 or A067998 or A106230. Row n=1 is essentially the same as A025238 and A002212. The table is read along diagonals and provides the Taylor coefficient of x^m in column m. It also is the slice t=1 through the trivariate g.f. defined in A129170, which provides an implicit proof that all values are nonnegative.

Examples

			Table with rows n>=0 and columns m>=0 starts
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1, 1, 3, 10, 36, 137, 543, 2219, 9285, 39587, 171369, ...
1, 2, 8, 36, 176, 912, 4928, 27472, 156864, 912832, 5394176, ...
1, 3, 15, 84, 510, 3279, 21975, 151905, 1075425, 7758777, 56839965, ...
1, 4, 24, 160, 1152, 8768, 69504, 568064, 4753920, 40537088, 350963712, ...
1, 5, 35, 270, 2240, 19605, 178535, 1675495, 16095765, 157527055, 1565170985, ...
1, 6, 48, 420, 3936, 38832, 398208, 4205904, 45459840, 500488512, 5593373184, ...
1, 7, 63, 616, 6426, 70427, 801423, 9387917, 112501809, 1372985957, 17007257421,...
		

Crossrefs

Programs

  • Maple
    H := proc(n,x) (-x*n+1-(x^2*n^2-2*n*x+1+4*x^2-4*x)^(1/2))/(2*x) ; end: T := proc(n,m) coeftayl( H(n,x),x=0,m) ; end: for diag from 0 to 20 do for m from 0 to diag do n := diag-m ; printf("%d, ",T(n,m)) ; od ; od;
Showing 1-4 of 4 results.