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-10 of 11 results. Next

A032020 Number of compositions (ordered partitions) of n into distinct parts.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 11, 13, 19, 27, 57, 65, 101, 133, 193, 351, 435, 617, 851, 1177, 1555, 2751, 3297, 4757, 6293, 8761, 11305, 15603, 24315, 30461, 41867, 55741, 74875, 98043, 130809, 168425, 257405, 315973, 431065, 558327, 751491, 958265, 1277867, 1621273
Offset: 0

Views

Author

Christian G. Bower, Apr 01 1998

Keywords

Comments

Compositions into distinct parts are equivalent to (1,1)-avoiding compositions. - Gus Wiseman, Jun 25 2020
All terms are odd. - Alois P. Heinz, Apr 09 2021

Examples

			a(6) = 11 because 6 = 5+1 = 4+2 = 3+2+1 = 3+1+2 = 2+4 = 2+3+1 = 2+1+3 = 1+5 = 1+3+2 = 1+2+3.
From _Gus Wiseman_, Jun 25 2020: (Start)
The a(0) = 1 through a(7) = 13 strict compositions:
  ()  (1)  (2)  (3)    (4)    (5)    (6)      (7)
                (1,2)  (1,3)  (1,4)  (1,5)    (1,6)
                (2,1)  (3,1)  (2,3)  (2,4)    (2,5)
                              (3,2)  (4,2)    (3,4)
                              (4,1)  (5,1)    (4,3)
                                     (1,2,3)  (5,2)
                                     (1,3,2)  (6,1)
                                     (2,1,3)  (1,2,4)
                                     (2,3,1)  (1,4,2)
                                     (3,1,2)  (2,1,4)
                                     (3,2,1)  (2,4,1)
                                              (4,1,2)
                                              (4,2,1)
(End)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17.

Crossrefs

