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 101-110 of 131 results. Next

A282988 Triangle of partitions of an n-set into boxes of size >= m.

Original entry on oeis.org

1, 2, 1, 5, 1, 1, 15, 4, 1, 1, 52, 11, 1, 1, 1, 203, 41, 11, 1, 1, 1, 877, 162, 36, 1, 1, 1, 1, 4140, 715, 92, 36, 1, 1, 1, 1, 21147, 3425, 491, 127, 1, 1, 1, 1, 1, 115975, 17722, 2557, 337, 127, 1, 1, 1, 1, 1, 678570, 98253, 11353, 793, 463, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Vladimir Kruchinin, Feb 26 2017

Keywords

Examples

			Triangle T(n,m) begins:
    1;
    2,   1;
    5,   1,   1;
   15,   4,   1,   1;
   52,  11,   1,   1,   1;
  203,  41,  11,   1,   1,   1;
  877, 162,  36,   1,   1,   1,   1;
  ...
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(n=0, 1, add(
          T(n-j, k)*binomial(n-1, j-1), j=k..n))
        end:
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Sep 28 2017
  • Mathematica
    T[n_, m_] := T[n, m] = Which[Or[n == m, n == 0], 1, m == 0, 0, True, Sum[Binomial[n - 1, i + m - 1] T[n - i - m, m], {i, 0, n - m}]]; Table[T[n, m], {n, 11}, {m, n}] // Flatten (* Michael De Vlieger, Feb 26 2017 *)
  • Maxima
    T(n,m):=if n=m or n=0 then 1 else if m=0 then 0 else sum(binomial(n-1, i+m-1)*T(n-i-m,m), i, 0, n-m);

Formula

T(n,m) = Sum_{i=0..n-m} C(n-1, i+m-1)*T(n-i-m, m).
E.g.f. m column of T(n,m) is exp(exp(x)-Sum_{k=0..m} 1/k!x^k).

A306416 Number of ordered set partitions of {1, ..., n} with no singletons or cyclical adjacencies (successive elements in the same block, where 1 is a successor of n).

Original entry on oeis.org

1, 0, 0, 0, 2, 0, 26, 84, 950, 6000, 62522, 556116, 6259598, 69319848, 874356338, 11384093196, 161462123894, 2397736692144, 37994808171962, 631767062124564, 11088109048500158, 203828700127054008, 3928762035148317314, 79079452776283889820, 1661265965479375937030, 36332908076071038467520, 826376466514358722894154
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Examples

			The a(4) = 2 ordered set partitions are: {{1,3},{2,4}}, {{2,4},{1,3}}.
		

Crossrefs

