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

A364406 Number of permutations of [n] such that the minimal element of each cycle is also its length.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 6, 6, 0, 0, 720, 2160, 9360, 19440, 30240, 3659040, 21772800, 228614400, 1632960000, 11125900800, 73025971200, 1708337433600, 15442053580800, 254260755302400, 3318429200486400, 46929444097536000, 546974781889536000, 7312714579602432000
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2023

Keywords

Examples

			a(0) = 1: () the empty permutation.
a(1) = 1: (1).
a(3) = 1: (1)(23).
a(6) = 6: (1)(24)(356), (1)(24)(365), (1)(25)(346), (1)(25)(364),
  (1)(26)(345), (1)(26)(354).
a(7) = 6: (1)(23)(4567), (1)(23)(4576), (1)(23)(4657), (1)(23)(4675),
  (1)(23)(4756), (1)(23)(4765).
		

Crossrefs

Programs

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

A364279 Number of permutations of [n] with distinct cycle lengths such that no cycle contains its length as an element.

Original entry on oeis.org

1, 0, 0, 1, 2, 12, 86, 546, 4284, 39588, 416988, 4378848, 54297504, 695592000, 9840307680, 149031686880, 2387863575360, 40338090711360, 736126007279040, 13938942123429120, 279358800902737920, 5894877845100625920, 129943826126987765760, 2985640822908446976000
Offset: 0

Views

Author

Alois P. Heinz, Jul 17 2023

Keywords

Examples

			a(3) = 1: (13)(2).
a(4) = 2: (124)(3), (142)(3).
a(5) = 12: (1235)(4), (1253)(4), (1325)(4), (1352)(4), (1523)(4), (1532)(4), (124)(35), (142)(35), (125)(34), (152)(34), (13)(245), (13)(254).
		

Crossrefs

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 *)

A364283 Number of permutations of [n] with distinct cycle lengths such that each cycle contains exactly one cycle length different from its own as an element.

Original entry on oeis.org

1, 0, 0, 1, 2, 12, 60, 408, 2640, 24480, 208080, 2262960, 23950080, 307359360, 3835641600, 57400358400, 825160089600, 13909727462400, 229664981145600, 4310966499840000, 79428141112320000, 1658163790483200000, 33795850208440320000, 770528520983789568000
Offset: 0

Views

Author

Alois P. Heinz, Jul 17 2023

Keywords

Examples

			a(3) = 1: (13)(2).
a(4) = 2: (124)(3), (142)(3).
a(5) = 12: (1235)(4), (1253)(4), (1325)(4), (1352)(4), (1523)(4), (1532)(4),
   (124)(35), (142)(35), (125)(34), (152)(34), (13)(245), (13)(254).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; `if`(n<2, 1-n, (n-1)*(f(n-1)+f(n-2))) end:
    a:= proc(m) option remember; local b; b:=
          proc(n, i, p) option remember; `if`(i*(i+1)/2
    				
Showing 1-4 of 4 results.