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 29 results. Next

A362549 Number of partitions of [n] whose blocks can be ordered such that the i-th block (except possibly the last) has at least i elements and no block j > i has an element smaller than the i-th smallest element of block i.

Original entry on oeis.org

1, 1, 2, 4, 9, 23, 64, 187, 566, 1777, 5820, 19944, 71343, 264719, 1011292, 3953381, 15756609, 63945484, 264384828, 1115246518, 4806957739, 21189601861, 95516470253, 439777682222, 2064164172616, 9853934668051, 47736608806520, 234235866539512, 1162618720397931
Offset: 0

Views

Author

Alois P. Heinz, Apr 24 2023

Keywords

Examples

			a(0) = 1: (), the empty partition.
a(1) = 1: 1.
a(2) = 2: 12, 1|2.
a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 9: 1234, 123|4, 124|3, 12|34, 134|2, 13|24, 14|23, 1|234, 1|23|4.
a(5) = 23: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 12|34|5, 1345|2, 134|25, 135|24, 13|245, 13|24|5, 145|23, 14|235, 14|23|5, 15|234, 1|2345, 1|234|5, 15|23|4, 1|235|4, 1|23|45.
a(6) = 64: 123456, 12345|6, 12346|5, 1234|56, 12356|4, ..., 1|2356|4, 1|235|46, 16|23|45, 1|236|45, 1|23|456.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n<=t, 1,
          add(b(j, t+1)*binomial(n-t, j), j=0..n-t))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..30);

A091187 Triangle read by rows: T(n,k) is the number of ordered trees with n edges and k branches.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 6, 4, 1, 4, 12, 16, 9, 1, 5, 20, 40, 45, 21, 1, 6, 30, 80, 135, 126, 51, 1, 7, 42, 140, 315, 441, 357, 127, 1, 8, 56, 224, 630, 1176, 1428, 1016, 323, 1, 9, 72, 336, 1134, 2646, 4284, 4572, 2907, 835, 1, 10, 90, 480, 1890, 5292, 10710, 15240, 14535, 8350, 2188
Offset: 1

Views

Author

Emeric Deutsch, Feb 23 2004

Keywords

Comments

Row sums are the Catalan numbers A000108. Diagonal entries are the Motzkin numbers A001006.
Equals binomial transform of an infinite lower triangular matrix with A001006 as the main diagonal and the rest zeros. [Gary W. Adamson, Dec 31 2008] [Corrected by Paul Barry, Mar 06 2011]
Reversal of A091869. Diagonal sums are A026418(n+2). [Paul Barry, Mar 06 2011]

Examples

			Triangle begins:
  1;
  1, 1;
  1, 2,  2;
  1, 3,  6,   4;
  1, 4, 12,  16,   9;
  1, 5, 20,  40,  45,  21;
  1, 6, 30,  80, 135, 126,  51;
  1, 7, 42, 140, 315, 441, 357, 127;
		

Crossrefs

Cf. A007476. [Gary W. Adamson, Dec 31 2008]

