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.

Previous Showing 11-20 of 27 results. Next

A026392 T(n,[ n/2 ]), where T is the array in A026386.

Original entry on oeis.org

1, 2, 4, 8, 17, 34, 75, 150, 339, 678, 1558, 3116, 7247, 14494, 34016, 68032, 160795, 321590, 764388, 1528776, 3650571, 7301142, 17501619, 35003238, 84179877, 168359754, 406020930, 812041860, 1963073865, 3926147730
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

Conjecture: (n+1)*a(n) +2*(n-1)*a(n-1) +2*(-3*n+1)*a(n-2) +4*(-3*n+7)*a(n-3) +5*(n-3)*a(n-4) +10*(n-5)*a(n-5)=0. - R. J. Mathar, Feb 10 2015

Extensions

Offset corrected. R. J. Mathar, Feb 10 2015

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

A171651 Triangle T, read by rows : T(n,k) = A007318(n,k)*A005773(n+1-k).

Original entry on oeis.org

1, 2, 1, 5, 4, 1, 13, 15, 6, 1, 35, 52, 30, 8, 1, 96, 175, 130, 50, 10, 1, 267, 576, 525, 260, 75, 12, 1, 750, 1869, 2016, 1225, 455, 105, 14, 1, 2123, 6000, 7476, 5376, 2450, 728, 140, 16, 1, 6046, 19107, 27000, 22428, 12096, 4410, 1092, 180, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 14 2009

Keywords

