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

A363434 Total number of blocks containing only elements of the same parity in all partitions of [n].

Original entry on oeis.org

0, 1, 2, 7, 24, 97, 412, 1969, 9898, 54461, 313944, 1947613, 12603100, 86760255, 620559230, 4682462777, 36586620348, 299664171115, 2534306825064, 22355119509231, 203115201624030, 1917124624702475, 18598998656476220, 186822424157036439, 1925326063016510832
Offset: 0

Views

Author

Alois P. Heinz, Jun 01 2023

Keywords

Examples

			a(3) = 7 = 0 + 1 + 2 + 1 + 3 : 123, 12|3, 13|2, 1|23, 1|2|3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, e, o, m) option remember; `if`(n=0, e+o,
          (e+m)*b(n-1, o, e, m)+b(n-1, o, e+1, m)+
           `if`(o=0, 0, o*b(n-1, o-1, e, m+1)))
        end:
    a:= n-> b(n, 0$3):
    seq(a(n), n=0..24);
  • Mathematica
    b[n_, e_, o_, m_] := b[n, e, o, m] = If[n == 0, e + o, (e + m)*b[n-1, o, e, m] + b[n - 1, o, e + 1, m] + If[o == 0, 0, o*b[n - 1, o - 1, e, m + 1]]];
    a[n_] := b[n, 0, 0, 0];
    Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Sep 10 2023, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..n} k * A124424(n,k).
a(n) = A363452(n) + A363453(n).
a(n) mod 2 = A000035(n).

A363435 Number of partitions of [2n] having exactly n blocks with all elements of the same parity.

Original entry on oeis.org

1, 0, 5, 42, 569, 9470, 191804, 4534502, 122544881, 3721101192, 125331498349, 4634063018948, 186515332107196, 8114659545679752, 379362605925991692, 18961051425453713478, 1008752282616284996865, 56905048753221935350268, 3392250956149146382053539
Offset: 0

Views

Author

Alois P. Heinz, Jun 01 2023

Keywords

Examples

			a(2) = 5: 13|24, 14|2|3, 1|2|34, 1|23|4, 12|3|4.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember; `if`(n=0, 1, expand(x*
          add(g(n-j)*binomial(n-1, j-1), j=1..n)))
        end:
    S:= (n, k)-> coeff(g(n), x, k):
    b:= proc(g, u) option remember;
          add(S(g, k)*S(u, k)*k!, k=0..min(g, u))
        end:
    T:= proc(n, k) option remember; local g, u; g:= floor(n/2); u:= ceil(n/2);
          add(add(add(binomial(g, i)*S(i, h)*binomial(u, j)*
          S(j, k-h)*b(g-i, u-j), j=k-h..u), i=h..g), h=0..k)
        end:
    a:= n-> T(2*n, n):
    seq(a(n), n=0..18);
  • 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}]];
    a[n_] := T[2n, n];
    Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Oct 20 2023, after Alois P. Heinz in A124424 *)

Formula

a(n) = A124424(2n,n).
Conjecture: Limit_{n->oo} (a(n)/n!)^(1/n) = A238258 = -2 / (LambertW(-2*exp(-2)) * (2 + LambertW(-2*exp(-2)))) = 3.0882773... - Vaclav Kotesovec, Oct 21 2023

A363454 Number of partitions of [n] such that the number of blocks containing only odd elements equals the number of blocks containing only even elements and no block contains both odd and even elements.

Original entry on oeis.org

1, 0, 1, 1, 2, 4, 11, 28, 87, 266, 952, 3381, 13513, 53915, 237113, 1046732, 5016728, 24186664, 125121009, 652084528, 3615047527, 20211789423, 119384499720, 711572380960, 4455637803543, 28162688795697, 186152008588691, 1242276416218540, 8636436319397292
Offset: 0

Views

Author

Alois P. Heinz, Jun 02 2023

Keywords

Examples

			a(0) = 1: () the empty partition.
a(1) = 0.
a(2) = 1: 1|2.
a(3) = 1: 13|2.
a(4) = 2: 13|24, 1|2|3|4.
a(5) = 4: 135|24, 13|2|4|5, 15|2|3|4, 1|2|35|4.
a(6) = 11: 135|246, 13|24|5|6, 13|26|4|5, 13|2|46|5, 15|24|3|6, 1|24|35|6, 15|26|3|4, 15|2|3|46, 1|26|35|4, 1|2|35|46, 1|2|3|4|5|6.
a(7) = 28: 1357|246, 135|24|6|7, 137|24|5|6, 13|24|57|6, 135|26|4|7, 135|2|46|7, 137|26|4|5, 13|26|4|57, 137|2|46|5, 13|2|46|57, 13|2|4|5|6|7, 157|24|3|6, 15|24|37|6, 17|24|35|6, 1|24|357|6, 157|26|3|4, 15|26|37|4, 157|2|3|46, 15|2|37|46, 15|2|3|4|6|7, 17|26|35|4, 1|26|357|4, 17|2|35|46, 1|2|357|46, 1|2|35|4|6|7, 17|2|3|4|5|6, 1|2|37|4|5|6, 1|2|3|4|57|6.
		

Crossrefs

Bisection gives A047797 (even part).

Programs

  • Maple
    a:= n-> (h-> add(Stirling2(h, k)*Stirling2(n-h, k), k=0..h))(iquo(n, 2)):
    seq(a(n), n=0..40);
    # second Maple program:
    b:= proc(n, x, y) option remember; `if`(abs(x-y)>n, 0,
          `if`(n=0, 1, `if`(x>0, b(n-1, y, x)*x, 0)+b(n-1, y, x+1)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..40);

Formula

a(n) = Sum_{k=0..floor(n/2)} Stirling2(floor(n/2),k) * Stirling2(ceiling(n/2),k).
a(2n) = A047797(n).
Showing 1-3 of 3 results.