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.

A242911 Half the number of compositions of n into exactly two different parts with equal multiplicities.

Original entry on oeis.org

1, 1, 2, 5, 3, 6, 14, 10, 5, 56, 6, 15, 153, 51, 8, 502, 9, 217, 1756, 25, 11, 7023, 264, 30, 24363, 1852, 14, 93629, 15, 6576, 352782, 40, 3827, 1377543, 18, 45, 5200379, 105812, 20, 20063228, 21, 352942, 77607976, 55, 23, 301906830, 5172, 185320, 1166803215
Offset: 3

Views

Author

Alois P. Heinz, May 26 2014

Keywords

Examples

			a(6) = 5 because there are 10 compositions of 6 into exactly two different parts with equal multiplicities: [1,5], [5,1], [2,4], [4,2], [1,1,2,2], [1,2,1,2], [1,2,2,1], [2,1,1,2], [2,1,2,1], [2,2,1,1].
		

Programs

  • Maple
    a:= n-> add(iquo(d-1, 2)*binomial(2*n/d, n/d),
            d=numtheory[divisors](n))/2:
    seq(a(n), n=3..60);
  • Mathematica
    a[n_] := DivisorSum[n, Quotient[#-1, 2]*Binomial[2n/#, n/#]&]/2; Table[ a[n], {n, 3, 60}] (* Jean-François Alcover, Feb 28 2017, translated from Maple *)

Formula

a(n) = 1/2 * Sum_{d|n} floor(d-1/2) * C(2*n/d,n/d).
a(p) = (p-1)/2 for odd prime p.
a(n) = 1/2 * (A131661(n)-A242900(n)).