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.

A346504 G.f. A(x) satisfies: A(x) = 1 + x + x^3 * A(x)^2 / (1 - x).

Original entry on oeis.org

1, 1, 0, 1, 3, 4, 6, 14, 28, 49, 95, 196, 386, 754, 1524, 3102, 6258, 12700, 26032, 53440, 109772, 226457, 468863, 972300, 2020274, 4208530, 8784556, 18365322, 38461110, 80682740, 169501696, 356579216, 751138916, 1584281062, 3345404514, 7072055268, 14965933024, 31702754496
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 21 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 37; A[] = 0; Do[A[x] = 1 + x + x^3 A[x]^2/(1 - x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = a[1] = 1; a[2] = 0; a[n_] := a[n] = a[n - 1] + Sum[a[k] a[n - k - 3], {k, 0, n - 3}]; Table[a[n], {n, 0, 37}]
    CoefficientList[Series[(1 - x)*(1 - Sqrt[(1 - x - 4*x^3 - 4*x^4)/(1 - x)]) / (2*x^3), {x, 0, 40}], x] (* Vaclav Kotesovec, Sep 27 2023 *)

Formula

a(0) = a(1) = 1, a(2) = 0; a(n) = a(n-1) + Sum_{k=0..n-3} a(k) * a(n-k-3).
G.f.: (1-x)*(1 - sqrt((1 - x - 4*x^3 - 4*x^4)/(1-x))) / (2*x^3). - Vaclav Kotesovec, Sep 27 2023

A273344 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k levels. A level in a bargraph is a maximal sequence of two or more adjacent horizontal steps; it is preceded and followed by either an up step or a down step.

Original entry on oeis.org

1, 1, 1, 3, 2, 6, 7, 14, 19, 2, 33, 53, 11, 79, 148, 47, 1, 194, 409, 181, 10, 482, 1137, 639, 69, 1214, 3159, 2166, 360, 6, 3090, 8793, 7110, 1646, 66, 7936, 24515, 22831, 6868, 490, 2, 20544, 68443, 72145, 26893, 2918, 44, 53545, 191367, 225138, 100598, 15085, 486, 140399, 535762, 695798, 363360, 70847, 3825
Offset: 2

Views

Author

Emeric Deutsch, May 21 2016

Keywords

Comments

Sum of entries in row n = A082582(n).

Examples

			Row 4 is 3,2 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] having 1, 0, 0, 1, 0 levels, respectively.
Triangle starts
1;
1,1;
3,2;
6,7;
14,19,2.
		

Crossrefs

Programs

  • Maple
    G := (1-2*z-z^2+2*z^3-2*t*z^3-sqrt((1-z)*(1-3*z-z^2+3*z^3-4*t*z^3+4*z^4 -4*t*z^4-4*z^5+8*t*z^5-4*t^2*z^5)))/(2*z*(1-z+t*z)): Gser := simplify(series(G, z = 0, 25)): for n from 2 to 20 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 2 to 20 do seq(coeff(P[n], t, j), j = 0 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t, w) option remember; expand(
          `if`(n=0, (1-t), `if`(t<0, 0, b(n-1, y+1, 1, 0))+
          `if`(t>0 or y<2, 0, b(n, y-1, -1, 0))+ `if`(y<1, 0,
          `if`(w=1, z, 1)*b(n-1, y, 0, min(w+1, 2)))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$3)):
    seq(T(n), n=2..20);  # Alois P. Heinz, Jun 04 2016
  • Mathematica
    b[n_, y_, t_, w_] := b[n, y, t, w] = Expand[If[n == 0, (1 - t), If[t < 0, 0, b[n - 1, y + 1, 1, 0]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1, 0]] + If[y < 1, 0, If[w == 1, z, 1]*b[n - 1, y, 0, Min[w + 1, 2]]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[n, 0, 0, 0]]; Table[T[n], {n, 2, 20}] // Flatten (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)

Formula

T(n,0) = A025243(n+1).
Sum(k*T(n,k), k>=1) = A273345(n).
G.f.: G(t,z) = (1-2z-z^2+2z^3-2tz^3-sqrt((1-z)(1-3z-z^2+3z^3-4tz^3+4z^4-4tz^4-4z^5+8tz^5-4t^2z^5)))/(2z(1-z+tz)); z marks semiperimeter, t marks levels. See eq. (2.4) in the Blecher et al. Ars. Math. Contemp. reference (set x = z, y = z, w = t).

A273349 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k level steps (n>=2,k>=0). A level step in a bargraph is any pair of adjacent horizontal steps at the same height.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 6, 5, 1, 1, 14, 12, 7, 1, 1, 33, 34, 19, 9, 1, 1, 79, 95, 61, 27, 11, 1, 1, 194, 261, 193, 95, 36, 13, 1, 1, 482, 728, 585, 333, 136, 46, 15, 1, 1, 1214, 2022, 1797, 1091, 521, 184, 57, 17, 1, 1, 3090, 5634, 5439, 3629, 1821, 763, 239, 69, 19, 1, 1
Offset: 2

Views

Author

Emeric Deutsch, Jun 03 2016

Keywords

Comments

Number of entries in row n is n-1.
Sum of entries in row n = A082582(n).
T(n,0) = A025243(n+1).
Sum(k*T(n,k),k>=0) = A271943(n-1). This implies that the number of level steps in all bargraphs of semiperimeter n is equal to the sum of the widths of all bargraphs of semiperimeter n-1.

Examples

			Row 4 is 3,1,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] which, clearly, have 2,0,0,1,0 level steps.
Triangle starts
1;
1,1;
3,1,1;
6,5,1,1;
14,12,7,1,1
		

References

  • A. Blecher, C. Brennan, and A. Knopfmacher, Combinatorial parameters in bargraphs (preprint).

Crossrefs

Programs

  • Maple
    G:=((1-t*z-z-2*z^2+t*z^2-sqrt((1-t*z-z-2*z^2+t*z^2)^2-4*z^3))*(1/2))/z: Gser:=simplify(series(G,z=0,21)): for n from 2 to 18 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 2 to 18 do seq(coeff(P[n], t, j), j = 0 .. n-2) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t, w) option remember; expand(
          `if`(n=0, (1-t), `if`(t<0, 0, b(n-1, y+1, 1, 0))+
          `if`(t>0 or y<2, 0, b(n, y-1, -1, 0))+ `if`(y<1, 0,
          `if`(w=1, z, 1)*b(n-1, y, 0, min(w+1, 1)))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$3)):
    seq(T(n), n=2..18);  # Alois P. Heinz, Jun 04 2016
  • Mathematica
    b[n_, y_, t_, w_] := b[n, y, t, w] = Expand[If[n == 0, 1 - t, If[t < 0, 0, b[n - 1, y + 1, 1, 0]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1, 0]] + If[y < 1, 0, If[w == 1, z, 1]*b[n - 1, y, 0, Min[w + 1, 1]]]]];
    T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][ b[n, 0, 0, 0]];
    Table[T[n], {n, 2, 18}] // Flatten (* Jean-François Alcover, Jul 29 2016, after Alois P. Heinz *)

