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 54 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

A374249 Numbers k such that the k-th composition in standard order has its equal parts contiguous.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 47, 48, 50, 52, 56, 58, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 78, 79, 80, 81, 83, 84, 85
Offset: 1

Views

Author

Gus Wiseman, Jul 13 2024

Keywords

Comments

These are compositions avoiding the patterns (1,2,1) and (2,1,2).
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their standard compositions begin:
   0: ()
   1: (1)
   2: (2)
   3: (1,1)
   4: (3)
   5: (2,1)
   6: (1,2)
   7: (1,1,1)
   8: (4)
   9: (3,1)
  10: (2,2)
  11: (2,1,1)
  12: (1,3)
  14: (1,1,2)
  15: (1,1,1,1)
  16: (5)
See A374253 for the complement: 13, 22, 25, 27, 29, ...
		

Crossrefs

The strict (also anti-run) case is A233564, counted by A032020.
Compositions of this type are counted by A274174.
Permutations of prime indices of this type are counted by A333175.
The complement is A374253 (anti-run A374254), counted by A335548.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A066099 lists compositions in standard order.
A124767 counts runs in standard compositions, anti-runs A333381.
A333755 counts compositions by number of runs.
A335454 counts patterns matched by standard compositions.
A335462 counts (1,2,1)- and (2,1,2)-matching permutations of prime indices.
- A335470 counts (1,2,1)-matching compositions, ranks A335466.
- A335471 counts (1,2,1)-avoiding compositions, ranks A335467.
- A335472 counts (2,1,2)-matching compositions, ranks A335468.
- A335473 counts (2,1,2)-avoiding compositions, ranks A335469.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],UnsameQ@@First/@Split[stc[#]]&]

Formula

Equals A335467 /\ A335469.

A047967 Number of partitions of n with some part repeated.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 7, 10, 16, 22, 32, 44, 62, 83, 113, 149, 199, 259, 339, 436, 563, 716, 913, 1151, 1453, 1816, 2271, 2818, 3496, 4309, 5308, 6502, 7959, 9695, 11798, 14298, 17309, 20877, 25151, 30203, 36225, 43323, 51748, 61651, 73359, 87086, 103254, 122164
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of n with at least one even part. - Vladeta Jovovic, Sep 10 2003. Example: a(5)=4 because we have [4,1], [3,2], [2,2,1] and [2,1,1,1] ([5], [3,1,1] and [1,1,1,1,1] do not qualify). - Emeric Deutsch, Mar 30 2006
Also number of partitions of n (where it is assumed that the least part is 0) such that at least one difference is at least two. Example: a(5)=4 because we have [5,0], [4,1,0], [3,2,0] and [3,1,1,0] ([2,2,1,0], [2,1,1,1,0] and [1,1,1,1,1,0] do not qualify). - Emeric Deutsch, Mar 30 2006
The Heinz numbers of these partitions (with some part repeated) are given by A013929. Equivalent to Vladeta Jovovic's comment, a(n) is also the number of integer partitions whose product of parts is even. The Heinz numbers of these latter partitions are given by A324929. - Gus Wiseman, Mar 23 2019

Examples

			a(5) = 4 because we have [3,1,1], [2,2,1], [2,1,1,1] and [1,1,1,1,1] ([5], [4,1] and [3,2] do not qualify).
		

Crossrefs

Column k=1 of A320264.

Programs

  • Maple
    g:=sum(x^(2*k)*product(1+x^j,j=k+1..70)/product(1-x^j,j=1..k),k=1..40): gser:=series(g,x=0,50): seq(coeff(gser,x,n),n=0..44); # Emeric Deutsch, Mar 30 2006
  • Mathematica
    Table[PartitionsP[n]-PartitionsQ[n],{n,0,50}] (* Harvey P. Dale, Jan 17 2019 *)
  • PARI
    x='x+O('x^66); concat([0,0], Vec(1/eta(x)-eta(x^2)/eta(x))) \\ Joerg Arndt, Jun 21 2011

Formula

a(n) = A000041(n) - A000009(n).
G.f.: Sum_{k>=1} x^(2*k)*(Product_{j>=k+1} (1+x^j)) / Product_{j=1..k} (1-x^j) = Sum_{k>=1} x^(2*k)/(Product_{j=1..2*k} (1-x^j)*Product_{j>=k} (1-x^(2*j+1))). - Emeric Deutsch, Mar 30 2006
G.f.: 1/P(x) - P(x^2)/P(x) where P(x) = Product_{k>=1} (1-x^k). - Joerg Arndt, Jun 21 2011
a(n) = p(n-2)+p(n-4)-p(n-10)-p(n-14)+...+(-1^(j-1))*p(n-j*(3*j-1)) + (-1^(j-1))*p(n-j*(3*j+1))+..., where p(n) = A000041(n). - Gregory L. Simay, Aug 28 2023

A374632 Number of integer compositions of n whose leaders of weakly increasing runs are distinct.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 23, 40, 69, 119, 200, 335, 557, 917, 1499, 2433, 3920, 6280, 10004, 15837, 24946, 39087, 60952, 94606, 146203, 224957, 344748, 526239, 800251, 1212527, 1830820, 2754993, 4132192, 6178290, 9209308, 13686754, 20282733, 29973869, 44175908, 64936361
Offset: 0

Views

Author

Gus Wiseman, Jul 23 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.

Examples

			The composition (4,2,2,1,1,3) has weakly increasing runs ((4),(2,2),(1,1,3)), with leaders (4,2,1), so is counted under a(13).
The a(0) = 1 through a(5) = 13 compositions:
  ()  (1)  (2)   (3)    (4)     (5)
           (11)  (12)   (13)    (14)
                 (21)   (22)    (23)
                 (111)  (31)    (32)
                        (112)   (41)
                        (211)   (113)
                        (1111)  (122)
                                (212)
                                (221)
                                (311)
                                (1112)
                                (2111)
                                (11111)
		

Crossrefs

Ranked by A374768 = positions of distinct rows in A374629 (sums A374630).
Types of runs (instead of weakly increasing):
- For leaders of constant runs we have A274174, ranks A374249.
- For leaders of anti-runs we have A374518, ranks A374638.
- For leaders of strictly increasing runs we have A374687, ranks A374698.
- For leaders of weakly decreasing runs we have A374743, ranks A335467.
- For leaders of strictly decreasing runs we have A374761, ranks A374767.
Types of run-leaders (instead of distinct):
- For strictly decreasing leaders we appear to have A188920.
- For weakly decreasing leaders we appear to have A189076.
- For identical leaders we have A374631.
- For weakly increasing leaders we have A374635.
- For strictly increasing leaders we have A374634.
A003242 counts anti-run compositions.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335456 counts patterns matched by compositions.
A374637 counts compositions by sum of leaders of weakly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],UnsameQ@@First/@Split[#,LessEqual]&]],{n,0,15}]
  • PARI
    dfs(m, r, v) = 1 + sum(s=1, min(m, r-1), if(!setsearch(v, s), dfs(m-s, s, setunion(v, [s]))*x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, setunion(v, [s]))*x^(s+t)/prod(i=s, t, 1-x^i))));
    lista(nn) = Vec(dfs(nn, nn+1, []) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374635 Number of integer compositions of n whose leaders of weakly increasing runs are themselves weakly increasing.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 36, 69, 130, 247, 467, 890, 1689, 3213, 6110, 11627, 22121, 42101, 80124, 152512, 290300, 552609, 1051953, 2002583, 3812326, 7257679, 13816867, 26304254, 50077792, 95338234, 181505938, 345554234, 657874081, 1252478707, 2384507463, 4539705261
Offset: 0

Views

Author

Gus Wiseman, Jul 23 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.

Examples

			The composition (1,3,3,2,4,2) has weakly increasing runs ((1,3,3),(2,4),(2)), with leaders (1,2,2), so is counted under a(15).
The a(0) = 1 through a(6) = 20 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)
           (11)  (12)   (13)    (14)     (15)
                 (111)  (22)    (23)     (24)
                        (112)   (113)    (33)
                        (121)   (122)    (114)
                        (1111)  (131)    (123)
                                (1112)   (132)
                                (1121)   (141)
                                (1211)   (222)
                                (11111)  (1113)
                                         (1122)
                                         (1131)
                                         (1212)
                                         (1221)
                                         (1311)
                                         (11112)
                                         (11121)
                                         (11211)
                                         (12111)
                                         (111111)
		

