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 17 results. Next

A238349 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k parts p at position p (fixed points), n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 3, 4, 1, 0, 0, 6, 7, 3, 0, 0, 0, 11, 16, 4, 1, 0, 0, 0, 22, 29, 12, 1, 0, 0, 0, 0, 42, 60, 23, 3, 0, 0, 0, 0, 0, 82, 120, 47, 7, 0, 0, 0, 0, 0, 0, 161, 238, 100, 12, 1, 0, 0, 0, 0, 0, 0, 316, 479, 198, 30, 1, 0, 0, 0, 0, 0, 0, 0, 624, 956, 404, 61, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1235, 1910, 818, 126, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

T(n*(n+3)/2,n) = A227682(n).
From Vaclav Kotesovec, Sep 07 2014: (Start)
In general, column k is asymptotic to c(k) * 2^n. The constants c(k) numerically:
c(0) = 0.144394047543301210639449860964615390044455952420342... = A048651/2
c(1) = 0.231997216225445223894202367545783700531838988546098... = c(0)*A065442
c(2) = 0.104261929557371534733906196116707679501974368826074...
c(3) = 0.017956317806894073430249112172514186063327165575720...
c(4) = 0.001343254222922697613125145839110293324517874530073...
c(5) = 0.000046459767012163920051487037952792359225887287888...
c(6) = 0.000000768651747857094917953943327540619110335556499...
c(7) = 0.000000006200599904985793344094393321042983316604040...
c(8) = 0.000000000024656652167851516076173236693314090168122...
c(9) = 0.000000000000048633746319332356416193899916110113745...
c(10)= 0.000000000000000047750743608910618576944191079881479...
c(20)= 1.05217230403079700467566...*10^(-63)
For big k is c(k) ~ m * 2^(-k*(k+1)/2), where m = 1/(4*c(0)) = 1/(2*A048651) = 1.7313733097275318...
(End)

Examples

			Triangle starts:
00:  1,
01:  0, 1,
02:  1, 1, 0,
03:  2, 1, 1, 0,
04:  3, 4, 1, 0, 0,
05:  6, 7, 3, 0, 0, 0,
06:  11, 16, 4, 1, 0, 0, 0,
07:  22, 29, 12, 1, 0, 0, 0, 0,
08:  42, 60, 23, 3, 0, 0, 0, 0, 0,
09:  82, 120, 47, 7, 0, 0, 0, 0, 0, 0,
10:  161, 238, 100, 12, 1, 0, 0, 0, 0, 0, 0,
11:  316, 479, 198, 30, 1, 0, 0, 0, 0, 0, 0, 0,
12:  624, 956, 404, 61, 3, 0, 0, 0, 0, 0, 0, 0, 0,
13:  1235, 1910, 818, 126, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14:  2449, 3817, 1652, 258, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
15:  4864, 7633, 3319, 537, 30, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
...
From _Gus Wiseman_, Apr 03 2022: (Start)
Row n = 5 counts the following compositions (empty columns indicated by dots):
  (5)     (14)     (113)   .  .  .
  (23)    (32)     (122)
  (41)    (131)    (1211)
  (212)   (221)
  (311)   (1112)
  (2111)  (1121)
          (11111)
(End)
		

References

  • M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.

Crossrefs

