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.

A285917 Number of ordered set partitions of [n] into two blocks such that equal-sized blocks are ordered with increasing least elements.

Original entry on oeis.org

1, 6, 11, 30, 52, 126, 219, 510, 896, 2046, 3632, 8190, 14666, 32766, 59099, 131070, 237832, 524286, 956196, 2097150, 3841586, 8388606, 15425136, 33554430, 61908562, 134217726, 248377154, 536870910, 996183062, 2147483646, 3994427099, 8589934590, 16013066072
Offset: 2

Views

Author

Alois P. Heinz, Apr 28 2017

Keywords

Comments

a(n) is odd if and only if n = 2^k with k>0.

Crossrefs

Column k=2 of A285824.
Cf. A285853.

Programs

  • Maple
    a:= n-> 2*add(binomial(n, k), k=1..n/2)-
            `if`(n::even, 3/2*binomial(n, n/2), 0):
    seq(a(n), n=2..40);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<5, [0, 1, 6, 11][n],
          (9*(n-1)*(n-4)*a(n-1)+2*(3*n^2-16*n+6)*a(n-2)
          -36*(n-2)*(n-4)*a(n-3)+8*(n-3)*(3*n-10)*a(n-4))
          /((3*n-13)*n))
        end:
    seq(a(n), n=2..40);
  • Mathematica
    a[n_] := 2*Sum[Binomial[n, k], {k, 1, n/2}] - If[EvenQ[n], 3/2*Binomial[n, n/2], 0];
    Table[a[n], {n, 2, 40}] (* Jean-François Alcover, May 26 2018, from Maple *)
  • PARI
    a(n) = 2*sum(k=1, n\2, binomial(n, k)) - if (!(n%2), 3*binomial(n, n/2)/2); \\ Michel Marcus, May 26 2018