Crossrefs

Ranked by positions of weakly increasing rows in A374629 (sums A374630).
Types of runs (instead of weakly increasing):
- For leaders of constant runs we have A000041.
- For leaders of weakly decreasing runs we have A188900.
- For leaders of anti-runs we have A374681.
- For leaders of strictly increasing runs we have A374690.
- For leaders of strictly decreasing runs we have A374764.
Types of run-leaders (instead of weakly increasing):
- For strictly decreasing leaders we appear to have A188920.
- For weakly decreasing leaders we appear to have A189076.
- For identical leaders we have A374631.
- For distinct leaders we have A374632, ranks A374768.
- For strictly increasing leaders we have A374634.
A003242 counts anti-run compositions.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A335456 counts patterns matched by compositions.
A335548 counts non-contiguous compositions, ranks A374253.
A374637 counts compositions by sum of leaders of weakly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],LessEqual@@First/@Split[#,LessEqual]&]],{n,0,15}]
  • PARI
    dfs(m, r, u) = 1 + sum(s=u, min(m, r-1), x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, s)*x^(s+t)/prod(i=s, t, 1-x^i)));
    lista(nn) = Vec(dfs(nn, nn+1, 1) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374700 Triangle read by rows where T(n,k) is the number of integer compositions of n whose leaders of strictly increasing runs sum to k.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 1, 0, 3, 0, 1, 2, 0, 5, 0, 1, 3, 5, 0, 7, 0, 2, 4, 6, 9, 0, 11, 0, 2, 7, 10, 13, 17, 0, 15, 0, 3, 8, 20, 23, 24, 28, 0, 22, 0, 3, 14, 26, 47, 47, 42, 47, 0, 30, 0, 5, 17, 45, 66, 101, 92, 71, 73, 0, 42, 0, 5, 27, 61, 124, 154, 201, 166, 116, 114, 0, 56
Offset: 0

Views

Author

Gus Wiseman, Jul 27 2024

Keywords

Comments

The leaders of strictly increasing runs in a sequence are obtained by splitting it into maximal strictly increasing subsequences and taking the first term of each.

Examples

			Triangle begins:
   1
   0   1
   0   0   2
   0   1   0   3
   0   1   2   0   5
   0   1   3   5   0   7
   0   2   4   6   9   0  11
   0   2   7  10  13  17   0  15
   0   3   8  20  23  24  28   0  22
   0   3  14  26  47  47  42  47   0  30
   0   5  17  45  66 101  92  71  73   0  42
   0   5  27  61 124 154 201 166 116 114   0  56
   0   7  33 101 181 300 327 379 291 182 170   0  77
   0   8  48 138 307 467 668 656 680 488 282 253   0 101
Row n = 6 counts the following compositions:
  .  (15)   (24)    (231)   (312)    .  (6)
     (123)  (141)   (213)   (2121)      (51)
            (114)   (132)   (2112)      (42)
            (1212)  (1311)  (1221)      (411)
                    (1131)  (1122)      (33)
                    (1113)  (12111)     (321)
                            (11211)     (3111)
                            (11121)     (222)
                            (11112)     (2211)
                                        (21111)
                                        (111111)
		

Crossrefs

Column n = k is A000041.
Column k = 1 is A096765.
Column k = 2 is A374705.
Row-sums are A011782.
For length instead of sum we have A333213.
Leaders of strictly increasing runs in standard compositions are A374683.
The corresponding rank statistic is A374684.
Other types of runs (instead of strictly increasing):
- For leaders of constant runs we have A373949.
- For leaders of anti-runs we have A374521.
- For leaders of weakly increasing runs we have A374637.
- For leaders of weakly decreasing runs we have A374748.
- For leaders of strictly decreasing runs we have A374766.
A003242 counts anti-run compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A335548 counts non-contiguous compositions, ranks A374253.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Total[First/@Split[#,Less]]==k&]],{n,0,15},{k,0,n}]

A351017 Number of binary words of length n with all distinct run-lengths.

Original entry on oeis.org

1, 2, 2, 6, 6, 10, 22, 26, 38, 54, 114, 130, 202, 266, 386, 702, 870, 1234, 1702, 2354, 3110, 5502, 6594, 9514, 12586, 17522, 22610, 31206, 48630, 60922, 83734, 111482, 149750, 196086, 261618, 336850, 514810, 631946, 862130, 1116654, 1502982, 1916530, 2555734, 3242546
Offset: 0

Views

Author

Gus Wiseman, Feb 07 2022

Keywords

Examples

			The a(0) = 1 through a(6) = 22 words:
  {}  0   00   000   0000   00000   000000
      1   11   001   0001   00001   000001
               011   0111   00011   000011
               100   1000   00111   000100
               110   1110   01111   000110
               111   1111   10000   001000
                            11000   001110
                            11100   001111
                            11110   011000
                            11111   011100
                                    011111
                                    100000
                                    100011
                                    100111
                                    110000
                                    110001
                                    110111
                                    111001
                                    111011
                                    111100
                                    111110
                                    111111
		

Crossrefs

Using binary expansions instead of words gives A032020, ranked by A044813.
The version for partitions is A098859.
The complement is counted by twice A261982.
The version for compositions is A329739, for runs A351013.
For runs instead of run-lengths we have A351016, twice A351018.
The version for patterns is A351292, for runs A351200.
A000120 counts binary weight.
A001037 counts binary Lyndon words, necklaces A000031, aperiodic A027375.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329767 counts binary words by runs-resistance.
A351014 counts distinct runs in standard compositions.
A351204 counts partitions where every permutation has all distinct runs.
A351290 ranks compositions with all distinct runs.

Programs

  • Mathematica
    Table[Length[Select[Tuples[{0,1},n],UnsameQ@@Length/@Split[#]&]],{n,0,10}]
  • Python
    from itertools import groupby, product
    def adrl(s):
        runlens = [len(list(g)) for k, g in groupby(s)]
        return len(runlens) == len(set(runlens))
    def a(n):
        if n == 0: return 1
        return 2*sum(adrl("1"+"".join(w)) for w in product("01", repeat=n-1))
    print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 08 2022

Formula

a(n>0) = 2 * A032020(n).

Extensions

a(25)-a(32) from Michael S. Branicky, Feb 08 2022
More terms from David A. Corneth, Feb 08 2022 using data from A032020

A056823 Number of compositions minus number of partitions: A011782(n) - A000041(n).

Original entry on oeis.org

0, 0, 0, 1, 3, 9, 21, 49, 106, 226, 470, 968, 1971, 3995, 8057, 16208, 32537, 65239, 130687, 261654, 523661, 1047784, 2096150, 4193049, 8387033, 16775258, 33551996, 67105854, 134214010, 268430891, 536865308, 1073734982, 2147475299, 4294957153, 8589922282
Offset: 0

Views

Author

Alford Arnold, Aug 29 2000

Keywords

Comments

Previous name was: Counts members of A056808 by number of factors.
A056808 relates to least prime signatures (cf. A025487)
a(n) is also the number of compositions of n that are not partitions of n. - Omar E. Pol, Jan 31 2009, Oct 14 2013
a(n) is the number of compositions of n into positive parts containing pattern [1,2]. - Bob Selcoe, Jul 08 2014

Examples

			A011782 begins     1 1 2 4 8 16 32 64 128 256 ...;
A000041 begins     1 1 2 3 5  7 11 15  22  30 ...;
so sequence begins 0 0 0 1 3  9 21 49 106 226 ... .
For n = 3 the factorizations are 8=2*2*2, 12=2*2*3, 18=2*3*3 and 30=2*3*5.
a(5) = 9: {[1,1,1,2], [1,1,2,1], [1,1,3], [1,2,1,1], [1,2,2], [1,3,1], [1,4], [2,1,2], [2,3]}. - _Bob Selcoe_, Jul 08 2014
		

Crossrefs

The version for patterns is A002051.
(1,2)-avoiding compositions are just partitions A000041.
The (1,1)-matching version is A261982.
The version for prime indices is A335447.
(1,2)-matching compositions are ranked by A335485.
Patterns matched by compositions are counted by A335456.

Programs

  • Maple
    a:= n-> ceil(2^(n-1))-combinat[numbpart](n):
    seq(a(n), n=0..37);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!GreaterEqual@@#&]],{n,0,10}] (* Gus Wiseman, Jun 24 2020 *)
    a[n_] := If[n == 0, 0, 2^(n-1) - PartitionsP[n]];
    a /@ Range[0, 37] (* Jean-François Alcover, May 23 2021 *)

Formula

a(n) = A011782(n) - A000041(n).
a(n) = 2*a(n-1) + A117989(n-1). - Bob Selcoe, Apr 11 2014
G.f.: (1 - x) / (1 - 2*x) - Product_{k>=1} 1 / (1 - x^k). - Ilya Gutkovskiy, Jan 30 2020

Extensions

More terms from James Sellers, Aug 31 2000
New name from Joerg Arndt, Sep 02 2013

A374634 Number of integer compositions of n whose leaders of weakly increasing runs are strictly increasing.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 12, 17, 28, 43, 67, 103, 162, 245, 374, 569, 854, 1278, 1902, 2816, 4148, 6087, 8881, 12926, 18726, 27042, 38894, 55789, 79733, 113632, 161426, 228696, 323049, 455135, 639479, 896249, 1252905, 1747327, 2431035, 3374603, 4673880, 6459435, 8908173
Offset: 0

Views

Author

Gus Wiseman, Jul 23 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.

Examples

			The composition (1,3,3,2,4,3) has weakly increasing runs ((1,3,3),(2,4),(3)), with leaders (1,2,3), so is counted under a(16).
The a(0) = 1 through a(7) = 17 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)       (7)
           (11)  (12)   (13)    (14)     (15)      (16)
                 (111)  (22)    (23)     (24)      (25)
                        (112)   (113)    (33)      (34)
                        (1111)  (122)    (114)     (115)
                                (1112)   (123)     (124)
                                (11111)  (132)     (133)
                                         (222)     (142)
                                         (1113)    (223)
                                         (1122)    (1114)
                                         (11112)   (1123)
                                         (111111)  (1132)
                                                   (1222)
                                                   (11113)
                                                   (11122)
                                                   (111112)
                                                   (1111111)
		

Crossrefs

Ranked by positions of strictly increasing rows in A374629 (sums A374630).
Types of runs (instead of weakly increasing):
- For leaders of constant runs we have A000041.
- For leaders of anti-runs we have A374679.
- For leaders of strictly increasing runs we have A374688.
- For leaders of strictly decreasing runs we have A374762.
Types of run-leaders (instead of strictly increasing):
- For strictly decreasing leaders we appear to have A188920.
- For weakly decreasing leaders we appear to have A189076.
- For identical leaders we have A374631.
- For distinct leaders we have A374632, ranks A374768.
- For weakly increasing leaders we have A374635.
A003242 counts anti-run compositions.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A335456 counts patterns matched by compositions.
A335548 counts non-contiguous compositions, ranks A374253.
A374637 counts compositions by sum of leaders of weakly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Less@@First/@Split[#,LessEqual]&]],{n,0,15}]
  • PARI
    dfs(m, r, u) = 1 + sum(s=u+1, min(m, r-1), x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, s)*x^(s+t)/prod(i=s, t, 1-x^i)));
    lista(nn) = Vec(dfs(nn, nn+1, 0) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374631 Number of integer compositions of n whose leaders of weakly increasing runs are identical.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 19, 34, 63, 116, 218, 405, 763, 1436, 2714, 5127, 9718, 18422, 34968, 66397, 126168, 239820, 456027, 867325, 1649970, 3139288, 5973746, 11368487, 21636909, 41182648, 78389204, 149216039, 284046349, 540722066, 1029362133, 1959609449
Offset: 0

Views

Author

Gus Wiseman, Jul 23 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.

Examples

			The composition (1,3,1,4,1,2,2,1) has maximal weakly increasing subsequences ((1,3),(1,4),(1,2,2),(1)), with leaders (1,1,1,1), so is counted under a(15).
The a(0) = 1 through a(6) = 19 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)
           (11)  (12)   (13)    (14)     (15)
                 (111)  (22)    (23)     (24)
                        (112)   (113)    (33)
                        (121)   (122)    (114)
                        (1111)  (131)    (123)
                                (1112)   (141)
                                (1121)   (222)
                                (1211)   (1113)
                                (11111)  (1122)
                                         (1131)
                                         (1212)
                                         (1221)
                                         (1311)
                                         (11112)
                                         (11121)
                                         (11211)
                                         (12111)
                                         (111111)
		

Crossrefs

Ranked by A374633 = positions of identical rows in A374629 (sums A374630).
Types of runs (instead of weakly increasing):
- For leaders of identical runs we have A000005 for n > 0, ranks A272919.
- For leaders of anti-runs we have A374517, ranks A374519.
- For leaders of strictly increasing runs we have A374686, ranks A374685.
- For leaders of weakly decreasing runs we have A374742, ranks A374744.
- For leaders of strictly decreasing runs we have A374760, ranks A374759.
Types of run-leaders (instead of identical):
- For strictly decreasing leaders we appear to have A188920.
- For weakly decreasing leaders we appear to have A189076.
- For distinct leaders we have A374632, ranks A374768.
- For strictly increasing leaders we have A374634.
- For weakly increasing leaders we have A374635.
A003242 counts anti-run compositions.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A335456 counts patterns matched by compositions.
A335548 counts non-contiguous compositions, ranks A374253.
A374637 counts compositions by sum of leaders of weakly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],SameQ@@First/@Split[#,LessEqual]&]],{n,0,15}]
  • PARI
    C_x(N) = {my(x='x+O('x^N), h=1+sum(i=1,N, 1/(1-x^i)*(x^i+sum(z=1,N-i+1, (x^i/(1-x^i)*(-1+(1/prod(j=i+1,N-i,1-x^j))))^z)))); Vec(h)}
    C_x(40) \\ John Tyler Rascoe, Jul 25 2024

Formula

G.f.: 1 + Sum_{i>0} A(x,i) where A(x,i) = 1/(1-x^i) * (x^i + Sum_{z>0} ( ((x^i)/(1-x^i) * (-1 + Product_{j>i} (1/(1-x^j))))^z )) is the g.f. for compositions of this kind with all leaders equal to i. - John Tyler Rascoe, Jul 25 2024

Extensions

a(26) onwards from John Tyler Rascoe, Jul 25 2024
Showing 1-10 of 54 results. Next