Programs

  • Maple
    M := n->sum(binomial(n+1,q)*binomial(n+1-q,q-1),q=0..ceil((n+1)/2))/(n+1): T := (n,k)->binomial(n-1,k-1)*M(k-1): seq(seq(T(n,k),k=1..n),n=1..13);
  • Mathematica
    (* m = MotzkinNumber *) m[0] = 1; m[n_] := m[n] = m[n - 1] + Sum[m[k]*m[n - 2 - k], {k, 0, n - 2}]; t[n_, k_] := m[k - 1]*Binomial[n - 1, k - 1]; Table[t[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 10 2013 *)

Formula

T(n,k) = M(k-1)*binomial(n-1, k-1), where M(k) = A001006(k) = (Sum_{q=0..ceiling((k+1)/2)} binomial(k+1, q)*binomial(k+1-q, q-1))/(k+1) is a Motzkin number.
G.f.: G = G(t,z) satisfies t*z*G^2 -(1 - z + t*z)*G + 1- z + t*z = 0.
From Paul Barry, Mar 06 2011: (Start)
G.f.: 1/(1-x-xy-x^2y^2/(1-x-xy-x^2y^2/(1-x-xy-x^2y^2/(1-... (continued fraction).
G.f.: (1-x(1+y)-sqrt(1-2x(1+y)+x^2(1+2y-3y^2)))/(2x^2*y^2).
E.g.f.: exp(x(1+y))*Bessel_I(1,2*x*y)/(x*y). (End)

A246118 T(n,k), for n,k >= 1, is the number of partitions of the set [n] into k blocks, where, if the blocks are arranged in order of their minimal element, the odd-indexed blocks are all singletons.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 11, 6, 1, 0, 1, 5, 26, 23, 9, 1, 0, 1, 6, 57, 72, 50, 12, 1, 0, 1, 7, 120, 201, 222, 86, 16, 1, 0, 1, 8, 247, 522, 867, 480, 150, 20, 1, 0, 1, 9, 502, 1291, 3123, 2307, 1080, 230, 25, 1, 0, 1, 10, 1013, 3084, 10660, 10044, 6627, 2000, 355, 30, 1
Offset: 1

Views

Author

Peter Bala, Aug 14 2014

Keywords

Comments

Unsigned matrix inverse of A246117. Analog of the Stirling numbers of the second kind, A048993.
This is the triangle of connection constants between the monomial polynomials x^n and the polynomial sequence [x, x^2, x^2*(x - 1), x^2*(x - 1)^2, x^2*(x - 1)^2*(x - 2), x^2*(x - 1)^2*(x - 2)^2, ...]. An example is given below.
Except for differences in offset, this triangle is the Galton array G(floor(k/2),1) in the notation of Neuwirth with inverse array G(-floor(n/2),1).
Essentially the same as A256161. - Peter Bala, Apr 14 2018
From Peter Bala, Feb 10 2020: (Start)
The sums S(n):= Sum_{k >= 0} k^n*(x^k/k!)^2, n = 2,3,4,..., can be expressed as a linear combination of the sums S(0) and S(1) with polynomial coefficients, namely, S(n) = E(n,x)*S(0) + (1/x)*O(n,x)* S(1,x), where E(n,x) = Sum_{k >= 1} T(n,2*k)*x^(2*k) and O(n,x) = Sum_{k >= 0} T(n,2*k+1)*x^(2*k+1) are the even and odd parts of the n-th row polynomial of this array. This result is the analog of the Dobinski formula Sum_{k >= 0} (k^n)*x^k/k! = exp(x)*Bell(n,x), where Bell(n,x) is the n-th row polynomial of A048993.
For example, for n = 6 we have S(6) = Sum_{k >= 1} k^6*(x^k/k!)^2 = (x^2 + 11*x^4 + x^6) * Sum_{k >= 0} (x^k/k!)^2 + (1/x)*(4*x^3 + 6*x^5) * Sum_{k >= 1} k*(x^k/k!)^2.
Setting x = 1 in the above result gives Sum_{k >= 0} k^n*/k!^2 = A000994(n)*Sum_{k >= 0} 1/k!^2 + A000995(n)*Sum_{k >= 1} k/k!^2. See A086880. (End)

Examples

			Triangle begins
n\k| 1    2    3    4    5    6    7    8
1  | 1
2  | 0    1
3  | 0    1    1
4  | 0    1    2    1
5  | 0    1    3    4    1
6  | 0    1    4   11    6    1
7  | 0    1    5   26   23    9    1
8  | 0    1    6   57   72   50   12    1
...
Connection constants: Row 6 = (0, 1, 4, 11, 6, 1) so
x^6 = x^2 + 4*x^2*(x - 1) + 11*x^2*(x - 1)^2 + 6*x^2*(x - 1)^2*(x - 2) + x^2*(x - 1)^2*(x - 2)^2.
Row 5 = [0, 1, 3, 4, 1]. There are 9 set partitions of {1,2,3,4,5} of the type described in the Name section:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Number of      Set partitions                Count
blocks
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
2                {1}{2,3,4,5}                   1
3           {1}{2,4,5}{3}, {1}{2,3,5}{4},
            {1}{2,3,4}{5}                       3
4          {1}{2,3}{4}{5}, {1}{2,4}{3}{5},
           {1}{2,5}{3}{4}, {1}{2}{3}{4,5}       4
5          {1}{2}{3}{4}{5}                      1
		

Crossrefs

Cf. A000295 (column 4), A007476 (row sums), A008277, A045618 (column 5), A048993, A246117 (unsigned matrix inverse), A256161, A000994, A000995, A086880.

Programs

  • Mathematica
    Flatten[Table[Table[Sum[StirlingS2[j,Floor[k/2]] * StirlingS2[n-j-1,Floor[(k-1)/2]],{j,0,n-1}],{k,1,n}],{n,1,12}]] (* Vaclav Kotesovec, Feb 09 2015 *)

Formula

T(n,k) = Sum_{i = 0..n-1} Stirling2(i, floor(k/2))*Stirling2(n-i-1, floor((k - 1)/2)) for n,k >= 1.
Recurrence equation: T(1,1) = 1, T(n,1) = 0 for n >= 2; T(n,k) = 0 for k > n; otherwise T(n,k) = floor(k/2)*T(n-1,k) + T(n-1,k-1).
O.g.f. (with an extra 1): A(z) = 1 + Sum_{k >= 1} (x*z)^k/( ( Product_{i = 1..floor((k-1)/2)} (1 - i*z) ) * ( Product_{i = 1..floor(k/2)} (1 - i*z) ) ) = 1 + x*z + x^2*z^2 + (x^2 + x^3)*z^3 + (x^2 + 2*x^3 + x^4)*z^4 + .... satisfies A(z) = 1 + x*z + x^2*z^2/(1 - z)*A(z/(1 - z)).
k-th column generating function z^k/( ( Product_{i = 1..floor((k-1)/2)} (1 - i*z) ) * ( Product_{i = 1..floor(k/2)} (1 - i*z) ) ).
Recurrence for row polynomials: R(n,x) = x^2*Sum_{k = 0..n-2} binomial(n-2,k)*R(k,x) with initial conditions R(0,x) = 1 and R(1,x) = x. Compare with the recurrence satisfied by the Bell polynomials: Bell(n,x) = x*Sum_{k = 0..n-1} binomial(n-1,k) * Bell(k,x).
Row sums are A007476.

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

Original entry on oeis.org

0, 1, 1, 0, 1, 3, 6, 11, 23, 60, 179, 553, 1716, 5415, 17801, 61956, 228391, 882309, 3530322, 14531621, 61454091, 267479778, 1200680113, 5561767211, 26553471186, 130366882251, 656668581417, 3387887246292, 17886582294921, 96603394562849, 533645344137390, 3014295344076655
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 02 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 31; A[] = 0; Do[A[x] = x + x^2 + x^3 A[x/(1 - x)]/(1 - x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = 0; a[1] = a[2] = 1; a[n_] := a[n] = Sum[Binomial[n - 3, k] a[k], {k, 0, n - 3}]; Table[a[n], {n, 0, 31}]
  • SageMath
    @CachedFunction
    def a(n): # a = A346050
        if (n<3): return (0,1,1)[n]
        else: return sum(binomial(n-3,k)*a(k) for k in range(n-2))
    [a(n) for n in range(51)] # G. C. Greubel, Nov 28 2022

Formula

a(0) = 0, a(1) = a(2) = 1; a(n) = Sum_{k=0..n-3} binomial(n-3,k) * a(k).

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

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 5, 12, 28, 68, 181, 531, 1671, 5491, 18627, 65299, 237880, 903907, 3580619, 14729777, 62639952, 274442521, 1236730244, 5729809348, 27292248240, 133614280479, 671803041553, 3464970976743, 18309428363425, 99010800275743, 547462187824465, 3093329527120022
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 02 2021

Keywords

Crossrefs

Programs

  • Magma
    function a(n)
      if n lt 3 then return (1+(-1)^n)/2;
      else return (&+[Binomial(n-3,j)*a(j): j in [0..n-3]]);
      end if; return a;
    end function;
    [a(n): n in [0..35]]; // G. C. Greubel, Nov 30 2022
    
  • Mathematica
    nmax = 31; A[] = 0; Do[A[x] = 1 + x^2 + x^3 A[x/(1 - x)]/(1 - x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = 1; a[1] = 0; a[2] = 1; a[n_] := a[n] = Sum[Binomial[n - 3, k] a[k], {k, 0, n - 3}]; Table[a[n], {n, 0, 31}]
  • SageMath
    @CachedFunction
    def a(n): # a = A346051
        if (n<3): return (1, 0, 1)[n]
        else: return sum(binomial(n-3, k)*a(k) for k in range(n-2))
    [a(n) for n in range(51)] # G. C. Greubel, Nov 30 2022

Formula

a(0) = 1, a(1) = 0, a(2) = 1; a(n) = Sum_{k=0..n-3} binomial(n-3,k) * a(k).

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

Original entry on oeis.org

1, 1, 0, 1, 2, 3, 5, 11, 29, 80, 222, 630, 1881, 6004, 20420, 72979, 270659, 1035590, 4087205, 16675630, 70440641, 307933393, 1390117953, 6462787357, 30871458702, 151298796000, 760250325004, 3915477534861, 20662363081756, 111662169790416, 617482470676567, 3490973387652861
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 02 2021

Keywords

Crossrefs

Programs

  • Magma
    function a(n) // a = A346052
      if n lt 3 then return Floor((3-n)/2);
      else return (&+[Binomial(n-3,j)*a(j): j in [0..n-3]]);
      end if; return a;
    end function;
    [a(n): n in [0..35]]; // G. C. Greubel, Nov 30 2022
    
  • Mathematica
    nmax = 31; A[] = 0; Do[A[x] = 1 + x + x^3 A[x/(1 - x)]/(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] = Sum[Binomial[n - 3, k] a[k], {k, 0, n - 3}]; Table[a[n], {n, 0, 31}]
  • SageMath
    @CachedFunction
    def a(n): # a = A346052
        if (n<3): return (1, 1, 0)[n]
        else: return sum(binomial(n-3, k)*a(k) for k in range(n-2))
    [a(n) for n in range(51)] # G. C. Greubel, Nov 30 2022

Formula

a(0) = a(1) = 1, a(2) = 0; a(n) = Sum_{k=0..n-3} binomial(n-3,k) * a(k).

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

Original entry on oeis.org

1, 1, 1, 4, 11, 29, 85, 281, 1003, 3764, 14811, 61327, 267153, 1219497, 5807473, 28763988, 147898511, 788330533, 4349414397, 24799271517, 145904796179, 884577652276, 5519858796807, 35415056743815, 233393746525705, 1578437838849645, 10945142365689985, 77752626344174676
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 11 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 27; A[] = 0; Do[A[x] = 1 + x + x^2 A[x/(1 - x)]/(1 - x)^3 + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = a[1] = 1; a[n_] := a[n] = Sum[Binomial[n, k + 2] a[k], {k, 0, n - 2}]; Table[a[n], {n, 0, 27}]

Formula

a(0) = a(1) = 1; a(n) = Sum_{k=0..n-2} binomial(n,k+2) * a(k).

A208891 Pascal's triangle matrix augmented with a right border of 1's.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 4, 6, 4, 1, 1, 1, 5, 10, 10, 5, 1, 1, 1, 6, 15, 20, 15, 6, 1, 1, 1, 7, 21, 35, 35, 21, 7, 1, 1, 1, 8, 28, 56, 70, 56, 28, 8, 1, 1, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 1, 1, 10, 45, 120, 210, 252, 210, 120, 45
Offset: 0

Views

Author

Gary W. Adamson, Mar 03 2012

Keywords

Comments

The eigensequence of this triangle starts as 1, 2, 4, 9, 23, 65,... (cf. A007476).
The flattened sequence differs from A135225 only by an additional leading 1.

Examples

			First few rows of the triangle =
1;
1, 1;
1, 1, 1;
1, 2, 1, 1;
1, 3, 3, 1, 1;
1, 4, 6, 4, 1, 1;
1, 5, 10, 10, 5, 1, 1;
1, 6, 15, 20, 15, 6, 1, 1;
1, 7, 21, 35, 35, 21, 7, 1, 1;
1, 8, 28, 56, 70, 56, 28, 8, 1, 1;
1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 1;
1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 1;
...
		

Crossrefs

Programs

  • Maple
    208891 := proc(n,k)
        if n <0 or k<0 or k>n then
            0;
        elif n = k then
            1 ;
        else
            binomial(n-1,k) ;
        end if;
    end proc:
    seq(seq(A208891(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jul 19 2024

Formula

T(n,n)=1. T(n,k) = A007318(n-1,k) for k

A256161 Triangle of allowable Stirling numbers of the second kind a(n,k).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 1, 1, 4, 11, 6, 1, 1, 5, 26, 23, 9, 1, 1, 6, 57, 72, 50, 12, 1, 1, 7, 120, 201, 222, 86, 16, 1, 1, 8, 247, 522, 867, 480, 150, 20, 1, 1, 9, 502, 1291, 3123, 2307, 1080, 230, 25, 1, 1, 10, 1013, 3084, 10660, 10044, 6627, 2000, 355, 30, 1
Offset: 1

Author

Margaret A. Readdy, Mar 16 2015

Keywords

Comments

Row sums = A007476 starting (1, 2, 4, 9, 23, 65, 199, 654, 2296, 8569, ...).
a(n,k) counts restricted growth words of length n in the letters {1, ..., k} where every even entry appears exactly once.

Examples

			a(4,1) = 1 via 1111;
a(4,2) = 3 via 1211, 1121, 1112;
a(4,3) = 4 via 1213, 1231, 1233, 1123;
a(4,4) = 1 via 1234.
Triangle starts:
  1;
  1,  1;
  1,  2,  1;
  1,  3,  4,  1;
  1,  4, 11,  6,  1;
  ...
		

Crossrefs

Cf. A007476 (row sums), A246118 (essentially the same triangle).

Programs

  • Mathematica
    a[, 1] = a[n, n_] = 1;
    a[n_, k_] := a[n, k] = a[n-1, k-1] + Ceiling[k/2] a[n-1, k];
    Table[a[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 15 2018 *)

Formula

a(n,k) = a(n-1,k-1) + ceiling(k/2)*a(n-1,k) for n >= 1 and 1 <= k <= n with boundary conditions a(n,0) = KroneckerDelta[n,0].
a(n,2) = n-1.
a(n,n-1) = floor(n/2)*ceiling(n/2).

A332398 Number of set partitions of [n] where all prime-indexed blocks are singletons.

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 40, 105, 304, 958, 3255, 11851, 46096, 191648, 854551, 4101826, 21213282, 117747119, 695773801, 4332490151, 28149712546, 189300600481, 1309755334070, 9286984108299, 67327505784439, 498502290046850, 3769028024302567, 29115361551715499
Offset: 0

Author

Alois P. Heinz, Feb 10 2020

Keywords

Examples

			a(2) = 2: 12, 1|2.
a(3) = 4: 123, 12|3, 13|2, 1|2|3.
a(4) = 8: 1234, 123|4, 124|3, 12|3|4, 134|2, 13|2|4, 14|2|3, 1|2|3|4.
a(5) = 17: 12345, 1234|5, 1235|4, 123|4|5, 1245|3, 124|3|5, 125|3|4, 12|3|4|5, 1345|2, 134|2|5, 135|2|4, 13|2|4|5, 145|2|3, 14|2|3|5, 15|2|3|4, 1|2|3|45, 1|2|3|4|5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, 1, add(`if`(j<=m
           and isprime(j), 0, b(n-1, max(j, m))), j=1..m+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..32);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, i+1)*
           binomial(n-1, j-1), j=1..`if`(isprime(i+1), 1, n)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..32);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n-j, i+1] Binomial[n-1, j-1], {j, 1, If[PrimeQ[i+1], 1, n]}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 32] (* Jean-François Alcover, May 07 2020, after 2nd Maple program *)
Previous Showing 11-20 of 29 results. Next