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

A326493 Sum of multinomials M(n-k; p_1-1, ..., p_k-1), where p = (p_1, ..., p_k) ranges over all partitions of n into distinct parts (k is a partition length).

Original entry on oeis.org

1, 1, 1, 2, 2, 5, 9, 21, 38, 146, 322, 902, 3106, 8406, 35865, 123321, 393691, 1442688, 7310744, 23471306, 129918661, 500183094, 2400722981, 9592382321, 47764284769, 280267554944, 1247781159201, 7620923955225, 36278364107926, 189688942325418, 1124492015730891
Offset: 0

Views

Author

Alois P. Heinz, Sep 22 2019

Keywords

Comments

Number of partitions of [n] such that each block contains its size as an element. So the block sizes have to be distinct. a(6) = 9: 123456, 12|3456, 1345|26, 1346|25, 1456|23, 1|23456, 1|24|356, 1|25|346, 1|26|345.

Crossrefs

Programs

  • Maple
    with(combinat):
    a:= n-> add(multinomial(n-nops(p), map(x-> x-1, p)[], 0),
            p=select(l-> nops(l)=nops({l[]}), partition(n))):
    seq(a(n), n=0..30);
    # second Maple program:
    b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 b(n$3):
    seq(a(n), n=0..31);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i(i+1)/2 < n, 0, If[n==0, p!, b[n, i-1, p] + b[n-i, Min[n-i, i-1], p-1]/(i-1)!]];
    a[n_] := b[n, n, n];
    a /@ Range[0, 31] (* Jean-François Alcover, Dec 09 2020, after Alois P. Heinz *)

A179973 Number of permutations of [n] whose cycle lengths are nondecreasing when cycles are ordered by their minima and these minima are {1..k} (for some k <= n).

Original entry on oeis.org

1, 1, 2, 4, 12, 42, 216, 1200, 8664, 66384, 612264, 5910024, 66723384, 776642664, 10311400344, 141065450904, 2153769250584, 33743736435864, 583781959921944, 10308436641381144, 198863818304824344, 3914117125411211544, 83301822014343774744, 1805447764831655109144
Offset: 0

Views

Author

Alford Arnold, Aug 05 2010

Keywords

Comments

The original name was: Row sums of A179972 and also of A179974.

Examples

			a(4) = 12 = 6 + 2 + 2 + 1 + 1: (1234), (1243), (1324), (1342), (1423), (1432),
  (13)(24), (14)(23), (1)(234), (1)(243), (1)(2)(34), (1)(2)(3)(4).
		

Crossrefs

Programs

  • Maple
    a:= n-> add((n-nops(p))!, p=combinat[partition](n)):
    seq(a(n), n=0..24);  # Alois P. Heinz, Jul 09 2023
    # second Maple program:
    b:= proc(n, i, p) option remember; `if`(n=0 or i=1,
         (p-n)!, b(n, i-1, p)+b(n-i, min(n-i, i), p-1))
        end:
    a:= n-> b(n$3):
    seq(a(n), n=0..24);  # Alois P. Heinz, Jul 09 2023
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (p - n)!, b[n, i - 1, p] + b[n - i, Min[n - i, i], p - 1]];
    a[n_] := b[n, n, n];
    Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Aug 16 2023, after Alois P. Heinz *)

Formula

From Alois P. Heinz, Jul 09 2023: (Start)
a(n) = Sum_{lambda in partitions(n)} (n - |lambda|)!.
Limit_{n->oo} A004086(a(n))/10^A055642(a(n)) = A364128. (End)

Extensions

Edited by R. J. Mathar, May 17 2016
a(0), a(9)-a(23) and new name from Alois P. Heinz, Jul 09 2023

A327712 Sum of multinomials M(n-k; p_1-1, ..., p_k-1), where p = (p_1, ..., p_k) ranges over all compositions of n into distinct parts (k is a composition length).

Original entry on oeis.org

1, 1, 1, 3, 3, 9, 29, 57, 135, 615, 2635, 6273, 25151, 82623, 525281, 2941047, 9100709, 38766777, 205155713, 902705793, 7714938567, 52987356783, 204844103977, 1042657233471, 5520661314689, 38159472253821, 211945677298567, 2404720648663335, 19773733727088813
Offset: 0

Views

Author

Alois P. Heinz, Sep 22 2019

Keywords

Comments

Number of partitions of [n] with distinct block sizes such that each block contains exactly one block size as an element. a(5) = 9: 12345, 1235|4, 124|35, 125|34, 12|345, 134|25, 135|24, 13|245, 1|2345.

Crossrefs

