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.

A287252 Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks are <= two.

Original entry on oeis.org

1, 1, 2, 5, 14, 44, 152, 571, 2317, 10096, 47013, 232944, 1223428, 6786936, 39640947, 243060305, 1560340480, 10461611439, 73094563140, 531127372268, 4006242743228, 31316162403165, 253292622192153, 2116823651781702, 18255325000268015, 162261535224570326
Offset: 0

Views

Author

Alois P. Heinz, May 22 2017

Keywords

Crossrefs

Column k=2 of A287216.
Cf. A000110.

Programs

  • Maple
    b:= proc(n, k, m, l) option remember; `if`(n<1, 1,
         `if`(l-n>k, 0, b(n-1, k, m+1, n))+m*b(n-1, k, m, l))
        end:
    a:= n-> b(n-1, min(2, n-1), 1, n):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, k_, m_, l_] := b[n, k, m, l] = If[n < 1, 1, If[l - n > k, 0, b[n - 1, k, m + 1, n]] + m*b[n - 1, k, m, l]];
    a[n_] := b[n - 1, Min[2, n - 1], 1, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)

Formula

a(n) = A287216(n,2).
a(n) = A000110(n) for n <= 3.