Row sums of A241719.
Main diagonal of A261960.
Dominated by A003242 (anti-run compositions).
These compositions are ranked by A233564.
(1,1)-avoiding patterns are counted by A000142.
Numbers with strict prime signature are A130091.
(1,1,1)-avoiding compositions are counted by A232432.
(1,1)-matching compositions are counted by A261982.
Inseparable partitions are counted by A325535.
Patterns matched by compositions are counted by A335456.
Strict permutations of prime indices are counted by A335489.

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
          -> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0))) end:
    a:= proc(n) local l; l:=b(n, n): add((i-1)! *l[i], i=1..nops(l)) end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 12 2012
    # second Maple program:
    T:= proc(n, k) option remember; `if`(k<0 or n<0, 0,
          `if`(k=0, `if`(n=0, 1, 0), T(n-k, k) +k*T(n-k, k-1)))
        end:
    a:= n-> add(T(n, k), k=0..floor((sqrt(8*n+1)-1)/2)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Sep 04 2015
  • Mathematica
    f[list_]:=Length[list]!; Table[Total[Map[f, Select[IntegerPartitions[n], Sort[#] == Union[#] &]]], {n, 0,30}]
    T[n_, k_] := T[n, k] = If[k<0 || n<0, 0, If[k==0, If[n==0, 1, 0], T[n-k, k] + k*T[n-k, k-1]]]; a[n_] := Sum[T[n, k], {k, 0, Floor[(Sqrt[8*n + 1] - 1) / 2]}]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Sep 22 2015, after Alois P. Heinz *)
  • PARI
    N=66;  q='q+O('q^N);
    gf=sum(n=0,N, n!*q^(n*(n+1)/2) / prod(k=1,n, 1-q^k ) );
    Vec(gf)
    /* Joerg Arndt, Oct 20 2012 */
    
  • PARI
    Q(N) = { \\ A008289
      my(q = vector(N)); q[1] = [1, 0, 0, 0];
      for (n = 2, N,
        my(m = (sqrtint(8*n+1) - 1)\2);
        q[n] = vector((1 + (m>>2)) << 2); q[n][1] = 1;
        for (k = 2, m, q[n][k] = q[n-k][k] + q[n-k][k-1]));
      return(q);
    };
    seq(N) = concat(1, apply(q -> sum(k = 1, #q, q[k] * k!), Q(N)));
    seq(43) \\ Gheorghe Coserea, Sep 09 2018

Formula

"AGK" (ordered, elements, unlabeled) transform of 1, 1, 1, 1, ...
G.f.: Sum_{k>=0} k! * x^((k^2+k)/2) / Product_{j=1..k} (1-x^j). - David W. Wilson May 04 2000
a(n) = Sum_{m=1..n} A008289(n,m)*m!. - Geoffrey Critzer, Sep 07 2012

A241720 Number of compositions of n into distinct parts with exactly one descent.

Original entry on oeis.org

1, 1, 2, 6, 7, 11, 16, 31, 36, 55, 71, 101, 147, 188, 245, 327, 421, 540, 732, 899, 1154, 1445, 1831, 2253, 2846, 3545, 4352, 5352, 6576, 7993, 9778, 11826, 14314, 17430, 20866, 25076, 30043, 35974, 42776, 51053, 60463, 71772, 85094, 100370, 118155, 139331
Offset: 3

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Examples

			a(3) = 1: [2,1].
a(4) = 1: [3,1].
a(5) = 2: [3,2], [4,1].
a(6) = 6: [4,2], [5,1], [2,3,1], [3,1,2], [1,3,2], [2,1,3].
a(7) = 7: [4,3], [5,2], [6,1], [2,4,1], [4,1,2], [1,4,2], [2,1,4].
a(8) = 11: [6,2], [5,3], [7,1], [1,4,3], [3,1,4], [2,1,5], [3,4,1], [2,5,1], [5,1,2], [1,5,2], [4,1,3].
a(9) = 16: [5,4], [8,1], [7,2], [6,3], [2,6,1], [3,5,1], [6,1,2], [1,6,2], [2,1,6], [3,4,2], [4,2,3], [5,1,3], [2,4,3], [1,5,3], [3,2,4], [3,1,5].
		

Crossrefs

Column k=1 of A241719.

A241721 Number of compositions of n into distinct parts with exactly two descents.

Original entry on oeis.org

1, 1, 2, 3, 15, 16, 29, 41, 65, 144, 179, 269, 382, 549, 739, 1286, 1564, 2254, 2978, 4124, 5304, 7264, 10157, 12941, 17027, 22194, 28663, 36884, 47306, 59837, 79467, 98114, 125117, 156392, 198113, 244710, 307908, 378429, 471337, 588642, 721300, 884498
Offset: 6

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Examples

			a(9) = 3: [6,2,1], [5,3,1], [4,3,2].
a(10) = 15: [5,4,1], [7,2,1], [6,3,1], [5,3,2], [4,1,3,2], [2,1,4,3], [4,3,1,2], [4,2,3,1], [2,4,3,1], [1,4,3,2], [3,1,4,2], [3,2,4,1], [3,4,2,1], [4,2,1,3], [3,2,1,4].
		

Crossrefs

Column k=2 of A241719.

A241722 Number of compositions of n into distinct parts with exactly three descents.

Original entry on oeis.org

1, 1, 2, 3, 5, 32, 35, 63, 93, 148, 205, 589, 674, 1111, 1551, 2344, 3140, 4616, 8210, 10370, 14976, 20564, 28598, 38244, 52451, 68597, 105527, 131194, 180087, 234267, 316204, 404032, 538282, 683281, 893039, 1205430, 1516912, 1949691, 2506797, 3192751, 4039430
Offset: 10

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Examples

			a(14) = 5: [5,4,3,2], [8,3,2,1], [6,5,2,1], [7,4,2,1], [6,4,3,1].
a(15) = 32: [7,5,2,1], [9,3,2,1], [6,5,3,1], [7,4,3,1], [8,4,2,1], [6,4,3,2], [4,3,2,5,1], [3,5,4,2,1], [4,3,5,2,1], [5,2,4,3,1], [2,5,4,3,1], [4,2,5,3,1], [5,4,3,1,2], [5,1,4,3,2], [3,1,5,4,2], [5,3,1,4,2], [4,1,5,3,2], [1,5,4,3,2], [5,4,1,3,2], [4,3,1,5,2], [5,4,2,1,3], [2,1,5,4,3], [5,2,1,4,3], [4,2,1,5,3], [3,2,1,5,4], [5,3,2,1,4], [4,3,2,1,5], [5,4,2,3,1], [5,3,4,2,1], [4,5,3,2,1], [3,2,5,4,1], [5,3,2,4,1].
		

Crossrefs

Column k=3 of A241719.

A241723 Number of compositions of n into distinct parts with exactly four descents.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 67, 70, 132, 194, 315, 436, 674, 2046, 2401, 3948, 5669, 8582, 11784, 17312, 23187, 47121, 56974, 86078, 116892, 169282, 223496, 316211, 413133, 565423, 879530, 1111950, 1523112, 2042569, 2744398, 3588200, 4804470, 6199849, 8142059, 10485846
Offset: 15

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Examples

			a(20) = 7: [7,6,4,2,1], [8,5,4,2,1], [10,4,3,2,1], [8,6,3,2,1], [9,5,3,2,1], [6,5,4,3,2], [7,5,4,3,1].
		

Crossrefs

Column k=4 of A241719.

A241724 Number of compositions of n into distinct parts with exactly five descents.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 134, 140, 266, 395, 644, 898, 1391, 1890, 6923, 7789, 13309, 18958, 29500, 40173, 60154, 80506, 114580, 237383, 290326, 436413, 609703, 876498, 1179323, 1672718, 2211328, 3033278, 4006213, 6582029, 8104364, 11507527, 15185574, 20938573
Offset: 21

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Crossrefs

Column k=5 of A241719.

A241725 Number of compositions of n into distinct parts with exactly six descents.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 268, 275, 532, 790, 1300, 1811, 2822, 3836, 5598, 21972, 24736, 42360, 61478, 95459, 131430, 197368, 265795, 379046, 510385, 1142239, 1352589, 2108022, 2898138, 4263545, 5709193, 8215288, 10832575, 15040276, 19845562, 26770982
Offset: 28

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Crossrefs

Column k=6 of A241719.

A241726 Number of compositions of n into distinct parts with exactly seven descents.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 531, 542, 1056, 1576, 2599, 3630, 5668, 7716, 11274, 15348, 68774, 75382, 132851, 191346, 301710, 414613, 628232, 845401, 1213643, 1634287, 2256360, 5137346, 6161809, 9496049, 13277964, 19515699, 26349160, 37943650, 50425938
Offset: 36

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Crossrefs

Column k=7 of A241719.

A241727 Number of compositions of n into distinct parts with exactly eight descents.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 1054, 1067, 2099, 3133, 5188, 7248, 11344, 15447, 22604, 30783, 43034, 208950, 229344, 404422, 588651, 930608, 1284764, 1951323, 2636169, 3789105, 5119060, 7075832, 9369369, 22789793, 26524108, 41851347, 58150258, 86514208
Offset: 45

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Crossrefs

Column k=8 of A241719.

A241728 Number of compositions of n into distinct parts with exactly nine descents.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 2091, 2111, 4169, 6236, 10344, 14464, 22663, 30880, 45215, 61610, 86165, 114823, 633991, 681039, 1224713, 1780658, 2839351, 3916439, 5986776, 8083675, 11666364, 15768163, 21850338, 28948248, 39487845, 96599064, 113083909
Offset: 55

Views

Author

Alois P. Heinz, Apr 27 2014

Keywords

Crossrefs

Column k=9 of A241719.
Showing 1-10 of 11 results. Next