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

A364282 Number of partitions of [n] with distinct block sizes such that each block contains exactly one block size different from its own as an element.

Original entry on oeis.org

1, 0, 0, 1, 1, 4, 11, 24, 52, 226, 969, 2281, 8960, 29898, 193202, 1075509, 3346852, 14280775, 75858992, 332978617, 2839114204, 19507400962, 75453432614, 383685116089, 2030801987312, 14025840725149, 77948290561659, 884660446815877, 7273497958681824
Offset: 0

Views

Author

Alois P. Heinz, Jul 17 2023

Keywords

Examples

			a(3) = 1: 13|2.
a(4) = 1: 124|3.
a(5) = 4: 1235|4, 124|35, 125|34, 13|245.
a(6) = 11: 12346|5, 1235|46, 1236|45, 1256|34, 14|2356, 145|2|36, 14|256|3, 146|2|35, 15|246|3, 16|245|3, 156|2|34.
		

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