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-2 of 2 results.

A126182 Let P be Pascal's triangle A007318 and let N be Narayana's triangle A001263, both regarded as lower triangular matrices. Sequence gives triangle obtained from P*N, read by rows.

Original entry on oeis.org

1, 2, 1, 4, 5, 1, 8, 18, 9, 1, 16, 56, 50, 14, 1, 32, 160, 220, 110, 20, 1, 64, 432, 840, 645, 210, 27, 1, 128, 1120, 2912, 3150, 1575, 364, 35, 1, 256, 2816, 9408, 13552, 9534, 3388, 588, 44, 1, 512, 6912, 28800, 53088, 49644, 24822, 6636, 900, 54, 1
Offset: 0

Views

Author

Emeric Deutsch, Dec 19 2006, Mar 30 2007

Keywords

Comments

Also T(n,k) is number of hex trees with n edges and k left edges (0<=k<=n). 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 median child, or a right child (name due to an obvious bijection with certain tree-like polyhexes; see the Harary-Read reference). Accordingly, one can have left, vertical, or right edges.
Also (with a different offset) T(n,k) is the number of skew Dyck paths of semilength n and having k peaks (1<=k<=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. E.g., T(3,2)=5 because we have (UD)U(UD)D, (UD)U(UD)L, U(UD)D(UD), U(UD)(UD)D and U(UD)(UD)L (the peaks are shown between parentheses).
Sum of terms in row n = A002212(n+1). T(n,1) = A001793(n); T(n,2) = A006974(n-2); Sum_{k=0..n}kT(n,k) = A026379(n+1).
A126216 = N * P. - Gary W. Adamson, Nov 30 2007

Examples

			The triangle P begins
  1,
  1, 1
  1, 2, 1
  1, 3, 3, 1, ...
and T begins
  1,
  1,  1,
  1,  3,  1,
  1,  6,  6,  1,
  1, 10, 20, 10, 1, ...
The product P*T gives
   1,
   2,  1,
   4,  5,  1,
   8, 18,  9,  1,
  16, 56, 50, 14, 1, ...
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if k=0 then 2^n elif k<=n then binomial(n+1,k)*sum(binomial(k,n-k-j)*binomial(n+1-k,j)*2^j,j=n-2*k..n-k)/(n+1) else 0 fi end: for n from 0 to 10 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    t[n_, 0] := 2^n; t[n_, k_] := Binomial[n+1, k]*Sum[Binomial[k, n-k-j]*Binomial[n+1-k, j]*2^j, {j, n-2*k, n-k}]/(n+1); Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 12 2013 *)
    nmax = 10; n[x_, y_] := (1-x*(1+y) - Sqrt[(1-x*(1+y))^2 - 4*y*x^2])/(2*x); s = Series[(n[x/(1-x), y]-1)/x, {x, 0, nmax+1}, {y, 0, nmax+1}];t[n_, k_] := SeriesCoefficient[s, {x, 0, n}, {y, 0, k}]; Table[t[n, k], {n, 0, nmax}, {k, 1, n+1}] // Flatten (* Jean-François Alcover, Apr 16 2015, after Vladimir Kruchinin *)
  • PARI
    tabl(nn) = {mP = matrix(nn, nn, n, k, binomial(n-1, k-1)); mN = matrix(nn, nn, n, k, binomial(n-1, k-1) * binomial(n, k-1) / k); mprod = mP*mN; for (n=1, nn, for (k=1, n, print1(mprod[n, k], ", ");); print(););} \\ Michel Marcus, Apr 16 2015

Formula

T(n,k) = (1/(n+1))*binomial(n+1,k)*Sum_{j=n-2k..n-k}2^j*binomial(k,n-k-j)*binomial(n+1-k,j) if 0 < k <= n; T(n,0) = 2^n.
G.f. G=G(t,z) satisfies G = 1 + (t+2)*z*G + t*z^2*G^2.
E.g.f.: exp((t+2)*x)*BesselI_{1}(2*sqrt(t)*x)/(sqrt(t)*x). - Peter Luschny, Oct 29 2014
G.f.: N(x/(1-x),y)-1)/x, where N(x,y) is the g.f. of Narayana's triangle A001263. - Vladimir Kruchinin, Apr 06 2015.

Extensions

New definition in terms of P and N from Philippe Deléham, Jun 30 2007
Edited by N. J. A. Sloane, Jul 22 2007

A128743 Number of UU's (i.e., doublerises) in all skew Dyck paths of semilength n.

Original entry on oeis.org

0, 0, 2, 13, 69, 346, 1700, 8286, 40264, 195488, 949302, 4613025, 22436997, 109240038, 532410060, 2597468685, 12684628125, 62002335160, 303332650190, 1485213237135, 7277719953415, 35687662907750, 175120787451540
Offset: 0

Views

Author

Emeric Deutsch, Mar 30 2007

Keywords

Comments

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 a path is defined to be the number of its steps.

Examples

			a(2)=2 because the paths of semilength 2 are UDUD, UUDD and UUDL, having altogether 2 UU's.
		

Crossrefs

Cf. A128718.

Programs

  • Maple
    G:=(1-4*z+z^2+(z-1)*sqrt(1-6*z+5*z^2))/2/z/sqrt(1-6*z+5*z^2): Gser:=series(G,z=0,30): seq(coeff(Gser,z,n),n=0..25);
  • Mathematica
    CoefficientList[Series[(1-4*x+x^2+(x-1)*Sqrt[1-6*x+5*x^2])/2/x/Sqrt[1-6*x+5*x^2], {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    z='z+O('z^50); concat([0,0], Vec((1-4*z+z^2+(z-1)*sqrt(1-6*z+5*z^2))/(2*z*sqrt(1-6*z+5*z^2)))) \\ G. C. Greubel, Mar 20 2017

Formula

a(n) = Sum_{k=0..n-1} k*A128718(n,k).
G.f.: (1-4*z+z^2+(z-1)*sqrt(1-6*z+5*z^2))/(2*z*sqrt(1-6*z+5*z^2)).
a(n) ~ 3*5^(n-1/2)/(2*sqrt(Pi*n)). - Vaclav Kotesovec, Mar 20 2014
Conjecture: (n+1)*(n-2)^2*a(n) -(n-1)*(6*n^2-15*n+4)*a(n-1) +5*(n-2)*(n-1)^2*a(n-2)=0. - R. J. Mathar, Jun 17 2016
Conjecture verified using the differential equation 4*g(z)+(20*z^3+2*z^2-2*z)*g'(z)+(25*z^4-15*z^3)*g''(z)+(5*z^5-6*z^4+z^3)*g'''(z)=0 satisfied by the G.f. - Robert Israel, Dec 25 2017
Showing 1-2 of 2 results.