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

A242896 Number T(n,k) of compositions of n into k parts with distinct multiplicities, where parts are counted without multiplicities; triangle T(n,k), n>=0, 0<=k<=max{i:A000292(i)<=n}, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 2, 0, 3, 3, 0, 2, 10, 0, 4, 12, 0, 2, 38, 0, 4, 56, 0, 3, 79, 0, 4, 152, 60, 0, 2, 251, 285, 0, 6, 284, 498, 0, 2, 594, 1438, 0, 4, 920, 2816, 0, 4, 1108, 5208, 0, 5, 2136, 11195, 0, 2, 3402, 24094, 0, 6, 4407, 38523, 0, 2, 8350, 85182
Offset: 0

Views

Author

Alois P. Heinz, May 25 2014

Keywords

Examples

			T(5,1) = 2: [1,1,1,1,1], [5].
T(5,2) = 10: [1,1,1,2], [1,1,2,1], [1,2,1,1], [2,1,1,1], [1,2,2], [2,1,2], [2,2,1], [1,1,3], [1,3,1], [3,1,1].
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 2;
  0, 2;
  0, 3,   3;
  0, 2,  10;
  0, 4,  12;
  0, 2,  38;
  0, 4,  56;
  0, 3,  79;
  0, 4, 152, 60;
		

Crossrefs

Row sums give A242882.
Cf. A182485 (the same for partitions), A242887.

Programs

  • Maple
    b:= proc(n, i, s) option remember; `if`(n=0, add(j, j=s)!,
          `if`(i<1, 0, expand(add(`if`(j>0 and j in s, 0, `if`(j=0, 1, x)*
           b(n-i*j, i-1, `if`(j=0, s, s union {j}))/j!), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, {})):
    seq(T(n), n=0..16);
  • Mathematica
    b[n_, i_, s_List] := b[n, i, s] = If[n == 0, Total[s]!, If[i<1, 0, Expand[ Sum[ If[j>0 && MemberQ[s, j], 0, If[j == 0, 1, x]*b[n-i*j, i-1, If[j == 0, s, s ~Union~ {j}]]/j!], {j, 0, n/i}]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n, {}]]; Table[T[n], {n, 0, 16}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)

A182473 Number of partitions of n into exactly 2 different parts with distinct multiplicities.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 3, 8, 9, 12, 16, 22, 20, 31, 35, 34, 44, 51, 53, 62, 65, 68, 87, 86, 89, 95, 118, 108, 126, 127, 138, 142, 162, 154, 188, 160, 193, 189, 227, 204, 228, 221, 258, 238, 282, 247, 311, 272, 320, 284, 344, 318, 373, 327, 398, 334, 407, 380, 450
Offset: 0

Views

Author

Alois P. Heinz, Apr 30 2012

Keywords

Examples

			a(4) = 1: [2,1,1], part 2 occurs once and part 1 occurs twice.
a(5) = 3: [2,1,1,1], [2,2,1], [3,1,1].
a(6) = 3: [2,1,1,1,1], [3,1,1,1], [4,1,1].
a(7) = 8: [2,1,1,1,1,1], [2,2,1,1,1], [2,2,2,1], [3,1,1,1,1], [3,2,2], [3,3,1], [4,1,1,1], [5,1,1].
		

Crossrefs

Column k=2 of A182485.
Cf. A242900 (the same for compositions).

A131661 Number of compositions of n such that the cardinality of the set of parts is 2.

Original entry on oeis.org

0, 0, 2, 5, 14, 22, 44, 68, 107, 172, 261, 396, 606, 950, 1414, 2238, 3418, 5411, 8368, 13297, 20840, 33268, 52549, 84120, 133775, 214611, 343025, 551064, 883600, 1421767, 2284870, 3680296, 5924725, 9551161, 15393855, 24834827, 40061700
Offset: 1

Views

Author

Vladeta Jovovic, Sep 13 2007

Keywords

Crossrefs

Column k=2 of A235998.
Cf. A242900 (with distinct multiplicities).

Programs

  • Maple
    with(numtheory):
    a:= n-> add(add(add(binomial(j+(n-i*j)/d, j), d=select(x->xAlois P. Heinz, Feb 01 2014
  • Mathematica
    Rest@ CoefficientList[ Series[ Sum[ x^(i + j)*(x^i + x^j - 2)/((x^i - 1)*(x^j - 1)*(x^i + x^j - 1)), {i, 2, 37}, {j, i - 1}], {x, 0, 37}], x] (* Robert G. Wilson v, Sep 16 2007 *)

Formula

G.f.: Sum(Sum(x^(i+j)*(x^i+x^j-2)/((x^i-1)*(x^j-1)*(x^i+x^j-1)), j=1..i-1), i=2..infinity).
a(n) ~ 1/sqrt(5) * ((1+sqrt(5))/2)^(n+1). - Vaclav Kotesovec, May 01 2014

Extensions

More terms from Robert G. Wilson v, Sep 16 2007

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)).
Showing 1-4 of 4 results.