Formula

G.f.: G(t,z) = (1-tz-z-2z^2+tz^2-sqrt((1-z)(1-z-2tz-4z^2+t^2z^2+2tz^2-4z^3-t^2z^3+4tz^3)))/(2z) (z marks semiperimeter, t marks level steps; obtained from the expression for F in the Blecher et al. reference (Section 7.1) by setting x=z, y=z, w=t).

A126191 Triangle read by rows: number of 0-1-2 trees (i.e., ordered trees with vertices of outdegrees 0, 1, or 2) with n edges and exactly k vertices that have 2 children, both being leaves (n >= 0, 0 <= k <= floor((n+2)/4)).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 6, 3, 14, 7, 33, 17, 1, 79, 45, 3, 194, 117, 12, 482, 313, 40, 1214, 843, 129, 2, 3090, 2287, 411, 10, 7936, 6247, 1278, 50, 20544, 17139, 3942, 210, 53545, 47219, 12045, 820, 5, 140399, 130527, 36559, 3052, 35, 370098, 361851, 110388
Offset: 0

Views

Author

Emeric Deutsch, Dec 27 2006

Keywords

Comments

Row n has 1 + floor((n+2)/4) terms.
Row sums yield the Motzkin numbers (A001006).
T(n,0) = A025243(n+2) (n >= 1).
Sum_{k=0..floor((n+2)/4)} k*T(n,k) = A002426(n-2) (the central trinomial coefficients).

Crossrefs

Programs

  • Maple
    G:=(1-z-sqrt(1-2*z-3*z^2+4*z^4-4*z^4*t))/2/z^2: Gser:=simplify(series(G,z=0,21)): for n from 0 to 17 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 0 to 17 do seq(coeff(P[n],t,j),j=0..floor((n+2)/4)) od; # yields sequence in triangular form

Formula

G.f.: G = G(t,z) satisfies G = 1 + zG + z^2*(G^2 - 1 + t).
Showing 1-4 of 4 results.