Examples

			Triangle begins:
   1;
   2,   1;
   5,   4,  1;
  13,  15,  6, 1;
  35,  52, 30, 8, 1;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(u, d, t) option remember; `if`(u=0 and d=0, 1/2,
          expand(`if`(u=0, 0, b(u-1, d, 2)*`if`(t=3, x, 1))
          +`if`(d=0, 0, b(u, d-1, `if`(t=2, 3, 1)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n+1$2, 1)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Apr 29 2015
    # second program:
    A171651:= (n, k)-> binomial(n,k)*add((-1)^(n-k-j)*binomial(n-k,j)*binomial(2*j+1,j+1),j=0..n-k): seq(print(seq(A171651(n, k), k=0..n)), n=0..9);  # Mélika Tebni, Dec 16 2023
  • Mathematica
    b[u_, d_, t_] := b[u, d, t] = If[u == 0 && d == 0, 1/2, Expand[If[u == 0, 0, b[u-1, d, 2]*If[t == 3, x, 1]] + If[d == 0, 0, b[u, d-1, If[t == 2, 3, 1]]]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n+1, n+1, 1] ];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 21 2016, after Alois P. Heinz *)

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A168491(n), A099323(n), A001405(n), A005773(n+1), A001700(n), A026378(n+1), A005573(n), A122898(n) for x = -3, -2, -1, 0, 1, 2, 3, 4 respectively.
E.g.f. of column k: exp(x)*(BesselI(0,2*x)+BesselI(1,2*x))*x^k / k!. - Mélika Tebni, Dec 16 2023

Extensions

Corrected by Philippe Deléham, Dec 18 2009

A026387 a(n) = number of integer strings s(0),...,s(n) counted by array T in A026386 that have s(n)=0; also a(n) = T(2n,n).

Original entry on oeis.org

2, 8, 34, 150, 678, 3116, 14494, 68032, 321590, 1528776, 7301142, 35003238, 168359754, 812041860, 3926147730, 19022666310, 92338836390, 448968093320, 2186194166950, 10659569748370, 52037098259090, 254308709196660
Offset: 0

Views

Author

Keywords

Crossrefs

Essentially the same as A085362.
Cf. A026378.

Formula

a(n) = A085362(n+1), n >= 0. - Hartmut F. W. Hoft, Jul 07 2024

A129164 Sum of pyramid weights in all skew Dyck paths of semilength n.

Original entry on oeis.org

1, 5, 22, 97, 436, 1994, 9241, 43257, 204052, 968440, 4619011, 22120630, 106300507, 512321437, 2475395302, 11986728457, 58156146652, 282640193312, 1375737276787, 6705522150972, 32724071280517, 159878425878847, 781910419686412, 3827639591654862, 18753350784435811
Offset: 1

Views

Author

Emeric Deutsch, Apr 03 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 the path is defined to be the number of its steps. A pyramid in a skew Dyck word (path) is a factor of the form U^h D^h, h being the height of the pyramid. A pyramid in a skew Dyck word w is maximal if, as a factor in w, it is not immediately preceded by a U and immediately followed by a D. The pyramid weight of a skew Dyck path (word) is the sum of the heights of its maximal pyramids.

Examples

			a(2)=5 because the pyramid weights of the paths (UD)(UD), (UUDD) and U(UD)L are 2, 2 and 1, respectively (the maximal pyramids are shown between parentheses).
		

Crossrefs

Programs

  • Maple
    G:=(1/sqrt(1-6*z+5*z^2)-1/(1-z))/2: Gser:=series(G,z=0,30): seq(coeff(Gser,z,n),n=1..26);
  • Mathematica
    Rest[CoefficientList[Series[(1/Sqrt[1-6*x+5*x^2]-1/(1-x))/2, {x, 0, 20}], x]] (* Vaclav Kotesovec, Oct 20 2012 *)
    a[n_] := (Hypergeometric2F1[1/2, -n, 1, -4]-1)/2; Array[a, 25] (* Jean-François Alcover, Oct 11 2016, after Vladimir Kruchinin *)
  • Maxima
    a(n):=n*sum(sum((binomial(-m+2*k-1,k-1)*binomial(n-1,k-1))/k,k,m,n), m,1,n); /* Vladimir Kruchinin, Oct 07 2011 */
    
  • Maxima
    a(n):=sum(binomial(n,k)*binomial(2*k,k),k,1,n)/2; /* Vladimir Kruchinin, Oct 11 2016 */
    
  • Sage
    A129164 = lambda n: n*hypergeometric([1, 3/2, 1-n], [2, 2], -4)
    [simplify(A129164(n)) for n in (1..25)] # Peter Luschny, Sep 16 2014

Formula

a(n) = Sum_{k=1..n} k*A129163(n,k).
Partial sums of A026378.
G.f. = [1/sqrt(1-6*z+5*z^2)-1/(1-z)]/2.
a(n) = n*Sum_(m=1..n, Sum_(k=m..n,(binomial(-m+2*k-1,k-1)*binomial(n-1,k-1))/k)). - Vladimir Kruchinin, Oct 07 2011
Recurrence: n*a(n) = (7*n-4)*a(n-1) - (11*n-14)*a(n-2) + 5*(n-2)*a(n-3). - Vaclav Kotesovec, Oct 20 2012
a(n) ~ 5^(n+1/2)/(4*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 20 2012
a(n) = n*hypergeometric([1, 3/2, 1-n], [2, 2], -4). - Peter Luschny, Sep 16 2014
a(n) = Sum_{k=1..n} (binomial(n,k)*binomial(2*k,k))/2. - Vladimir Kruchinin, Oct 11 2016

A171224 Riordan array (f(x),x*f(x)) where f(x) is the g.f. of A117641.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 3, 2, 0, 1, 11, 6, 3, 0, 1, 42, 23, 9, 4, 0, 1, 167, 90, 36, 12, 5, 0, 1, 684, 365, 144, 50, 15, 6, 0, 1, 2867, 1518, 595, 204, 65, 18, 7, 0, 1, 12240, 6441, 2511, 858, 270, 81, 21, 8, 0, 1, 53043, 27774, 10782, 3672, 1155, 342, 98, 24, 9, 0, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 05 2009

Keywords

Examples

			Triangle begins
    1;
    0,  1;
    1,  0,  1;
    3,  2,  0,  1;
   11,  6,  3,  0,  1;
   42, 23,  9,  4,  0,  1;
  167, 90, 36, 12,  5,  0,  1;
  ...
Production array begins
    0,  1;
    1,  0,  1;
    3,  1,  0,  1;
    9,  3,  1,  0,  1;
   27,  9,  3,  1,  0,  1;
   81, 27,  9,  3,  1,  0,  1;
  243, 81, 27,  9,  3,  1,  0,  1;
  ... - _Philippe Deléham_, Mar 04 2013
		

Crossrefs

Programs

  • Magma
    [[((k+1)/(n+1))*(&+[3^(n-k-2*j)*Binomial(n+1,j)*Binomial(n-k-j-1, n-k-2*j): j in [0..Floor((n-k)/2)]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Apr 04 2019
    
  • Mathematica
    T[n_, k_]:= (k+1)/(n+1)*Sum[3^(n-k-2*j)*Binomial[n+1,j]*Binomial[n-k-j-1, n-k-2*j], {j, 0, Floor[(n-k)/2]}]; Table[T[n, k], {n,0,10}, {k,0,n} ]//Flatten (* G. C. Greubel, Apr 04 2019 *)
  • Maxima
    T(n,k):=(k+1)/(n+1)*sum(3^(n-k-2*j)*binomial(n+1,j)*binomial(n-k-j-1,n-k-2*j),j,0,floor((n-k)/2)); /* Vladimir Kruchinin, Apr 04 2019 */
    
  • PARI
    {T(n,k) = ((k+1)/(n+1))*sum(j=0, floor((n-k)/2), 3^(n-k-2*j) *binomial(n+1,j)*binomial(n-k-j-1, n-k-2*j))}; \\ G. C. Greubel, Apr 04 2019
    
  • Sage
    [[((k+1)/(n+1))*sum(3^(n-k-2*j)*binomial(n+1,j)*binomial(n-k-j-1, n-k-2*j) for j in (0..floor((n-k)/2))) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Apr 04 2019

Formula

Sum_{k=0..n} T(n,k)*x^k = A117641(n), A033321(n), A007317(n+1), A002212(n+1), A026378(n+1) for x = 0, 1, 2, 3, 4 respectively.
Triangle equals B*A065600*B^(-1) = B^2*A097609*B^(-2) = B^3*A053121*B^(-3), product considered as infinite lower triangular arrays and B = A007318. - Philippe Deléham, Dec 08 2009
T(n,k) = T(n-1,k-1) + Sum_{i>=0} T(n-1,k+1+i)*3^i, T(0,0) = 1. - Philippe Deléham, Feb 23 2012
T(n,k) = ((k+1)/(n+1))*Sum_{j=0..floor((n-k)/2)} 3^(n-k-2*j)*C(n+1,j)*C(n-k-j-1,n-k-2*j). - Vladimir Kruchinin, Apr 04 2019

Extensions

Terms a(55) onward added by G. C. Greubel, Apr 04 2019

A364647 G.f. satisfies A(x) = 1/(1 - 5*x) - x*A(x)^3.

Original entry on oeis.org

1, 4, 13, 38, 135, 677, 3538, 15868, 63313, 268430, 1348190, 7038185, 33328258, 144159428, 642323050, 3213846836, 16700677289, 80935833050, 363843867265, 1660048399600, 8276473557820, 42830085070355, 210286731046320, 967456811687945, 4476690297795850
Offset: 0

Views

Author

Seiichi Manyama, Jul 31 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n, (-1)^k*5^(n-k)*binomial(n+k, 2*k)*binomial(3*k, k)/(2*k+1));

Formula

a(n) = Sum_{k=0..n} (-1)^k * 5^(n-k) * binomial(n+k,2*k) * binomial(3*k,k) / (2*k+1).

A026380 a(n) = T(n,[ n/2 ]), where T is the array in A026374.

Original entry on oeis.org

1, 3, 4, 11, 17, 45, 75, 195, 339, 873, 1558, 3989, 7247, 18483, 34016, 86515, 160795, 408105, 764388, 1936881, 3650571, 9238023, 17501619, 44241261, 84179877, 212601015, 406020930, 1024642875, 1963073865, 4950790605
Offset: 0

Views

Author

Keywords

Crossrefs

Formula

a(2n)=A026378(n+1), a(2n-1)=A026375(n). - Emeric Deutsch, Feb 18 2004
a(2n) = A026378(2n+1), a(2n+1) = A026375(n+1).
Davenport et al. give a g.f.

A084536 Triangular array related to Motzkin triangle A026300.

Original entry on oeis.org

1, 1, 3, 1, 6, 10, 1, 9, 29, 36, 1, 12, 57, 132, 137, 1, 15, 94, 315, 590, 543, 1, 18, 140, 612, 1629, 2628, 2219, 1, 21, 195, 1050, 3605, 8127, 11732, 9285, 1, 24, 259, 1656, 6950, 19992, 39718, 52608, 39587, 1, 27, 332, 2457, 12177, 42498, 106644, 191754
Offset: 0

Views

Author

N. J. A. Sloane, Jun 29 2003

Keywords

Comments

Reversal of A091965. Row sums give A026378. - Philippe Deléham, Mar 23 2007

Examples

			Triangle begins
  1;
  1,   3;
  1,   6,  10;
  1,   9,  29,  36;
  1,  12,  57, 132, 137; ...
		

References

  • A. Nkwanta, Lattice paths and RNA secondary structures, in African Americans in Mathematics, ed. N. Dean, Amer. Math. Soc., 1997, pp. 137-147.

Formula

T(n,n) = A002212(n+1). - Philippe Deléham, Mar 23 2007

Extensions

More terms from Philippe Deléham, Mar 23 2007

A124431 a(n) = Sum_{k=0..n} 2^k*C([(n+k)/2],k)*C([(n+k+1)/2],k) where [x]=floor(x).

Original entry on oeis.org

1, 3, 9, 29, 97, 331, 1145, 4001, 14089, 49915, 177713, 635293, 2278841, 8198227, 29567729, 106872961, 387038993, 1404052659, 5101219929, 18559193245, 67605310097, 246541193883, 899999057385, 3288522934433, 12026324883865
Offset: 0

Views

Author

Paul D. Hanna, Oct 31 2006

Keywords

Comments

This is the inverse Motzkin transform of A026378 assuming offset 1 here. - R. J. Mathar, Jul 07 2009
Hankel transform is Somos-4 variant A162547. - Paul Barry, Jan 09 2011
a(n) is the number of peakless Motzkin paths of length n in which the (1,0)-steps at level 0 come in 3 colors and those at a higher level come in 2 colors. Example: a(3)=29 because, denoting U=(1,1), H=(1,0), and D=(1,-1), we have 3^3 = 27 paths of shape HHH and 2 paths of shape UHD. - Emeric Deutsch, May 03 2011
Conjecture: (n+1)*a(n) -2*(2*n+1)*a(n-1) +2*(n-1)*a(n-2) +2*(5-2*n)*a(n-3) +(n-3)*a(n-4) =0. - R. J. Mathar, Aug 09 2012

Examples

			G.f. = 1 + 3*x + 9*x^2 + 29*x^3 + 97*x^4 + 331*x^5 + 1145*x^6 + 4001*x^7 + ...
		

Crossrefs

Cf. A124428.

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!( (Sqrt((1+x^2)/(1-4*x+x^2)) -1)/(2*x) )); // G. C. Greubel, Feb 26 2019
    
  • Mathematica
    Table[Sum[2^k Binomial[Floor[(n+k)/2],k]Binomial[Floor[(n+k+1)/2],k],{k,0,n}],{n,0,30}] (* Harvey P. Dale, May 20 2012 *)
    CoefficientList[Series[(Sqrt[(1+x^2)/(1-4*x+x^2)] -1)/(2*x), {x,0,30}],x] (* G. C. Greubel, Feb 26 2019 *)
  • PARI
    a(n)=sum(k=0,n,2^k*binomial((n+k)\2,k)*binomial((n+k+1)\2,k))
    
  • PARI
    my(x='x+O('x^30)); Vec((sqrt((1+x^2)/(1-4*x+x^2)) -1)/(2*x)) \\ G. C. Greubel, Feb 26 2019
    
  • Sage
    ((sqrt((1+x^2)/(1-4*x+x^2)) -1)/(2*x)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 26 2019

Formula

a(n) = Sum_{k=0..n} 2^k*A124428(n+k,k).
G.f.: (((x^2+1)*(1-4*x+x^2))^(1/2) - (1-4*x+x^2))/(2*x*(1-4*x+x^2)). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 12 2009
G.f.: (1/(1-4*x+x^2))*c(-x/(1-4*x+x^2)), c(x) the g.f. of A000108. - Paul Barry, Jan 09 2011
G.f.: G(0)/(2*x) - 1/(2*x), where G(k)= 1 + 4*x*(4*k+1)/( (1+x^2)*(4*k+2) - x*(1+x^2)*(4*k+2)*(4*k+3)/(x*(4*k+3) + (1+x^2)*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 26 2013
a(n) ~ sqrt(14*sqrt(3)-24) * (2+sqrt(3))^(n+2) / (2*sqrt(3*Pi*n)). - Vaclav Kotesovec, Feb 03 2014
0 = a(n)*(+a(n+1) - 6*a(n+2) + 6*a(n+3) - 18*a(n+4) + 5*a(n+5)) + a(n+1)*(-2*a(n+1) + 14*a(n+2) - 10*a(n+3) + 61*a(n+4) - 18*a(n+5)) + a(n+2)*(+4*a(n+2) - 28*a(n+3) - 10*a(n+4) + 6*a(n+5)) + a(n+3)*(+4*a(n+3) + 14*a(n+4) - 6*a(n+5)) + a(n+4)*(-2*a(n+4) + a(n+5)) if n>=0. - Michael Somos, Aug 06 2014
Conjecture: +(n+1)*a(n) +2*(-2*n-1)*a(n-1) +2*(n-1)*a(n-2) +2*(-2*n+5)*a(n-3) +(n-3)*a(n-4)=0. - R. J. Mathar, Jun 17 2016
Previous Showing 11-20 of 27 results. Next