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

A124324 Triangle read by rows: T(n,k) is the number of partitions of an n-set having k blocks of size > 1 (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 11, 3, 1, 26, 25, 1, 57, 130, 15, 1, 120, 546, 210, 1, 247, 2037, 1750, 105, 1, 502, 7071, 11368, 2205, 1, 1013, 23436, 63805, 26775, 945, 1, 2036, 75328, 325930, 247555, 27720, 1, 4083, 237127, 1561516, 1939630, 460845, 10395, 1, 8178
Offset: 0

Views

Author

Emeric Deutsch, Oct 28 2006

Keywords

Comments

Row sums are the Bell numbers (A000110).
It appears that the triangles in this sequence and A112493 have identical columns, except for shifts. - Jörgen Backelin, Jun 20 2022
Equivalent to Jörgen Backelin's observation, the rows of A112493 may be read off as the diagonals of this entry. - Tom Copeland, Sep 24 2022

Examples

			T(4,2) = 3 because we have 12|34, 13|24 and 14|23 (if we take {1,2,3,4} as our 4-set).
Triangle starts:
  1;
  1;
  1,    1;
  1,    4;
  1,   11,     3;
  1,   26,    25;
  1,   57,   130,    15;
  1,  120,   546,   210;
  1,  247,  2037,  1750,   105;
  1,  502,  7071, 11368,  2205;
  1, 1013, 23436, 63805, 26775, 945;
  ...
		

Crossrefs

Programs

  • Maple
    G:=exp(t*exp(z)-t+(1-t)*z): Gser:=simplify(series(G,z=0,36)): for n from 0 to 33 do P[n]:=sort(n!*coeff(Gser,z,n)) od: for n from 0 to 13 do seq(coeff(P[n],t,k),k=0..floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(
          `if`(i>1, x, 1)*binomial(n-1, i-1)*b(n-i), i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Mar 08 2015, Jul 15 2017
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] :=  b[n, i] = Expand[If[n == 0, 1, If[i<1, 0, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j!*b[n-i*j, i-1]*If[i>1, x^j, 1], {j, 0, n/i}]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *)

Formula

E.g.f.: G(t,z) = exp(t*exp(z) - t + (1-t)*z).
T(n,1) = A000295(n) (the Eulerian numbers).
Sum_{k=0..floor(n/2)} k*T(n,k) = A124325(n).
T(2n,n) = A001147(n). - Alois P. Heinz, Apr 06 2018

A324011 Number of 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, 1, 0, 5, 14, 66, 307, 1554, 8415, 48530, 296582, 1913561, 12988776, 92467629, 688528288, 5349409512, 43270425827, 363680219762, 3170394634443, 28619600156344, 267129951788160, 2574517930001445, 25587989366964056, 261961602231869825
Offset: 0

Views

Author

Gus Wiseman, Feb 12 2019

Keywords

Comments

These set partitions are fixed points under Callan's bijection phi on set partitions.

Examples

			The a(4) = 1, a(6) = 5, and a(7) = 14 set partitions:
  {{13}{24}}  {{135}{246}}    {{13}{246}{57}}
              {{13}{25}{46}}  {{13}{257}{46}}
              {{14}{25}{36}}  {{135}{26}{47}}
              {{14}{26}{35}}  {{135}{27}{46}}
              {{15}{24}{36}}  {{136}{24}{57}}
                              {{136}{25}{47}}
                              {{14}{257}{36}}
                              {{14}{26}{357}}
                              {{146}{25}{37}}
                              {{146}{27}{35}}
                              {{15}{246}{37}}
                              {{15}{247}{36}}
                              {{16}{24}{357}}
                              {{16}{247}{35}}
		

Crossrefs

Cf. A000110, A000126, A000296 (singletons allowed, or adjacencies allowed), A001610, A124323, A169985, A261139, A324012, A324014, A324015.

Programs

  • Mathematica
    Table[Select[sps[Range[n]],And[Count[#,{_}]==0,Total[If[First[#]==1&&Last[#]==n,1,0]+Count[Subtract@@@Partition[#,2,1],-1]&/@#]==0]&]//Length,{n,0,10}]

Extensions

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

A350212 Number T(n,k) of endofunctions on [n] with exactly k isolated fixed points; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 3, 0, 1, 17, 9, 0, 1, 169, 68, 18, 0, 1, 2079, 845, 170, 30, 0, 1, 31261, 12474, 2535, 340, 45, 0, 1, 554483, 218827, 43659, 5915, 595, 63, 0, 1, 11336753, 4435864, 875308, 116424, 11830, 952, 84, 0, 1, 262517615, 102030777, 19961388, 2625924, 261954, 21294, 1428, 108, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Dec 19 2021

Keywords

Examples

			T(3,1) = 9: 122, 133, 132, 121, 323, 321, 113, 223, 213.
Triangle T(n,k) begins:
         1;
         0,       1;
         3,       0,      1;
        17,       9,      0,      1;
       169,      68,     18,      0,     1;
      2079,     845,    170,     30,     0,   1;
     31261,   12474,   2535,    340,    45,   0,  1;
    554483,  218827,  43659,   5915,   595,  63,  0, 1;
  11336753, 4435864, 875308, 116424, 11830, 952, 84, 0, 1;
  ...
		

Crossrefs

Columns k=0-1 give: |A069856|, A348590.
Row sums give A000312.
T(n+1,n-1) gives A045943.

Programs

  • Maple
    g:= proc(n) option remember; add(n^(n-j)*(n-1)!/(n-j)!, j=1..n) end:
    b:= proc(n, m) option remember; `if`(n=0, x^m, add(g(i)*
          b(n-i, m+`if`(i=1, 1, 0))*binomial(n-1, i-1), i=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)):
    seq(T(n), n=0..10);
    # second Maple program:
    A350212 := (n,k)-> add((-1)^(j-k)*binomial(j,k)*binomial(n,j)*(n-j)^(n-j), j=0..n):
    seq(print(seq(A350212(n, k), k=0..n)), n=0..9); # Mélika Tebni, Nov 24 2022
  • Mathematica
    g[n_] := g[n] = Sum[n^(n - j)*(n - 1)!/(n - j)!, {j, 1, n}];
    b[n_, m_] := b[n, m] = If[n == 0, x^m, Sum[g[i]*
         b[n - i, m + If[i == 1, 1, 0]]*Binomial[n - 1, i - 1], {i, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0]];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Mar 11 2022, after Alois P. Heinz *)

Formula

Sum_{k=0..n} k * T(n,k) = A055897(n).
Sum_{k=1..n} T(n,k) = A350134(n).
From Mélika Tebni, Nov 24 2022: (Start)
T(n,k) = binomial(n, k)*|A069856(n-k)|.
E.g.f. column k: exp(-x)*x^k / ((1 + LambertW(-x))*k!).
T(n,k) = Sum_{j=0..n} (-1)^(j-k)*binomial(j, k)*binomial(n, j)*(n-j)^(n-j). (End)

A184174 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n} having k adjacent blocks of size 2, i.e., blocks of the form (i,i+1) (0 <= k <= floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 10, 4, 1, 35, 14, 3, 139, 54, 9, 1, 611, 224, 38, 4, 2925, 1027, 171, 16, 1, 15128, 5112, 822, 80, 5, 83903, 27352, 4279, 415, 25, 1, 495929, 156392, 23826, 2272, 145, 6, 3108129, 950285, 141039, 13252, 855, 36, 1, 20565721, 6107540, 883982, 81692, 5257, 238, 7
Offset: 0

Views

Author

Emeric Deutsch, Feb 09 2011

Keywords

Comments

Row n contains 1 + floor(n/2) entries.
Sum of entries in row n = A000110(n) (the Bell numbers).
T(n,0) = A184175(n).
Sum_{k>=0} k*T(n,k) = A052889(n-1).

Examples

			T(4,1)=4 because we have 12-3-4, 1-23-4, 1-2-34, 14-23. T(4,2)=1 because we have 12-34.
Triangle starts:
1;
1;
1, 1;
3, 2;
10, 4, 1;
35, 14, 3;
139, 54, 9, 1;
611, 224, 38, 4;
2925, 1027, 171, 16, 1;
15128, 5112, 822, 80, 5;
83903, 27352, 4279, 415, 25, 1;
495929, 156392, 23826, 2272, 145, 6;
3108129, 950285, 141039, 13252, 855, 36, 1; ...
		

Crossrefs

Programs

  • Maple
    with(combinat): q := 2: a := proc (n, k) options operator, arrow: sum((-1)^(k+j)*binomial(j, k)*binomial(n+j-j*q, j)*bell(n-j*q), j = k .. floor(n/q)) end proc: for n from 0 to 13 do seq(a(n, k), k = 0 .. floor(n/q)) end do; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := Sum[(-1)^(k+j)*Binomial[j, k]*Binomial[n-j, j]*BellB[n-2j], {j, k, Floor[n/2]}]; Table[T[n, k], {n, 0, 13}, {k, 0, Floor[n/2]}] // Flatten (* Jean-François Alcover, Feb 21 2017 *)
  • PARI
    {T(n,k) = my(A = sum(m=0,n, x^m/prod(k=0,m,1 - k*x + (1-y)*x^2 +x*O(x^n)))); polcoeff(polcoeff(A,n,x),k,y)}
    for(n=0,12,for(k=0,n\2,print1(T(n,k),", "));print("")) \\ Paul D. Hanna, Sep 03 2017

Formula

T(n,k) = Sum_{j=k..floor(n/2)}(-1)^(k+j)*C(j,k)*C(n-j,j)*Bell(n-2j).
G.f.: A(x,y) = Sum_{n>=0} x^n / Product_{k=0..n} (1 - k*x + (1-y)*x^2). - Paul D. Hanna, Sep 03 2017

A250104 Triangle read by rows: T(n,k) = number of partitions of n with k circular successions (n>=0, 0 <= k <= n).

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 1, 3, 0, 1, 4, 4, 6, 0, 1, 11, 20, 10, 10, 0, 1, 41, 66, 60, 20, 15, 0, 1, 162, 287, 231, 140, 35, 21, 0, 1, 715, 1296, 1148, 616, 280, 56, 28, 0, 1, 3425, 6435, 5832, 3444, 1386, 504, 84, 36, 0, 1, 17722, 34250, 32175, 19440, 8610, 2772, 840, 120, 45, 0, 1
Offset: 0

Views

Author

N. J. A. Sloane, Nov 16 2014

Keywords

Examples

			Triangle begins:
0
1, 0,
1, 0, 1,
1, 3, 0, 1,
4, 4, 6, 0, 1,
11, 20, 10, 10, 0, 1,
41, 66, 60, 20, 15, 0, 1,
162, 287, 231, 140, 35, 21, 0, 1,
715, 1296, 1148, 616, 280, 56, 28, 0, 1,
3425, 6435, 5832, 3444, 1386, 504, 84, 36, 0, 1,
17722, 34250, 32175, 19440, 8610, 2772, 840, 120, 45, 0, 1
...
		

Crossrefs

A124323 is an essentially identical triangle, differing only in row 0 and 1.
For columns see A000296, A250105 - A250107.

Programs

  • Mathematica
    t[n_, k_] := Binomial[n, k]*((-1)^(n-k)+Sum[(-1)^(j-1)*BellB[n-k-j], {j, 1, n-k}]); t[0, 0]=0; t[1, 0]=1; t[1, 1]=0; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 09 2014 *)

A324013 Number of self-complementary set partitions of {1, ..., n} with no singletons.

Original entry on oeis.org

1, 0, 1, 1, 4, 3, 15, 16, 75, 89, 428, 571, 2781, 4060, 20093, 31697, 159340, 268791, 1372163, 2455804, 12725447, 24012697, 126238060, 249880687, 1332071241, 2754348360, 14881206473, 32029000641, 175297058228, 391548016475, 2169832010759
Offset: 0

Views

Author

Gus Wiseman, Feb 12 2019

Keywords

Comments

The complement of a set partition pi of {1, ..., n} is defined as n + 1 - pi (elementwise) on page 3 of Callan. For example, the complement of {{1,5},{2},{3,6},{4}} is {{1,4},{2,6},{3},{5}}.

Examples

			The  a(3) = 1 through a(6) = 15 self-complementary set partitions with no singletons:
  {{123}}  {{1234}}    {{12345}}    {{123456}}
           {{12}{34}}  {{135}{24}}  {{123}{456}}
           {{13}{24}}  {{15}{234}}  {{124}{356}}
           {{14}{23}}               {{1256}{34}}
                                    {{1346}{25}}
                                    {{135}{246}}
                                    {{145}{236}}
                                    {{16}{2345}}
                                    {{12}{34}{56}}
                                    {{13}{25}{46}}
                                    {{14}{25}{36}}
                                    {{15}{26}{34}}
                                    {{16}{23}{45}}
                                    {{16}{24}{35}}
                                    {{16}{25}{34}}
		

Crossrefs

Cf. A000110, A000296, A080107 (self-complementary), A086365, A124323, A324012 (self-conjugate).

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    cmp[stn_]:=Union[Sort[Max@@Join@@stn+1-#]&/@stn];
    Table[Select[sps[Range[n]],And[cmp[#]==Sort[#],Count[#,{_}]==0]&]//Length,{n,0,10}]
  • PARI
    seq(n)={my(x=x+O(x*x^(n\2)), p=exp((exp(2*x)-3)/2-x+exp(x)), q=(exp(x)-1)*p); vector(n+1, n, my(c=(n-1)\2); c!*polcoef(if(n%2, p, q), c))} \\ Andrew Howroyd, Feb 16 2022

Formula

From Andrew Howroyd, Feb 16 2022: (Start)
a(2*n) = A086365(n-1) for n > 0.
a(2*n) = n!*[x^n] exp((exp(2*x) - 3)/2 - x + exp(x));
a(2*n+1) = n!*[x^n] (exp(x) - 1)*exp((exp(2*x) - 3)/2 - x + exp(x)).
(End)

Extensions

Terms a(13) and beyond from Andrew Howroyd, Feb 16 2022

A184177 Number of set partitions of {1,2,...,n} having no blocks of the form {i,i+1,i+2}.

Original entry on oeis.org

1, 1, 2, 4, 13, 46, 184, 805, 3840, 19775, 109180, 642382, 4007712, 26399764, 182939900, 1329327991, 10100670183, 80053631844, 660328296777, 5657449573120, 50255253534312, 462096537041953, 4391648990609487, 43079839534282880
Offset: 0

Views

Author

Emeric Deutsch, Feb 09 2011

Keywords

Comments

a(n) = A184176(n,0).

Examples

			a(3) = 4 because we have 1-2-3, 1-23, 12-3, and 13-2.
a(4) = 13 because among the 15 (= Bell(4)) partitions of {1,2,3,4} only 123-4 and 1-234 have adjacent blocks of size 3.
		

Crossrefs

Programs

  • Maple
    with(combinat): seq(add((-1)^j*binomial(n-2*j, j)*bell(n-3*j), j = 0 .. floor((1/3)*n)), n = 0 .. 23);

Formula

a(n) = Sum_{j=0..floor(n/3)} (-1)^j * binomial(n-2j,j) * Bell(n-3j,j).

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

A159830 Exponential Riordan array [exp(exp(x)-1-2x),x].

Original entry on oeis.org

1, -1, 1, 2, -2, 1, -3, 6, -3, 1, 7, -12, 12, -4, 1, -10, 35, -30, 20, -5, 1, 31, -60, 105, -60, 30, -6, 1, -21, 217, -210, 245, -105, 42, -7, 1, 204, -168, 868, -560, 490, -168, 56, -8, 1, 307, 1836, -756, 2604, -1260, 882, -252, 72, -9, 1, 2811, 3070, 9180, -2520, 6510, -2520, 1470, -360, 90, -10, 1
Offset: 0

Views

Author

Paul Barry, Apr 23 2009

Keywords

Comments

First column is A126617. Row sums are A000296. A007318*A159830 is A124323.
The inverse is [exp(-exp(x)+1+2x),x] which has production matrix given by
1, 1,
-1, 1, 1,
-1, -2, 1, 1,
-1, -3, -3, 1, 1,
-1, -4, -6, -4, 1, 1 ...

Examples

			Triangle begins
1,
-1, 1,
2, -2, 1,
-3, 6, -3, 1,
7, -12, 12, -4, 1,
-10, 35, -30, 20, -5, 1,
31, -60, 105, -60, 30, -6, 1,
-21, 217, -210, 245, -105, 42, -7, 1,
204, -168, 868, -560, 490, -168, 56, -8, 1
Production array is
-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
		

Programs

  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[Exp[Exp[#] - 1 - 2 #]&, #&, 11, True] // Flatten (* Jean-François Alcover, Jul 19 2019 *)

Formula

G.f.: 1/(1-xy+x-x^2/(1-xy-2x^2/(1-xy-x-3x^2/(1-xy-2x-4x^2/(1-... (continued fraction).
Previous Showing 11-19 of 19 results.