Programs

  • Maple
    with(combinat):
    a:= n-> add(multinomial(n-nops(p), map(x-> x-1, p)[], 0), p=map(h->
        permute(h)[], select(l-> nops(l)=nops({l[]}), partition(n)))):
    seq(a(n), n=0..28);
    # second Maple program:
    a:= proc(m) option remember; local b; b:=
          proc(n, i, j) option remember; `if`(i*(i+1)/2>=n,
           `if`(n=0, (m-j)!*j!, b(n, i-1, j)+
            b(n-i, min(n-i, i-1), j+1)/(i-1)!), 0)
          end: b(m$2, 0):
        end:
    seq(a(n), n=0..28);
  • Mathematica
    a[m_] := a[m] = Module[{b}, b[n_, i_, j_] := b[n, i, j] = If[i(i + 1)/2 >= n, If[n == 0, (m - j)! j!, b[n, i - 1, j] + b[n - i, Min[n - i, i - 1], j + 1]/(i - 1)!], 0]; b[m, m, 0]];
    a /@ Range[0, 28] (* Jean-François Alcover, May 10 2020, after 2nd Maple program *)

A364207 Number of partitions of [n] such that the minimal element of each block is also its size.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 3, 1, 0, 0, 60, 45, 53, 24, 7, 12601, 15120, 33390, 55710, 66522, 86037, 37907754, 63130067, 202203684, 511378789, 1421634137, 2566309603, 5855352202, 2064277450957, 4418631559288, 18485494082571, 61020702809287, 232959438927000, 783244248553960
Offset: 0

Views

Author

Alois P. Heinz, Jul 13 2023

Keywords

Comments

The block sizes are distinct as a consequence of the definition.
There are A188431(n) different block size configurations for a given n. - John Tyler Rascoe, Jul 19 2023

Examples

			a(0) = 1: () the empty partition.
a(1) = 1: 1.
a(3) = 1: 1|23.
a(6) = 3: 1|24|356, 1|25|346, 1|26|345.
a(7) = 1: 1|23|4567.
a(10) = 60: 1|25|367|489(10), 1|25|368|479(10), 1|25|369|478(10), ..., 1|28|39(10)|4567, 1|29|38(10)|4567, 1|2(10)|389|4567.
a(14) = 7: 1|23|4568|79(10)(11)(12)(13)(14), 1|23|4569|78(10)(11)(12)(13)(14), 1|23|456(10)|789(11)(12)(13)(14), 1|23|456(11)|789(10)(12)(13)(14), 1|23|456(12)|789(10)(11)(13)(14), 1|23|456(13)|789(10)(11)(12)(14), 1|23|456(14)|789(10)(11)(12)(13).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(i*(i+1)/2n or i>n-i+1, 0, b(n-i, i-1)*binomial(n-i, i-1))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..33);  # Alois P. Heinz, Jul 22 2023
  • Mathematica
    b[n_, i_] := b[n, i] = If[i(i+1)/2 < n, 0, If[n == 0, 1, b[n, i-1] + If[i > n || i > n-i+1, 0, b[n-i, i-1]*Binomial[n-i, i-1]]]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Oct 20 2023, after Alois P. Heinz *)

A327729 a(n) = Sum_{p} M(n-k; p_1-1, ..., p_k-1) * Product_{j=1..k} a(p_j), where p = (p_1, ..., p_k) ranges over all partitions of n into smaller parts (k is a partition length and M is a multinomial).

Original entry on oeis.org

1, 1, 2, 6, 18, 90, 414, 2892, 18342, 155124, 1265130, 13413240, 129656286, 1564538796, 18285385518, 255345207156, 3378398348214, 52931303772912, 797460543143154, 13926097774972152, 234050020177159926, 4466082284967035124, 83159771376289666806
Offset: 1

Views

Author

Alois P. Heinz, Sep 23 2019

Keywords

Comments

The formula is a generalization of the formula given in A327643.

Crossrefs

Programs

  • Maple
    with(combinat):
    a:= proc(n) option remember; `if`(n<2, 1, add(mul(a(i), i=p)
          *multinomial(n-nops(p), map(x-> x-1, p)[]),
           p=select(x-> nops(x)>1, partition(n))))
        end:
    seq(a(n), n=1..24);
    # second Maple program:
    b:= proc(n, p, i) option remember; `if`(n=0, p!, `if`(i<1, 0,
          b(n, p, i-1) +a(i)*b(n-i, p-1, min(n-i, i))/(i-1)!))
        end:
    a:= n-> `if`(n<2, 1, b(n$2, n-1)):
    seq(a(n), n=1..24);
  • Mathematica
    b[n_, p_, i_] := b[n, p, i] = If[n == 0, p!, If[i < 1, 0, b[n, p, i - 1] + a[i] b[n - i, p - 1, Min[n - i, i]]/(i - 1)!]];
    a[n_] := If[n < 2, 1, b[n, n, n - 1]];
    Array[a, 24] (* Jean-François Alcover, May 03 2020, after 2nd Maple program *)
Showing 1-5 of 5 results.