Row sums are A011782.
The version for permutations is A008290.
The version with all zeros removed is A238350.
The version for reversed partitions is A238352.
The corresponding rank statistic is A352512, nonfixed A352513.
The version for nonfixed points is A352523, A352520 (k=1).
Below: comps = compositions, first = column k=0, stat = rank statistic.
- A352521 counts comps by strong nonexcedances, first A219282, stat A352514.
- A352522 counts comps by weak nonexcedances, first A238874, stat A352515.
- A352524 counts comps by strong excedances, first A008930, stat A352516.
- A352525 counts comps by weak excedances, A177510 (k=1), stat A352517.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, expand(
           add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..15);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Expand[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 1]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Jan 06 2015, after Alois P. Heinz *)
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pq[#]==k&]],{n,0,9},{k,0,n}] (* Gus Wiseman, Apr 03 2022 *)

A114088 Triangle read by rows: T(n,k) is number of partitions of n whose tail below its Durfee square has k parts (n >= 1; 0 <= k <= n-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 3, 4, 3, 2, 1, 1, 1, 4, 5, 5, 3, 2, 1, 1, 1, 5, 6, 6, 5, 3, 2, 1, 1, 1, 6, 8, 8, 7, 5, 3, 2, 1, 1, 1, 7, 10, 10, 9, 7, 5, 3, 2, 1, 1, 1, 9, 13, 13, 12, 10, 7, 5, 3, 2, 1, 1, 1, 10, 16, 17, 15, 13, 10, 7, 5, 3, 2, 1, 1, 1, 12, 20, 22, 20, 17
Offset: 1

Views

Author

Emeric Deutsch, Feb 12 2006

Keywords

Comments

From Gus Wiseman, May 21 2022: (Start)
Also the number of integer partitions of n with k parts below the diagonal. For example, the partition (3,2,2,1) has two parts (at positions 3 and 4) below the diagonal (1,2,3,4). Row n = 8 counts the following partitions:
8 71 611 5111 41111 311111 2111111 11111111
44 332 2222 22211 221111
53 422 3221 32111
62 431 3311
521 4211
Indices of parts below the diagonal are also called strong nonexcedances.
(End)

Examples

			T(7,2)=3 because we have [5,1,1], [3,2,1,1] and [2,2,2,1] (the bottom tails are [1,1], [1,1] and [2,1], respectively).
Triangle starts:
  1;
  1, 1;
  1, 1, 1;
  2, 1, 1, 1;
  2, 2, 1, 1, 1;
  3, 3, 2, 1, 1, 1;
  3, 4, 3, 2, 1, 1, 1;
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976 (pp. 27-28).
  • G. E. Andrews and K. Eriksson, Integer Partitions, Cambridge Univ. Press, 2004 (pp. 75-78).

Crossrefs

Row sums: A000041.
Column k = 0: A003114.
Weak opposite: A115994.
Permutations: A173018, weak A123125.
Ordered: A352521, rank stat A352514, weak A352522.
Opposite ordered: A352524, first col A008930, rank stat A352516.
Weak opposite ordered: A352525, first col A177510, rank stat A352517.
Weak: A353315.
Opposite: A353318.
A000700 counts self-conjugate partitions, ranked by A088902.
A115720 counts partitions by Durfee square, rank stat A257990.
A352490 gives the (strong) nonexcedance set of A122111, counted by A000701.

Programs

  • Maple
    g:=sum(z^(k^2)/product((1-z^j)*(1-t*z^j),j=1..k),k=1..20): gserz:=simplify(series(g,z=0,30)): for n from 1 to 14 do P[n]:=coeff(gserz,z^n) od: for n from 1 to 14 do seq(coeff(t*P[n],t^j),j=1..n) od; # yields sequence in triangular form
  • Mathematica
    subdiags[y_]:=Length[Select[Range[Length[y]],#>y[[#]]&]];
    Table[Length[Select[IntegerPartitions[n],subdiags[#]==k&]],{n,1,15},{k,0,n-1}] (* Gus Wiseman, May 21 2022 *)
  • PARI
    T_qt(max_row) = {my(N=max_row+1, q='q+O('q^N), h = sum(k=1,N, q^(k^2)/prod(j=1,k, (1-q^j)*(1-t*q^j))) ); for(i=1, N-1, print(Vecrev(polcoef(h, i))))}
    T_qt(10) \\ John Tyler Rascoe, Oct 24 2024

Formula

G.f. = Sum_{k>=1} q^(k^2) / Product_{j=1..k} (1 - q^j)*(1 - t*q^j).
Sum_{k=0..n-1} k*T(n,k) = A114089(n).

A352523 Number of integer compositions of n with exactly k nonfixed points (parts not on the diagonal).

Original entry on oeis.org

1, 1, 0, 0, 2, 0, 1, 1, 2, 0, 0, 4, 2, 2, 0, 0, 5, 5, 4, 2, 0, 1, 3, 12, 8, 6, 2, 0, 0, 7, 14, 19, 14, 8, 2, 0, 0, 8, 21, 33, 32, 22, 10, 2, 0, 0, 9, 30, 54, 63, 54, 32, 12, 2, 0, 1, 6, 47, 80, 116, 116, 86, 44, 14, 2, 0, 0, 11, 53, 129, 194, 229, 202, 130, 58, 16, 2, 0
Offset: 0

Views

Author

Gus Wiseman, Mar 26 2022

Keywords

Comments

A nonfixed point in a composition c is an index i such that c_i != i.

Examples

			Triangle begins:
   1
   1   0
   0   2   0
   1   1   2   0
   0   4   2   2   0
   0   5   5   4   2   0
   1   3  12   8   6   2   0
   0   7  14  19  14   8   2   0
   0   8  21  33  32  22  10   2   0
   0   9  30  54  63  54  32  12   2   0
   1   6  47  80 116 116  86  44  14   2   0
   ...
For example, row n = 6 counts the following compositions (empty column indicated by dot):
  (123)  (6)   (24)    (231)    (2112)   (21111)    .
         (15)  (33)    (312)    (2121)   (111111)
         (42)  (51)    (411)    (3111)
               (114)   (1113)   (11112)
               (132)   (1122)   (11121)
               (141)   (1311)   (11211)
               (213)   (2211)
               (222)   (12111)
               (321)
               (1131)
               (1212)
               (1221)
		

Crossrefs

Column k = 0 is A010054.
Row sums are A011782.
The version for permutations is A098825.
The corresponding rank statistic is A352513.
Column k = 1 is A352520.
A238349 and A238350 count comps by fixed points, first col A238351, rank stat A352512.
A352486 gives the nonfixed points of A122111, counted by A330644.
A352521 counts comps by strong nonexcedances, first A219282, stat A352514.
A352522 counts comps by weak nonexcedances, first col A238874, stat A352515.
A352524 counts comps by strong excedances, first col A008930, stat A352516.
A352525 counts comps by weak excedances, first col A177510, stat A352517.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          add(`if`(i=j, 1, x)*b(n-j, i+1), j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Mar 19 2025
  • Mathematica
    pnq[y_]:=Length[Select[Range[Length[y]],#!=y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pnq[#]==k&]],{n,0,9},{k,0,n}]
  • PARI
    T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h= sum(i=0, N, prod(j=1, i, y*(x/(1-x)-x^j)+x^j))); vector(N, n, my(r=Vecrev(polcoeff(h, n-1))); if(n<2, r, concat(r,[0])))}
    T_xy(10) \\ John Tyler Rascoe, Mar 21 2025

Formula

G.f.: Sum_{i>=0} Product_{j=1..i} y*(x/(1-x) - x^j) + x^j. - John Tyler Rascoe, Mar 19 2025

A177510 Number of compositions (p0, p1, p2, ...) of n with pi - p0 <= i and pi >= p0.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 14, 25, 46, 87, 167, 324, 634, 1248, 2466, 4887, 9706, 19308, 38455, 76659, 152925, 305232, 609488, 1217429, 2432399, 4860881, 9715511, 19421029, 38826059, 77626471, 155211785, 310357462, 620608652, 1241046343, 2481817484, 4963191718, 9925669171, 19850186856, 39698516655, 79394037319
Offset: 0

Views

Author

Mats Granvik, Dec 11 2010

Keywords

Comments

a(0)=1, otherwise row sums of A179748.
For n>=1 cumulative sums of A008930.
a(n) is proportional to A048651*A000079. The error (a(n)-A048651*A000079) divided by sequence A186425 tends to the golden ratio A001622. This can be seen when using about 1000 decimals of the constant A048651 = 0.2887880950866024212... - [Mats Granvik, Jan 01 2015]
From Gus Wiseman, Mar 31 2022: (Start)
Also the number of integer compositions of n with exactly one part on or above the diagonal. For example, the a(1) = 1 through a(5) = 8 compositions are:
(1) (2) (3) (4) (5)
(11) (21) (31) (41)
(111) (112) (212)
(211) (311)
(1111) (1112)
(1121)
(2111)
(11111)
(End)

Examples

			From _Joerg Arndt_, Mar 24 2014: (Start)
The a(7) = 25 such compositions are:
01:  [ 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 2 ]
03:  [ 1 1 1 1 2 1 ]
04:  [ 1 1 1 1 3 ]
05:  [ 1 1 1 2 1 1 ]
06:  [ 1 1 1 2 2 ]
07:  [ 1 1 1 3 1 ]
08:  [ 1 1 1 4 ]
09:  [ 1 1 2 1 1 1 ]
10:  [ 1 1 2 1 2 ]
11:  [ 1 1 2 2 1 ]
12:  [ 1 1 2 3 ]
13:  [ 1 1 3 1 1 ]
14:  [ 1 1 3 2 ]
15:  [ 1 2 1 1 1 1 ]
16:  [ 1 2 1 1 2 ]
17:  [ 1 2 1 2 1 ]
18:  [ 1 2 1 3 ]
19:  [ 1 2 2 1 1 ]
20:  [ 1 2 2 2 ]
21:  [ 1 2 3 1 ]
22:  [ 2 2 3 ]
23:  [ 2 3 2 ]
24:  [ 3 4 ]
25:  [ 7 ]
(End)
		

Crossrefs

Cf. A238859 (compositions with subdiagonal growth), A238876 (partitions with subdiagonal growth), A001227 (partitions into distinct parts with subdiagonal growth).
Cf. A238860 (partitions with superdiagonal growth), A238861 (compositions with superdiagonal growth), A000009 (partitions into distinct parts have superdiagonal growth by definition).
The version for partitions is A001477, strong A002620.
The version for permutations is A057427, strong A000295.
The opposite version is A238874, first column of A352522.
The version for fixed points is A240736, nonfixed A352520.
The strong version is A351983, column k=1 of A352524.
This is column k = 1 of A352525.
A238349 counts compositions by fixed points, first col A238351.
A352517 counts weak excedances of standard compositions.

Programs

  • Maple
    A179748 := proc(n,k) option remember; if k= 1 then 1; elif k> n then 0 ; else add( procname(n-i,k-1),i=1..k-1) ; end if; end proc:
    A177510 := proc(n) add(A179748(n,k),k=1..n) ;end proc:
    seq(A177510(n),n=1..20) ; # R. J. Mathar, Dec 14 2010
  • Mathematica
    Clear[t, nn]; nn = 39; t[n_, 1] = 1; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, k - 1}], 0]; Table[Sum[t[n, k], {k, 1, n}], {n, 1, nn}] (* Mats Granvik, Jan 01 2015 *)
    pdw[y_]:=Length[Select[Range[Length[y]],#<=y[[#]]&]]; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pdw[#]==1&]],{n,0,10}] (* Gus Wiseman, Mar 31 2022 *)
  • PARI
    N=66; q='q+O('q^N); Vec( 1 + q/(1-q) * sum(n=0, N, q^n * prod(k=1, n, (1-q^k)/(1-q) ) ) ) \\ Joerg Arndt, Mar 24 2014
  • Sage
    @CachedFunction
    def T(n, k): # A179748
        if n == 0:  return int(k==0);
        if k == 1:  return int(n>=1);
        return sum( T(n-i, k-1) for i in [1..k-1] );
    # to display triangle A179748 including column zero = [1,0,0,0,...]:
    #for n in [0..10]: print([ T(n,k) for k in [0..n] ])
    def a(n): return sum( T(n,k) for k in [0..n] )
    print([a(n) for n in [0..66]])
    # Joerg Arndt, Mar 24 2014
    

Formula

G.f.: 1 + q/(1-q) * sum(n>=0, q^n * prod(k=1..n, (1-q^k)/(1-q) ) ). [Joerg Arndt, Mar 24 2014]

Extensions

New name and a(0) = 1 prepended, Joerg Arndt, Mar 24 2014

A352512 Number of fixed points in the n-th composition in standard order.

Original entry on oeis.org

0, 1, 0, 1, 0, 0, 2, 1, 0, 0, 1, 0, 1, 2, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 2, 2, 2, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 3, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Mar 26 2022

Keywords

Comments

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. See also A000120, A059893, A070939, A114994, A225620.
A fixed point of composition c is an index i such that c_i = i.

Examples

			The 169th composition in standard order is (2,2,3,1), with fixed points {2,3}, so a(169) = 2.
		

Crossrefs

The version counting permutations is A008290, unfixed A098825.
The triangular version is A238349, first column A238351.
Unfixed points are counted by A352513, triangle A352523, first A352520.
A011782 counts compositions.
A088902 gives the fixed points of A122111, counted by A000700.
A352521 counts comps by strong nonexcedances, first A219282, stat A352514.
A352522 counts comps by weak nonexcedances, first col A238874, stat A352515.
A352524 counts comps by strong excedances, first col A008930, stat A352516.
A352525 counts comps by weak excedances, first col A177510, stat A352517.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Table[pq[stc[n]],{n,0,100}]

Formula

A000120(n) = A352512(n) + A352513(n).

A352525 Irregular triangle read by rows where T(n,k) is the number of integer compositions of n with k weak excedances (parts on or above the diagonal), all zeros removed.

Original entry on oeis.org

1, 1, 2, 3, 1, 5, 3, 8, 8, 14, 17, 1, 25, 35, 4, 46, 70, 12, 87, 137, 32, 167, 268, 76, 1, 324, 525, 170, 5, 634, 1030, 367, 17, 1248, 2026, 773, 49, 2466, 3999, 1598, 129, 4887, 7914, 3267, 315, 1, 9706, 15695, 6631, 730, 6, 19308, 31181, 13393, 1631, 23
Offset: 0

Views

Author

Gus Wiseman, Mar 22 2022

Keywords

Examples

			Triangle begins:
     1
     1
     2
     3     1
     5     3
     8     8
    14    17     1
    25    35     4
    46    70    12
    87   137    32
   167   268    76     1
   324   525   170     5
For example, row n = 6 counts the following compositions:
  (6)       (15)     (123)
  (51)      (24)
  (312)     (33)
  (411)     (42)
  (1113)    (114)
  (1122)    (132)
  (2112)    (141)
  (2121)    (213)
  (3111)    (222)
  (11112)   (231)
  (11121)   (321)
  (11211)   (1131)
  (21111)   (1212)
  (111111)  (1221)
            (1311)
            (2211)
            (12111)
		

Crossrefs

Row sums are A011782.
The version for partitions is A115994.
The version for permutations is A123125, strong A173018.
Column k = 1 is A177510.
The corresponding rank statistic is A352517.
The strong opposite is A352521, first col A219282, rank statistic A352514.
The opposite version is A352522, first col A238874, rank statistic A352515.
The strong version is A352524, first column A008930, rank statistic A352516.
A008292 is the triangle of Eulerian numbers (version without zeros).
A238349 counts comps by fixed points, first col A238351, rank stat A352512.
A352489 lists the weak excedance set of A122111.
A352523 counts comps by unfixed points, first A352520, rank stat A352513.

Programs

  • Mathematica
    pdw[y_]:=Length[Select[Range[Length[y]],#<=y[[#]]&]];
    DeleteCases[Table[Length[Select[Join@@ Permutations/@IntegerPartitions[n],pdw[#]==k&]],{n,0,10},{k,0,n}],0,{2}]
  • PARI
    T(n)={my(v=vector(n+1, i, i==1), r=v); for(k=1, n, v=vector(#v, j, sum(i=1, j-1, if(k<=i,x,1)*v[j-i])); r+=v); r[1]=x; [Vecrev(p) | p<-r/x]}
    { my(A=T(10)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Jan 19 2023

A352513 Number of nonfixed points in the n-th composition in standard order.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 0, 2, 1, 2, 1, 3, 1, 1, 2, 3, 1, 2, 1, 3, 2, 2, 3, 4, 1, 2, 1, 2, 1, 3, 3, 4, 1, 2, 1, 3, 2, 2, 3, 4, 2, 3, 2, 3, 2, 4, 4, 5, 1, 2, 2, 3, 0, 2, 2, 3, 2, 2, 3, 4, 3, 4, 4, 5, 1, 2, 1, 3, 2, 2, 3, 4, 2, 3, 2, 3, 2, 4, 4, 5, 2, 3, 3, 4, 1, 3, 3
Offset: 0

Views

Author

Gus Wiseman, Mar 27 2022

Keywords

Comments

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. See also A000120, A059893, A070939, A114994, A225620.
A nonfixed point in a composition c is an index i such that c_i != i.

Examples

			The 169th composition in standard order is (2,2,3,1), with nonfixed points {1,4}, so a(169) = 2.
		

Crossrefs

The version counting permutations is A098825, fixed A008290.
Fixed points are counted by A352512, triangle A238349, first A238351.
The triangular version is A352523, first nontrivial column A352520.
A011782 counts compositions.
A352486 gives the nonfixed points of A122111, counted by A330644.
A352521 counts comps by strong nonexcedances, first A219282, stat A352514.
A352522 counts comps by weak nonexcedances, first col A238874, stat A352515.
A352524 counts comps by strong excedances, first col A008930, stat A352516.
A352525 counts comps by weak excedances, first col A177510, stat A352517.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    pnq[y_]:=Length[Select[Range[Length[y]],#!=y[[#]]&]];
    Table[pnq[stc[n]],{n,0,100}]

Formula

A000120(n) = A352512(n) + A352513(n).

A352522 Triangle read by rows where T(n,k) is the number of integer compositions of n with k weak nonexcedances (parts on or below the diagonal).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 2, 3, 4, 3, 3, 1, 3, 4, 8, 6, 6, 4, 1, 4, 7, 12, 13, 12, 10, 5, 1, 5, 13, 16, 26, 24, 22, 15, 6, 1, 7, 19, 27, 43, 48, 46, 37, 21, 7, 1, 10, 26, 47, 68, 90, 93, 83, 58, 28, 8, 1, 14, 36, 77, 109, 159, 180, 176, 141
Offset: 0

Views

Author

Gus Wiseman, Mar 22 2022

Keywords

Examples

			Triangle begins:
   1
   0   1
   1   0   1
   1   1   1   1
   1   3   1   2   1
   2   3   4   3   3   1
   3   4   8   6   6   4   1
   4   7  12  13  12  10   5   1
   5  13  16  26  24  22  15   6   1
   7  19  27  43  48  46  37  21   7   1
  10  26  47  68  90  93  83  58  28   8   1
For example, row n = 6 counts the following compositions:
  (6)   (15)   (114)  (123)   (1113)   (11112)  (111111)
  (24)  (42)   (132)  (1311)  (1122)   (11121)
  (33)  (51)   (141)  (2112)  (1131)   (11211)
        (231)  (213)  (2121)  (1212)   (12111)
               (222)  (2211)  (1221)
               (312)  (3111)  (21111)
               (321)
               (411)
		

Crossrefs

Row sums are A011782.
The strong version for partitions is A114088.
The opposite version for partitions is A115994.
The version for permutations is A123125, strong A173018.
Column k = 0 is A238874.
The corresponding rank statistic is A352515.
The strong version is A352521, first column A219282, rank statistic A352514.
The strong opposite is A352524, first col A008930, rank statistic A352516.
The opposite version is A352525, first col A177510, rank statistic A352517.
A000041 counts integer partitions, strict A000009.
A008292 is the triangle of Eulerian numbers (version without zeros).
A238349 counts comps by fixed points, first col A238351, rank stat A352512.
A352488 lists the weak nonexcedance set of A122111.
A352523 counts comps by unfixed points, first A352520, rank stat A352513.

Programs

  • Mathematica
    pw[y_]:=Length[Select[Range[Length[y]],#>=y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pw[#]==k&]],{n,0,15},{k,0,n}]
  • PARI
    T(n)={my(v=vector(n+1, i, i==1), r=v); for(k=1, n, v=vector(#v, j, sum(i=1, j-1, if(k>=i,x,1)*v[j-i])); r+=v); [Vecrev(p) | p<-r]}
    { my(A=T(10)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Jan 19 2023

A352521 Triangle read by rows where T(n,k) is the number of integer compositions of n with k strong nonexcedances (parts below the diagonal).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 1, 1, 0, 3, 2, 2, 1, 0, 4, 5, 3, 3, 1, 0, 6, 8, 7, 6, 4, 1, 0, 9, 12, 15, 12, 10, 5, 1, 0, 13, 19, 27, 25, 22, 15, 6, 1, 0, 18, 32, 43, 51, 46, 37, 21, 7, 1, 0, 25, 51, 70, 94, 94, 83, 58, 28, 8, 1, 0, 35, 77, 117, 162, 184, 176, 141, 86, 36, 9, 1, 0
Offset: 0

Views

Author

Gus Wiseman, Mar 22 2022

Keywords

Examples

			Triangle begins:
   1
   1   0
   1   1   0
   2   1   1   0
   3   2   2   1   0
   4   5   3   3   1   0
   6   8   7   6   4   1   0
   9  12  15  12  10   5   1   0
  13  19  27  25  22  15   6   1   0
  18  32  43  51  46  37  21   7   1   0
  25  51  70  94  94  83  58  28   8   1   0
For example, row n = 6 counts the following compositions (empty column indicated by dot):
  (6)    (51)   (312)   (1113)   (11112)  (111111)  .
  (15)   (114)  (411)   (1122)   (11121)
  (24)   (132)  (1131)  (2112)   (11211)
  (33)   (141)  (1212)  (2121)   (21111)
  (42)   (213)  (1221)  (3111)
  (123)  (222)  (1311)  (12111)
         (231)  (2211)
         (321)
		

Crossrefs

Row sums are A011782.
The version for partitions is A114088.
Row sums without the last term are A131577.
The version for permutations is A173018.
Column k = 0 is A219282.
The corresponding rank statistic is A352514.
The weak version is A352522, first column A238874, rank statistic A352515.
The opposite version is A352524, first column A008930, rank stat A352516.
The weak opposite version is A352525, first col A177510, rank stat A352517.
A008292 is the triangle of Eulerian numbers (version without zeros).
A238349 counts comps by fixed points, first col A238351, rank stat A352512.
A352490 is the strong nonexcedance set of A122111.
A352523 counts comps by nonfixed points, first A352520, rank stat A352513.

Programs

  • Mathematica
    pa[y_]:=Length[Select[Range[Length[y]],#>y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pa[#]==k&]],{n,0,15},{k,0,n}]
  • PARI
    T(n)={my(v=vector(n+1, i, i==1), r=v); for(k=1, n, v=vector(#v, j, sum(i=1, j-1, if(k>i,x,1)*v[j-i])); r+=v); vector(#v, i, Vecrev(r[i], i))}
    { my(A=T(10)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Jan 19 2023

Extensions

Terms a(66) and beyond from Andrew Howroyd, Jan 19 2023

A352514 Number of strong nonexcedances (parts below the diagonal) of the n-th composition in standard order.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 2, 3, 0, 1, 0, 2, 0, 1, 2, 3, 0, 1, 1, 2, 1, 3, 3, 4, 0, 1, 0, 2, 0, 1, 2, 3, 0, 1, 1, 2, 1, 3, 3, 4, 0, 1, 1, 2, 0, 2, 2, 3, 1, 2, 3, 4, 3, 4, 4, 5, 0, 1, 0, 2, 0, 1, 2, 3, 0, 1, 1, 2, 1, 3, 3, 4, 0, 1, 1, 2, 0, 2, 2
Offset: 0

Views

Author

Gus Wiseman, Mar 22 2022

Keywords

Comments

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. See also A000120, A059893, A070939, A114994, A225620.

Examples

			The 83rd composition in standard order is (2,3,1,1), with strong nonexcedances {3,4}, so a(83) = 2.
		

Crossrefs

Positions of first appearances are A000225.
The weak version is A352515, counted by A352522 (first column A238874).
The opposite version is A352516, counted by A352524 (first column A008930).
The weak opposite version is A352517, counted by A352525 (first A177510).
The triangle A352521 counts these compositions (first column A219282).
A008292 is the triangle of Eulerian numbers (version without zeros).
A011782 counts compositions.
A173018 counts permutations by number of excedances, weak A123125.
A238349 counts comps by fixed parts, first col A238351, rank stat A352512.
A352490 is the (strong) nonexcedance set of A122111.
A352523 counts comps by unfixed parts, first col A010054, rank stat A352513.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    pa[y_]:=Length[Select[Range[Length[y]],#>y[[#]]&]];
    Table[pa[stc[n]],{n,0,30}]
Showing 1-10 of 17 results. Next