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.

A271841 Number of set partitions of [2n] having exactly n pairs (m,m+1) such that m is in some block b and m+1 is in block b+1.

Original entry on oeis.org

1, 1, 6, 61, 891, 17081, 404275, 11364373, 368982178, 13564841773, 556179920807, 25136678260282, 1240530238800284, 66339010440041817, 3819462133549622416, 235473674234358044731, 15472450628591543437233, 1079168872840695090981865, 79613621745613390178188361
Offset: 0

Views

Author

Alois P. Heinz, Apr 15 2016

Keywords

Crossrefs

Cf. A185982.

Programs

  • Maple
    b:= proc(n, i, m, k) option remember; `if`(k>n, 0, `if`(n=0, 1,
           add(`if`(j=i+1 and k=0, 0, b(n-1, j, max(m, j), k-
          `if`(j=i+1, 1, 0))), j=1..m+1)))
        end:
    a:= n-> b(2*n, 1, 0, n):
    seq(a(n), n=0..18);
  • Mathematica
    b[n_, i_, m_, k_] := b[n, i, m, k] = If[k > n, 0, If[n == 0, 1, Sum[If[j == i + 1 && k == 0, 0, b[n - 1, j, Max[m, j], k - If[j == i + 1, 1, 0]]], {j, 1, m + 1}]]];
    a[n_] := b[2*n, 1, 0, n];
    Table[a[n], {n, 0, 18}] (* Jean-François Alcover, May 27 2018, translated from Maple *)

Formula

a(n) = A185982(2n,n).