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

A124419 Number of partitions of the set {1,2,...n} having no blocks that contain both odd and even entries.

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 25, 75, 225, 780, 2704, 10556, 41209, 178031, 769129, 3630780, 17139600, 87548580, 447195609, 2452523325, 13450200625, 78697155750, 460457244900, 2859220516290, 17754399678409, 116482516809889, 764214897046969, 5277304280371714
Offset: 0

Views

Author

Emeric Deutsch, Oct 31 2006

Keywords

Examples

			a(4) = 4 because we have 13|24, 1|24|3, 13|2|4 and 1|2|3|4.
		

Crossrefs

Column k=0 of A124418 and of A363493.
Column k=2 of A275069.

Programs

  • Maple
    Q[0]:=1: for n from 1 to 30 do if n mod 2 = 1 then Q[n]:=expand(t*diff(Q[n-1],t)+x*diff(Q[n-1],s)+x*diff(Q[n-1],x)+t*Q[n-1]) else Q[n]:=expand(x*diff(Q[n-1],t)+s*diff(Q[n-1],s)+x*diff(Q[n-1],x)+s*Q[n-1]) fi od: for n from 0 to 30 do Q[n]:=Q[n] od: seq(subs({t=1,s=1,x=0},Q[n]),n=0..30);
    # second Maple program:
    with(combinat):
    a:= n-> bell(floor(n/2))*bell(ceil(n/2)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Oct 23 2013
  • Mathematica
    a[n_] := BellB[Floor[n/2]]*BellB[Ceiling[n/2]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 20 2015, after Alois P. Heinz *)

Formula

a(n) = Q[n](1,1,0), where the polynomials Q[n]=Q[n](t,s,x) are defined by Q[0]=1; Q[n]=t*dQ[n-1]/dt + x*dQ[n-1]/ds + x*dQ[n-1]/dx + t*Q[n-1] if n is odd and Q[n]=x*dQ[n-1]/dt + s*dQ[n-1]/ds + x*dQ[n-1]/dx + s*Q[n-1] if n is even.
a(n) = A000110(floor(n/2)) * A000110(ceiling(n/2)). - Alois P. Heinz, Oct 23 2013
a(n) mod 2 = A088911(n). - Alois P. Heinz, Jun 06 2023

A124418 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n} having exactly k blocks that contain both odd and even entries (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 9, 2, 10, 30, 12, 25, 100, 72, 6, 75, 370, 372, 60, 225, 1369, 1922, 600, 24, 780, 5587, 9920, 4500, 360, 2704, 22801, 51200, 33750, 5400, 120, 10556, 101774, 273920, 234000, 55800, 2520, 41209, 454276, 1465472, 1622400, 576600, 52920, 720
Offset: 0

Views

Author

Emeric Deutsch, Oct 31 2006

Keywords

Comments

Row n has 1+floor(n/2) terms. Row sums are the Bell numbers (A000110). T(n,0)=A124419(n).

Examples

			T(4,1) = 9 because we have 1234, 134|2, 1|234, 124|3, 14|2|3, 1|2|34, 123|4, 1|23|4 and 12|3|4.
Triangle starts:
   1;
   1;
   1,   1;
   2,   3;
   4,   9,  2;
  10,  30, 12;
  25, 100, 72, 6;
  ...
		

Crossrefs

Programs

  • Maple
    Q[0]:=1: for n from 1 to 13 do if n mod 2 = 1 then Q[n]:=expand(t*diff(Q[n-1],t)+x*diff(Q[n-1],s)+x*diff(Q[n-1],x)+t*Q[n-1]) else Q[n]:=expand(x*diff(Q[n-1],t)+s*diff(Q[n-1],s)+x*diff(Q[n-1],x)+s*Q[n-1]) fi od: for n from 0 to 13 do P[n]:=sort(subs({t=1,s=1},Q[n])) od: for n from 0 to 13 do seq(coeff(P[n],x,j),j=0..floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    with(combinat):
    T:= proc(n, k) local g, u; g:= floor(n/2); u:=ceil(n/2);
          add(binomial(g, i)*stirling2(i, k)*bell(g-i), i=k..g)*
          add(binomial(u, i)*stirling2(i, k)*bell(u-i), i=k..u)*k!
        end:
    seq(seq(T(n,k), k=0..floor(n/2)), n=0..15); # Alois P. Heinz, Oct 23 2013
  • Mathematica
    T[n_, k_] := Module[{g = Floor[n/2], u = Ceiling[n/2]}, Sum[Binomial[g, i] * StirlingS2[i, k]*BellB[g-i], {i, k, g}]*Sum[Binomial[u, i]*StirlingS2[i, k] * BellB[u-i], {i, k, u}]*k!]; Table[Table[T[n, k], {k, 0, Floor[n/2]}], {n, 0, 15}] // Flatten (* Jean-François Alcover, Feb 20 2015, after Alois P. Heinz *)
  • PARI
    {T(n,k)=if(k<0||k>n,0, k!*(n\2)!*((n+1)\2)!*polcoeff(polcoeff(exp((1+y)*(exp(x+x*O(x^n))-1)),n\2),k) *polcoeff(polcoeff(exp((1+y)*(exp(x+x*O(x^n))-1)),(n+1)\2),k))} \\ Paul D. Hanna, Nov 08 2006

Formula

The generating polynomial of row n is P[n](x)=Q[n](1,1,x), where the polynomials Q[n]=Q[n](t,s,x) are defined by Q[0]=1; Q[n]=t*dQ[n-1]/dt + x*dQ[n-1]/ds + x*dQ[n-1]/dx + t*Q[n-1] if n is odd and Q[n]=x*dQ[n-1]/dt + s*dQ[n-1]/ds + x*dQ[n-1]/dx + s*Q[n-1] if n is even.
Conjecture: T(n,k) = k!*A049020([n/2],k)*A049020([(n+1)/2],k) where A049020(n,k)=Sum_{i=0..n} S2(n,i)*C(i,k) and S2(n,k)=(1/k!)*Sum_{j=0..k} (-1)^(k-j)*C(k,j)*j^n (the Stirling numbers of 2nd kind). - Paul D. Hanna, Nov 08 2006
Sum_{k=0..floor(n/2)} = k * A362495(n). - Alois P. Heinz, Jun 05 2023

A124421 Number of partitions of the set {1,2,...,n} having no blocks that contain only odd entries.

Original entry on oeis.org

1, 0, 1, 1, 5, 9, 52, 130, 855, 2707, 19921, 75771, 614866, 2717570, 24040451, 120652827, 1152972925, 6460552857, 66200911138, 408845736040, 4465023867757, 30083964854141, 348383154017581, 2539795748336375, 31052765897026352, 243282175672281360
Offset: 0

Views

Author

Emeric Deutsch, Oct 31 2006

Keywords

Comments

Column 0 of A124420.

Examples

			a(4) = 5 because we have 1234, 134|2, 14|23, 12|34 and 123|4.
		

Crossrefs

Bisection gives A108459 (even part).

Programs

  • Maple
    Q[0]:=1: for n from 1 to 27 do if n mod 2 = 1 then Q[n]:=expand(t*diff(Q[n-1],t)+x*diff(Q[n-1],s)+x*diff(Q[n-1],x)+t*Q[n-1]) else Q[n]:=expand(x*diff(Q[n-1],t)+s*diff(Q[n-1],s)+x*diff(Q[n-1],x)+s*Q[n-1]) fi od: for n from 0 to 27 do Q[n]:=Q[n] od: seq(subs({t=0,s=1,x=1},Q[n]),n=0..27);
    # second Maple program:
    a:= n-> add(Stirling2(floor(n/2), j)*j^ceil(n/2), j=0..floor(n/2)):
    seq(a(n), n=0..30);  # Alois P. Heinz, Oct 23 2013
  • Mathematica
    a[0] = 1; a[n_] := Sum[StirlingS2[Floor[n/2], j]*j^Ceiling[n/2], {j, 0, Floor[n/2]}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 20 2015, after Alois P. Heinz *)

Formula

a(n) = Q[n](0,1,1), where the polynomials Q[n]=Q[n](t,s,x) are defined by Q[0]=1; Q[n]=t*dQ[n-1]/dt + x*dQ[n-1]/ds + x*dQ[n-1]/dx + t*Q[n-1] if n is odd and Q[n]=x*dQ[n-1]/dt + s*dQ[n-1]/ds + x*dQ[n-1]/dx + s*Q[n-1] if n is even.
a(n) = Sum_{j=0..floor(n/2)} Stirling2(floor(n/2),j) * j^ceiling(n/2). - Alois P. Heinz, Oct 23 2013

A124420 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n}, having exactly k blocks consisting only odd entries (0<=k<=ceiling(n/2)).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 3, 1, 5, 8, 2, 9, 26, 15, 2, 52, 101, 45, 5, 130, 385, 287, 70, 5, 855, 1889, 1143, 238, 15, 2707, 8295, 7320, 2475, 335, 15, 19921, 48382, 35805, 10540, 1275, 52, 75771, 240534, 240082, 100940, 19505, 1686, 52, 614866, 1609551, 1379753, 512710
Offset: 0

Views

Author

Emeric Deutsch, Oct 31 2006

Keywords

Comments

Row n has 1 + ceiling(n/2) terms. Row sums are the Bell numbers (A000110). T(2n,n) = T(2n+1,n+1) = A000110(n) (the Bell numbers). T(n,0) = A124421(n).

Examples

			T(4,1) = 8 because we have 13|24, 1|234, 124|3, 14|2|3, 1|2|34, 13|2|4, 1|23|4 and 12|3|4.
Triangle starts:
   1;
   0,   1;
   1,   1;
   1,   3,   1;
   5,   8,   2;
   9,  26,  15,   2;
  52, 101,  45,   5;
		

Crossrefs

Programs

  • Maple
    Q[0]:=1: for n from 1 to 13 do if n mod 2 = 1 then Q[n]:=expand(t*diff(Q[n-1],t)+x*diff(Q[n-1],s)+x*diff(Q[n-1],x)+t*Q[n-1]) else Q[n]:=expand(x*diff(Q[n-1],t)+s*diff(Q[n-1],s)+x*diff(Q[n-1],x)+s*Q[n-1]) fi od: for n from 0 to 13 do P[n]:=sort(subs({s=1,x=1},Q[n])) od: for n from 0 to 13 do seq(coeff(P[n],t,j),j=0..ceil(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    T:= proc(n, k) local g, u; g:= floor(n/2); u:=ceil(n/2);
          add(Stirling2(i, k)*binomial(u, i)*
          add(Stirling2(g, j)*j^(u-i), j=0..g), i=k..u)
        end:
    seq(seq(T(n,k), k=0..ceil(n/2)), n=0..15);  # Alois P. Heinz, Oct 23 2013
  • Mathematica
    T[n_, k_] := Module[{g = Floor[n/2], u = Ceiling[n/2]},
        Sum[StirlingS2[i, k]*Binomial[u, i]*
        Sum[StirlingS2[g, j]*If[u == i, 1, j^(u - i)], {j, 0, g}], {i, k, u}]];
    Table[Table[T[n, k], {k, 0, Ceiling[n/2]}], {n, 0, 15}] // Flatten (* Jean-François Alcover, May 20 2015, after Alois P. Heinz, updated Jan 01 2021 *)

Formula

The generating polynomial of row n is P[n](t)=Q[n](t,1,1), where the polynomials Q[n]=Q[n](t,s,x) are defined by Q[0]=1; Q[n]=t*dQ[n-1]/dt + x*dQ[n-1]/ds + x*dQ[n-1]/dx + t*Q[n-1] if n is odd and Q[n]=x*dQ[n-1]/dt + s*dQ[n-1]/ds + x*dQ[n-1]/dx + s*Q[n-1] if n is even.

A124422 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n}, having exactly k blocks consisting only even entries (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 5, 8, 2, 22, 25, 5, 52, 101, 45, 5, 283, 423, 156, 15, 855, 1889, 1143, 238, 15, 5451, 9726, 5002, 916, 52, 19921, 48382, 35805, 10540, 1275, 52, 144074, 292223, 187515, 49155, 5400, 203, 614866, 1609551, 1379753, 512710, 89425, 7089, 203
Offset: 0

Views

Author

Emeric Deutsch, Oct 31 2006

Keywords

Comments

Row n has 1+floor(n/2) terms. Row sums are the Bell numbers (A000110). T(2n-1,n-1) = T(2n,n) = A000110(n) (the Bell numbers). T(n,0) = A124423(n).

Examples

			T(4,1) = 8 because we have 134|2, 13|24, 14|2|3, 1|24|3, 1|2|34, 123|4, 1|23|4 and 12|3|4.
Triangle starts:
   1;
   1;
   1,   1;
   3,   2;
   5,   8,  2;
  22,  25,  5;
  52, 101, 45, 5;
  ...
		

Crossrefs

Programs

  • Maple
    Q[0]:=1: for n from 1 to 13 do if n mod 2 = 1 then Q[n]:=expand(t*diff(Q[n-1],t)+x*diff(Q[n-1],s)+x*diff(Q[n-1],x)+t*Q[n-1]) else Q[n]:=expand(x*diff(Q[n-1],t)+s*diff(Q[n-1],s)+x*diff(Q[n-1],x)+s*Q[n-1]) fi od: for n from 0 to 13 do P[n]:=sort(subs({t=1,x=1},Q[n])) od: for n from 0 to 13 do seq(coeff(P[n],s,j),j=0..floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    T:= proc(n, k) local g, u; g:= floor(n/2); u:=ceil(n/2);
          add(Stirling2(i, k)*binomial(g, i)*
          add(Stirling2(u, j)*j^(g-i), j=0..u), i=k..g)
        end:
    seq(seq(T(n,k), k=0..floor(n/2)), n=0..15); # Alois P. Heinz, Oct 23 2013
  • Mathematica
    Unprotect[Power]; 0^0 = 1; T[n_, k_] := Module[{g = Floor[n/2], u = Ceiling[n/2]},  Sum[StirlingS2[i, k]*Binomial[g, i]*Sum[StirlingS2[u, j]*j^(g-i), {j, 0, u}], {i, k, g}]]; Table[Table[T[n, k], {k, 0, Floor[n/2]}], {n, 0, 15}] // Flatten (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *)

Formula

The generating polynomial of row n is P[n](s)=Q[n](1,s,1), where the polynomials Q[n]=Q[n](t,s,x) are defined by Q[0]=1; Q[n]=t*dQ[n-1]/dt + x*dQ[n-1]/ds + x*dQ[n-1]/dx + t*Q[n-1] if n is odd and Q[n]=x*dQ[n-1]/dt + s*dQ[n-1]/ds + x*dQ[n-1]/dx + s*Q[n-1] if n is even.

A124425 Number of partitions of the set {1,2,...,n} having no blocks with all entries of the same parity.

Original entry on oeis.org

1, 0, 1, 1, 3, 7, 25, 79, 339, 1351, 6721, 31831, 179643, 979567, 6166105, 37852039, 262308819, 1784037031, 13471274401, 100285059751, 818288740923, 6604485845167, 57836113793305, 502235849694679, 4693153430067699, 43572170967012871, 432360767273547841
Offset: 0

Views

Author

Emeric Deutsch, Nov 01 2006

Keywords

Comments

Column 0 of A124424.

Examples

			a(4) = 3 because we have 1234, 14|23 and 12|34.
		

Crossrefs

Programs

  • Maple
    Q[0]:=1: for n from 1 to 27 do if n mod 2 = 1 then Q[n]:=expand(t*diff(Q[n-1],t)+x*diff(Q[n-1],s)+x*diff(Q[n-1],x)+t*Q[n-1]) else Q[n]:=expand(x*diff(Q[n-1],t)+s*diff(Q[n-1],s)+x*diff(Q[n-1],x)+s*Q[n-1]) fi od: seq(subs({t=0,s=0,x=1},Q[n]),n=0..27);
    # second Maple program:
    a:= proc(n) local g, u; g:= floor(n/2); u:= ceil(n/2);
          add(Stirling2(g, k)*Stirling2(u, k)*k!, k=0..g)
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Oct 24 2013
  • Mathematica
    a[n_] := Module[{g=Floor[n/2], u=Ceiling[n/2]}, Sum[StirlingS2[g, k]*StirlingS2[u, k]*k!, {k, 0, g}]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 26 2015, after Alois P. Heinz *)

Formula

a(n) = Q[n](0,0,1), where the polynomials Q[n]=Q[n](t,s,x) are defined by Q[0]=1; Q[n]=t*dQ[n-1]/dt + x*dQ[n-1]/ds + x*dQ[n-1]/dx + t*Q[n-1] if n is odd and Q[n]=x*dQ[n-1]/dt + s*dQ[n-1]/ds + x*dQ[n-1]/dx + s*Q[n-1] if n is even.
a(n) = Sum_{k=0..floor(n/2)} Stirling2(floor(n/2),k)*Stirling2(ceiling(n/2),k)*k!. - Alois P. Heinz, Oct 24 2013

A124424 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n}, having exactly k blocks consisting of entries of the same parity (0<=k<=n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 2, 1, 1, 3, 4, 5, 2, 1, 7, 14, 16, 10, 4, 1, 25, 48, 61, 42, 20, 6, 1, 79, 194, 250, 200, 106, 38, 9, 1, 339, 820, 1145, 958, 569, 230, 66, 12, 1, 1351, 3794, 5554, 5096, 3251, 1486, 486, 112, 16, 1, 6721, 18960, 29101, 28010, 19110, 9470, 3477, 930, 175, 20, 1
Offset: 0

Views

Author

Emeric Deutsch, Nov 01 2006

Keywords

Comments

Row sums are the Bell numbers (A000110). T(n,0)=A124425(n).

Examples

			T(4,2) = 5 because we have 13|24, 14|2|3, 1|2|34, 1|23|4 and 12|3|4.
Triangle starts:
  1;
  0,  1;
  1,  0,  1;
  1,  2,  1,  1;
  3,  4,  5,  2, 1;
  7, 14, 16, 10, 4, 1;
  ...
		

Crossrefs

Programs

  • Maple
    Q[0]:=1: for n from 1 to 11 do if n mod 2 = 1 then Q[n]:=expand(t*diff(Q[n-1],t)+x*diff(Q[n-1],s)+x*diff(Q[n-1],x)+t*Q[n-1]) else Q[n]:=expand(x*diff(Q[n-1],t)+s*diff(Q[n-1],s)+x*diff(Q[n-1],x)+s*Q[n-1]) fi od: for n from 0 to 11 do P[n]:=sort(subs({s=t,x=1},Q[n])) od: for n from 0 to 11 do seq(coeff(P[n],t,j),j=0..n) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(g, u) option remember;
          add(Stirling2(g, k)*Stirling2(u, k)*k!, k=0..min(g, u))
        end:
    T:= proc(n, k) local g, u; g:= floor(n/2); u:= ceil(n/2);
          add(add(add(binomial(g, i)*Stirling2(i, h)*binomial(u, j)*
          Stirling2(j, k-h)*b(g-i, u-j), j=k-h..u), i=h..g), h=0..k)
        end:
    seq(seq(T(n,k), k=0..n), n=0..12);  # Alois P. Heinz, Oct 24 2013
  • Mathematica
    b[g_, u_] := b[g, u] = Sum[StirlingS2[g, k]*StirlingS2[u, k]*k!, {k, 0, Min[g, u]}] ; T[n_, k_] := Module[{g, u}, g = Floor[n/2]; u = Ceiling[n/2]; Sum[ Sum[ Sum[ Binomial[g, i]*StirlingS2[i, h]*Binomial[u, j]*StirlingS2[j, k-h]*b[g-i, u-j], {j, k-h, u}], {i, h, g}], {h, 0, k}]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)

Formula

The generating polynomial of row n is P[n](t)=Q[n](t,t,1), where the polynomials Q[n]=Q[n](t,s,x) are defined by Q[0]=1; Q[n]=t*dQ[n-1]/dt + x*dQ[n-1]/ds + x*dQ[n-1]/dx + t*Q[n-1] if n is odd and Q[n]=x*dQ[n-1]/dt + s*dQ[n-1]/ds + x*dQ[n-1]/dx + s*Q[n-1] if n is even.
Sum_{k=0..n} k * T(n,k) = A363434(n). - Alois P. Heinz, Jun 01 2023

A363430 Number of set partitions of [n] such that each block has at most one odd element.

Original entry on oeis.org

1, 1, 2, 3, 10, 17, 77, 141, 799, 1540, 10427, 20878, 163967, 338233, 3017562, 6376149, 63625324, 137144475, 1512354975, 3315122947, 40012800675, 88981537570, 1166271373797, 2626214876310, 37134022033885, 84540738911653, 1282405154139046, 2948058074576995
Offset: 0

Views

Author

Alois P. Heinz, Jun 01 2023

Keywords

Examples

			a(0) = 1: () the empty partition.
a(1) = 1: 1.
a(2) = 2: 12, 1|2.
a(3) = 3: 12|3, 1|23, 1|2|3.
a(4) = 10: 124|3, 12|34, 12|3|4, 14|23, 1|234, 1|23|4, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
a(5) = 17: 124|3|5, 12|34|5, 12|3|45, 12|3|4|5, 14|23|5, 1|234|5, 1|23|45, 1|23|4|5, 14|25|3, 14|2|3|5, 1|245|3, 1|24|3|5, 1|25|34, 1|2|34|5, 1|25|3|4, 1|2|3|45, 1|2|3|4|5.
		

Crossrefs

Bisection gives: A134980 (even part).
Cf. A000110, A110138 (exactly one odd), A124423 (at least one odd), A363429 (at most one even).

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, 1,
          b(n-1, m+1)+m*b(n-1, m))
        end:
    a:= n-> (h-> b(h, n-h))(iquo(n, 2)):
    seq(a(n), n=0..30);

Formula

a(n) = Sum_{k=0..floor(n/2)} ceiling(n/2)^k * binomial(floor(n/2),k) * Bell(floor(n/2)-k).
Showing 1-8 of 8 results.