Cf. A000110, A000126, A000296, A000670, A001610, A032032 (adjacencies allowed), A052841 (singletons allowed), A124323, A169985, A306417, A324011 (orderless case), A324012, A324015.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Sum[Length[stn]!,{stn,Select[sps[Range[n]],And[Count[#,{_}]==0,Total[If[First[#]==1&&Last[#]==n,1,0]+Count[Subtract@@@Partition[#,2,1],-1]&/@#]==0]&]}],{n,0,10}]

Extensions

a(12)-a(26) from Alois P. Heinz, Feb 14 2019

A306418 Regular triangle read by rows where T(n, k) is the number of set partitions of {1, ..., n} requiring k steps of removing singletons and cyclical adjacency initiators until reaching a fixed point, n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 0, 2, 3, 0, 1, 2, 12, 0, 0, 0, 12, 35, 5, 0, 0, 5, 56, 100, 42, 0, 0, 0, 14, 282, 343, 231, 7, 0, 0, 0, 66, 1406, 1476, 1088, 104, 0, 0, 0, 0, 307, 7592, 7383, 4929, 909, 27, 0, 0, 0, 0, 1554, 44227, 40514, 22950, 6240, 470, 20, 0, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Comments

See Callan's article for details on this transformation (SeparateIS).

Examples

			Triangle begins:
    1
    0    1
    0    2    0
    0    2    3    0
    1    2   12    0    0
    0   12   35    5    0    0
    5   56  100   42    0    0    0
   14  282  343  231    7    0    0    0
   66 1406 1476 1088  104    0    0    0    0
  307 7592 7383 4929  909   27    0    0    0    0
		

Crossrefs

Row sums are A000110. First column is A324011.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    qbj[stn_]:=With[{ini=Join@@Table[Select[s,If[#==Max@@Max@@@stn,MemberQ[s,First[Union@@stn]],MemberQ[s,(Union@@stn)[[Position[Union@@stn,#][[1,1]]+1]]]]&],{s,stn}],sng=Join@@Select[stn,Length[#]==1&]},DeleteCases[Table[Complement[s,Union[sng,ini]],{s,stn}],{}]];
    Table[Length[Select[sps[Range[n]],Length[FixedPointList[qbj,#]]-2==k&]],{n,0,8},{k,0,n}]

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

Original entry on oeis.org

1, 1, 1, 2, 5, 15, 60, 286, 1423, 7185, 37758, 212596, 1293577, 8415869, 57715274, 414520958, 3125102795, 24880061105, 209909409566, 1871945790360, 17503956383037, 169851122851049, 1694189515772750, 17248694322541778, 178473482993477591, 1873036127628583885
Offset: 0

Views

Author

Alois P. Heinz, Feb 12 2020

Keywords

Examples

			a(1) = 1: 1.
a(2) = 1: 12.
a(3) = 2: 123, 1|23.
a(4) = 5: 1234, 12|34, 13|24, 14|23, 1|234.
a(5) = 15: 12345, 123|45, 124|35, 125|34, 12|345, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 1|23|45, 1|24|35, 1|25|34.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, i+1)*
           binomial(n-1, j-1), j=`if`(isprime(i), 2, 1)..n))
        end:
    a:= n-> b(n, 1):
    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, If[PrimeQ[i], 2, 1], n}]];
    a[n_] := b[n, 1];
    a /@ Range[0, 32] (* Jean-François Alcover, May 08 2020, after Maple *)

A347432 E.g.f.: exp( exp(x) * (exp(x) - 1 - x) ).

Original entry on oeis.org

1, 0, 1, 4, 14, 66, 397, 2626, 18797, 148238, 1281134, 11943790, 118998365, 1262189748, 14203022537, 168835162632, 2111832477426, 27708387132906, 380355066174121, 5449577398256414, 81316095965242989, 1261149374033472626, 20293627142875917978, 338263983223664609198
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 02 2021

Keywords

Comments

Exponential transform of A000295.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(
          a(n-j)*binomial(n-1, j-1)*(2^j-j-1), j=1..n))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Sep 02 2021
  • Mathematica
    nmax = 23; CoefficientList[Series[Exp[Exp[x] (Exp[x] - 1 - x)], {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n - 1, k - 1] (2^k - k - 1) a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 23}]

Formula

a(0) = 1; a(n) = Sum_{k=1..n} binomial(n-1,k-1) * A000295(k) * a(n-k).
a(n) = Sum_{k=0..n} (-1)^k * binomial(n,k) * A003725(k) * A143405(n-k).
a(n) ~ n^(n + 1/2) * (exp(exp(r)*(exp(r) - r - 1) - r/2 - n) / (r^(n + 1/2) * sqrt(2*exp(r)*(1 + 2*r) - (2 + r*(4 + r))))), where r = LambertW(n)/2 + (4 + LambertW(n)) * LambertW(n)^(3/2) / (8 * sqrt(n) * (1 + LambertW(n))). - Vaclav Kotesovec, Jul 07 2022

A355338 Expansion of e.g.f.: exp(exp(x) - x^2 - 1).

Original entry on oeis.org

1, 1, 0, -1, 3, 12, -7, -47, 332, 1347, -2105, -4200, 135457, 474697, -900832, 4682135, 126196787, 439488524, 233313817, 19129265609, 239146712732, 1104038984091, 5891696027079, 89831511761320, 911995655018817, 6253185308181553, 54873149768926624, 653039078246798383
Offset: 0

Views

Author

Vaclav Kotesovec, Jun 29 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 30; CoefficientList[Series[Exp[Exp[x] - x^2 - 1], {x, 0, nmax}], x] * Range[0, nmax]!
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace(exp(exp(x) - x^2 - 1))) \\ Michel Marcus, Jun 29 2022

Formula

a(n) ~ n^n * exp(n/LambertW(n) - LambertW(n)^2 - n - 1) / (sqrt(1 + LambertW(n)) * LambertW(n)^n).
a(n) ~ Bell(n) / exp(LambertW(n)^2).
a(0) = a(1) = 1; a(n) = -2 * (n-1) * a(n-2) + Sum_{k=1..n} binomial(n-1,k-1) * a(n-k). - Seiichi Manyama, Jun 29 2022

A358623 Regular triangle read by rows. T(n, k) = {{n, k}}, where {{n, k}} are the second order Stirling set numbers (or second order Stirling numbers). T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0, 0, 1, 10, 0, 0, 0, 0, 1, 25, 15, 0, 0, 0, 0, 1, 56, 105, 0, 0, 0, 0, 0, 1, 119, 490, 105, 0, 0, 0, 0, 0, 1, 246, 1918, 1260, 0, 0, 0, 0, 0, 0, 1, 501, 6825, 9450, 945, 0, 0, 0, 0, 0, 0, 1, 1012, 22935, 56980, 17325, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Peter Luschny, Nov 25 2022

Keywords

Comments

{{n, k}} are the number of k-quotient sets of an n-set having at least two elements in each equivalence class. This is the definition and notation (doubling the stacked delimiters of the Stirling set numbers) as given by Fekete (see link).
The formal definition expresses the second order Stirling set numbers as a binomial sum over second order Eulerian numbers (see the first formula below). The terminology 'associated Stirling numbers of second kind' used elsewhere should be dropped in favor of the more systematic one used here.
Also the Bell transform of sign(n) for n >= 0. For the definition of the Bell transform see A264428.

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 0, 0;
[2] 0, 1,   0;
[3] 0, 1,   0,    0;
[4] 0, 1,   3,    0,    0;
[5] 0, 1,  10,    0,    0,  0;
[6] 0, 1,  25,   15,    0,  0,  0;
[7] 0, 1,  56,  105,    0,  0,  0,  0;
[8] 0, 1, 119,  490,  105,  0,  0,  0,  0;
[9] 0, 1, 246, 1918, 1260,  0,  0,  0,  0,  0;
		

References

  • Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, Addison-Wesley, Reading, 2nd ed. 1994, thirty-fourth printing 2022.

Crossrefs

A008299 is an irregular subtriangle with more information.
A358622 (second order Stirling cycle numbers).
Cf. A000296 (row sums), alternating row sums (apart from sign): A000587, A293037, and A014182.

Programs

  • Maple
    T := (n, k) -> add(binomial(n, k - j)*Stirling2(n - k + j, j)*(-1)^(k - j),
    j = 0..k): for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Using the e.g.f.:
    egf := exp(z*(exp(t) - t - 1)): ser := series(egf, t, 12):
    seq(print(seq(n!*coeff(coeff(ser, t, n), z, k), k = 0..n)), n = 0..9);
    # Using second order Eulerian numbers:
    A358623 := proc(n, k) if n = 0 then return 1 fi;
    add(binomial(j, n - 2*k)*combinat:-eulerian2(n - k, n - k - j - 1), j = 0..n-k-1)
    end: seq(seq(A358623(n, k), k = 0..n), n = 0..11);
  • Python
    # recursion over rows
    from functools import cache
    @cache
    def StirlingSetOrd2(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [0, 0]
        rov: list[int] = StirlingSetOrd2(n - 2)
        row: list[int] = StirlingSetOrd2(n - 1) + [0]
        for k in range(1, n // 2 + 1):
            row[k] = (n - 1) * rov[k - 1] + k * row[k]
        return row
    for n in range(9): print(StirlingSetOrd2(n))
    # Alternative, using function BellMatrix from A264428.
    def f(k: int) -> int:
        return 1 if k > 0 else 0
    print(BellMatrix(f, 9))

Formula

T(n, k) = Sum_{j=0..k} (-1)^(k - j)*binomial(j, k - j)*<>, where <> denote the second order Eulerian numbers (extending Knuth's notation).
T(n, k) = n!*[z^k][t^n] exp(z*(exp(t) - t - 1)).
T(n, k) = Sum_{j=0..k} (-1)^(k - j)*binomial(n, k - j)*{n - k + j, j}, where {n, k} denotes the Stirling set numbers.
T(n, k) = (n - 1) * T(n-2, k-1) + k * T(n-1, k) with suitable boundary conditions.
T(n + k, k) = A269939(n, k), which might be called the Ward set numbers.

A365338 Expansion of e.g.f. exp( Sum_{k>=0} x^(3*k+2) / (3*k+2)! ).

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 15, 21, 106, 378, 1116, 6931, 20196, 136500, 558559, 3103191, 18524418, 90852217, 661904622, 3569749659, 25657118047, 171935108541, 1149965503347, 9166884110308, 62758177512570, 525194926694256, 4072360499426311, 33295056117878646
Offset: 0

Views

Author

Seiichi Manyama, Sep 22 2023

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(exp(sum(k=0, N\3, x^(3*k+2)/(3*k+2)!))))

Formula

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

A365419 Expansion of e.g.f. exp( Sum_{k>=0} x^(5*k+2) / (5*k+2)! ).

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 15, 1, 105, 36, 945, 990, 10396, 25740, 136942, 675675, 2238405, 18378361, 50490765, 523833819, 1665638325, 15790609395, 71976549646, 515107015830, 3524757498023, 19222751356875, 181500385651325, 888496839591076, 9603885700913400
Offset: 0

Views

Author

Seiichi Manyama, Sep 22 2023

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(exp(sum(k=0, N\5, x^(5*k+2)/(5*k+2)!))))

Formula

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

A367890 Expansion of e.g.f. exp(3*(exp(x) - 1 - x)).

Original entry on oeis.org

1, 0, 3, 3, 30, 93, 633, 3342, 22809, 156063, 1183872, 9453711, 80455125, 721576560, 6809391111, 67332650007, 695777512638, 7493572404345, 83926492573341, 975467527353750, 11744536832206149, 146234590864310019, 1880198749437144456, 24928860500681953683
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2023

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 23; CoefficientList[Series[Exp[3 (Exp[x] - 1 - x)], {x, 0, nmax}], x] Range[0, nmax]!
    a[0] = 1; a[n_] := a[n] = 3 Sum[Binomial[n - 1, k] a[n - k - 1], {k, 1, n - 1}]; Table[a[n], {n, 0, 23}]
    Table[Sum[Binomial[n, k] (-3)^(n - k) BellB[k, 3], {k, 0, n}], {n, 0, 23}]
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace(exp(3*(exp(x) - 1 - x)))) \\ Michel Marcus, Dec 04 2023

Formula

G.f. A(x) satisfies: A(x) = 1 - 3 * x * ( A(x) - A(x/(1 - x)) / (1 - x) ).
a(n) = exp(-3) * Sum_{k>=0} 3^k * (k-3)^n / k!.
a(0) = 1; a(n) = 3 * Sum_{k=1..n-1} binomial(n-1,k) * a(n-k-1).
a(n) = Sum_{k=0..n} binomial(n,k) * (-3)^(n-k) * A027710(k).
Previous Showing 101-110 of 131 results. Next