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 10 results.

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 *)

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

A238350 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<=A003056(n).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 1, 1, 3, 4, 1, 6, 7, 3, 11, 16, 4, 1, 22, 29, 12, 1, 42, 60, 23, 3, 82, 120, 47, 7, 161, 238, 100, 12, 1, 316, 479, 198, 30, 1, 624, 956, 404, 61, 3, 1235, 1910, 818, 126, 7, 2449, 3817, 1652, 258, 16, 4864, 7633, 3319, 537, 30, 1, 9676, 15252, 6686, 1083, 70, 1, 19267, 30491, 13426, 2205
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Examples

			Triangle T(n,k) begins:
00 :   1;
01 :   0,   1;
02 :   1,   1;
03 :   2,   1,   1;
04 :   3,   4,   1;
05 :   6,   7,   3;
06 :  11,  16,   4,  1;
07 :  22,  29,  12,  1;
08 :  42,  60,  23,  3;
09 :  82, 120,  47,  7;
10 : 161, 238, 100, 12, 1;
11 : 316, 479, 198, 30, 1;
12 : 624, 956, 404, 61, 3;
     ...
		

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.
T(n*(n+3)/2,n) = A227682(n).
Same as A238349 without the trailing zeros.
Cf. A099036.

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..degree(p)))(b(n, 1)):
    seq(T(n), n=0..20);
  • 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, Exponent[p, x]}]][b[n, 1]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)

Formula

Sum_{k=0..A003056(n)} k * T(n,k) = A099036(n-1) for n>0.

A352831 Numbers whose weakly increasing prime indices y have exactly one fixed point y(i) = i.

Original entry on oeis.org

2, 4, 8, 9, 10, 12, 14, 16, 22, 24, 26, 27, 28, 32, 34, 36, 38, 40, 44, 46, 48, 52, 58, 60, 62, 63, 64, 68, 70, 72, 74, 75, 76, 80, 81, 82, 86, 88, 92, 94, 96, 98, 99, 104, 106, 108, 110, 112, 116, 117, 118, 120, 122, 124, 125, 128, 130, 132, 134, 135, 136
Offset: 1

Views

Author

Gus Wiseman, Apr 08 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The terms together with their prime indices begin:
      2: {1}             36: {1,1,2,2}         74: {1,12}
      4: {1,1}           38: {1,8}             75: {2,3,3}
      8: {1,1,1}         40: {1,1,1,3}         76: {1,1,8}
      9: {2,2}           44: {1,1,5}           80: {1,1,1,1,3}
     10: {1,3}           46: {1,9}             81: {2,2,2,2}
     12: {1,1,2}         48: {1,1,1,1,2}       82: {1,13}
     14: {1,4}           52: {1,1,6}           86: {1,14}
     16: {1,1,1,1}       58: {1,10}            88: {1,1,1,5}
     22: {1,5}           60: {1,1,2,3}         92: {1,1,9}
     24: {1,1,1,2}       62: {1,11}            94: {1,15}
     26: {1,6}           63: {2,2,4}           96: {1,1,1,1,1,2}
     27: {2,2,2}         64: {1,1,1,1,1,1}     98: {1,4,4}
     28: {1,1,4}         68: {1,1,7}           99: {2,2,5}
     32: {1,1,1,1,1}     70: {1,3,4}          104: {1,1,1,6}
     34: {1,7}           72: {1,1,1,2,2}      106: {1,16}
For example, 63 is in the sequence because its prime indices {2,2,4} have a unique fixed point at the second position.
		

Crossrefs

* = unproved
These are the positions of 1's in A352822.
*The reverse version for no fixed points is A352826, counted by A064428.
*The reverse version is A352827, counted by A001522 (strict A352829).
The version for no fixed points is A352830, counted by A238394.
These partitions are counted by A352832, compositions A240736.
Allowing more than one fixed point gives A352872, counted by A238395.
A000700 counts self-conjugate partitions, ranked by A088902.
A001222 counts prime indices, distinct A001221.
A008290 counts permutations by fixed points, nonfixed A098825.
A056239 adds up prime indices, row sums of A112798 and A296150.
A115720 and A115994 count partitions by their Durfee square.
A238349 counts compositions by fixed points, complement A352523.
A238352 counts reversed partitions by fixed points.
A352833 counts partitions by fixed points.

Programs

  • Mathematica
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Select[Range[100],pq[Flatten[Cases[FactorInteger[#],{p_,k_}:>Table[PrimePi[p],{k}]]]]==1&]

A352520 Number of integer compositions y of n with exactly one nonfixed point y(i) != i.

Original entry on oeis.org

0, 0, 2, 1, 4, 5, 3, 7, 8, 9, 6, 11, 12, 13, 14, 10, 16, 17, 18, 19, 20, 15, 22, 23, 24, 25, 26, 27, 21, 29, 30, 31, 32, 33, 34, 35, 28, 37, 38, 39, 40, 41, 42, 43, 44, 36, 46, 47, 48, 49, 50, 51, 52, 53, 54, 45, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 55, 67
Offset: 0

Views

Author

Gus Wiseman, Mar 29 2022

Keywords

Examples

			The a(2) = 2 through a(8) = 8 compositions:
  (2)    (3)  (4)      (5)      (6)    (7)        (8)
  (1,1)       (1,3)    (1,4)    (1,5)  (1,6)      (1,7)
              (2,2)    (3,2)    (4,2)  (5,2)      (6,2)
              (1,2,1)  (1,1,3)         (1,2,4)    (1,2,5)
                       (1,2,2)         (1,3,3)    (1,4,3)
                                       (2,2,3)    (3,2,3)
                                       (1,2,3,1)  (1,2,1,4)
                                                  (1,2,3,2)
		

Crossrefs

Compositions with no nonfixed points are counted by A010054.
The version for weak excedances is A177510.
Compositions with no fixed points are counted by A238351.
The version for fixed points is A240736.
This is column k = 1 of A352523.
A011782 counts compositions.
A238349 counts compositions by fixed points, rank stat A352512.
A352486 gives the nonfixed points of A122111, counted by A330644.
A352513 counts nonfixed points in standard compositions.

Programs

  • Mathematica
    pnq[y_]:=Length[Select[Range[Length[y]],#!=y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pnq[#]==1&]],{n,0,15}]

Extensions

More terms from Alois P. Heinz, Mar 30 2022

A352832 Number of reversed integer partitions y of n with exactly one fixed point y(i) = i.

Original entry on oeis.org

0, 1, 1, 1, 4, 3, 7, 7, 14, 19, 24, 32, 46, 60, 85, 109, 140, 179, 239, 300, 397, 495, 636, 790, 995, 1239, 1547, 1926, 2396, 2942, 3643, 4432, 5435, 6602, 8038, 9752, 11842, 14292, 17261, 20714, 24884, 29733, 35576, 42375, 50522, 60061, 71363, 84551, 100101
Offset: 0

Views

Author

Gus Wiseman, Apr 08 2022

Keywords

Comments

A reversed integer partition of n is a finite weakly increasing sequence of positive integers summing to n.

Examples

			The a(0) = 0 through a(8) = 14 partitions (empty column indicated by dot):
  .  (1)  (11)  (111)  (13)    (14)     (15)      (16)       (17)
                       (22)    (1112)   (114)     (115)      (116)
                       (112)   (11111)  (222)     (1123)     (134)
                       (1111)           (1113)    (11113)    (224)
                                        (1122)    (11122)    (233)
                                        (11112)   (111112)   (1115)
                                        (111111)  (1111111)  (2222)
                                                             (11114)
                                                             (11123)
                                                             (11222)
                                                             (111113)
                                                             (111122)
                                                             (1111112)
                                                             (11111111)
For example, the reversed partition (2,2,4) has a unique fixed point at the second position.
		

Crossrefs

* = unproved
*The non-reverse version is A001522, ranked by A352827, strict A352829.
*The non-reverse complement is A064428, ranked by A352826, strict A352828.
This is column k = 1 of A238352.
For no fixed point: counted by A238394, ranked by A352830, strict A025147.
For > 0 fixed points: counted by A238395, ranked by A352872, strict A096765.
The version for compositions is A240736, complement A352520.
These partitions are ranked by A352831.
A000700 counts self-conjugate partitions, ranked by A088902.
A008290 counts permutations by fixed points, nonfixed A098825.
A115720 and A115994 count partitions by their Durfee square.
A238349 counts compositions by fixed points, complement A352523.
A352822 counts fixed points of prime indices.
A352833 counts partitions by fixed points.

Programs

  • Mathematica
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Table[Length[Select[Reverse/@IntegerPartitions[n],pq[#]==1&]],{n,0,30}]

A351983 Number of integer compositions of n with exactly one part above the diagonal.

Original entry on oeis.org

0, 0, 1, 2, 5, 9, 18, 35, 67, 131, 257, 505, 996, 1973, 3915, 7781, 15486, 30855, 61527, 122764, 245069, 489412, 977673, 1953515, 3904108, 7803545, 15599618, 31187269, 62355347, 124679883, 249310255, 498540890, 996953659, 1993701032, 3987069747, 7973603891
Offset: 0

Views

Author

Gus Wiseman, Apr 02 2022

Keywords

Examples

			The a(2) = 1 through a(6) = 18 compositions:
  (2)  (3)   (4)    (5)     (6)
       (21)  (13)   (14)    (15)
             (22)   (32)    (42)
             (31)   (41)    (51)
             (211)  (131)   (114)
                    (212)   (132)
                    (221)   (141)
                    (311)   (213)
                    (2111)  (222)
                            (312)
                            (321)
                            (411)
                            (1311)
                            (2112)
                            (2121)
                            (2211)
                            (3111)
                            (21111)
		

Crossrefs

The version for permutations is A000295, weak A057427.
The version for partitions is A002620, weak A001477.
The weak version is A177510.
The version for fixed points is A240736, nonfixed A352520.
This is column k = 1 of A352524; column k = 0 is A008930.
A238349 counts compositions by fixed points, first column A238351.
A352521 counts compositions by strong nonexcedances, first column A219282.
A352522 counts compositions by weak nonexcedances, first column A238874.
A352523 counts compositions by nonfixed points, first column A010054.
A352524 counts compositions by strong excedances, first column A008930.
A352525 counts compositions by weak excedances, first column A177510.

Programs

  • Mathematica
    pless[y_]:=Length[Select[Range[Length[y]],#
    				
  • PARI
    S(v,u,c=0)={vector(#v, k, c + sum(i=1, k-1, v[k-i]*u[i]))}
    seq(n)={my(v=vector(1+n), s=0); v[1]=1; for(i=1, n, v=S(v, vector(n, j, if(j>i,'x,1)), O(x^2)); s+=apply(p->polcoef(p,1), v)); s} \\ Andrew Howroyd, Jan 02 2023

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jan 02 2023

A382991 Number of compositions of n such that any part 1 at position k can be k different colors.

Original entry on oeis.org

1, 1, 3, 10, 40, 193, 1110, 7473, 57821, 505945, 4940354, 53248874, 627848885, 8037734930, 111017325473, 1645384681765, 26044845197881, 438499277779636, 7824114643731522, 147476551001255125, 2928074880767254238, 61078483577649288463, 1335438738400978511877
Offset: 0

Views

Author

John Tyler Rascoe, Apr 11 2025

Keywords

Examples

			a(3) = 10 counts: (3), (2,1_a), (2,1_b), (1_a,2), (1_a,1_a,1_a), (1_a,1_a,1_b), (1_a,1_a,1_c), (1_a,1_b,1_a), (1_a,1_b,1_b), (1_a,1_b,1_c).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          add(b(n-j, i+1)*`if`(j=1, i, 1), j=1..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..22);  # Alois P. Heinz, Apr 23 2025
  • PARI
    A_x(N) = {my(x='x+O('x^N)); Vec(1+ sum(i=1,N, prod(j=1,i, j*x + x^2/(1-x))))}
    A_x(30)

Formula

G.f.: 1 + Sum_{i>0} Product_{j=1..i} ( j*x + x^2/(1-x) ).

A352875 Number of integer compositions y of n with a fixed point y(i) = i.

Original entry on oeis.org

0, 1, 1, 2, 5, 10, 21, 42, 86, 174, 351, 708, 1424, 2861, 5743, 11520, 23092, 46269, 92673, 185562, 371469, 743491, 1487870, 2977164, 5956616, 11916910, 23839736, 47688994, 95393322, 190811346, 381662507, 763389209, 1526881959, 3053930971, 6108131542, 12216698288
Offset: 0

Views

Author

Gus Wiseman, May 15 2022

Keywords

Examples

			The a(0) = 0 through a(5) = 10 compositions (empty column indicated by dot):
  .  (1)  (11)  (12)   (13)    (14)
                (111)  (22)    (32)
                       (112)   (113)
                       (121)   (122)
                       (1111)  (131)
                               (221)
                               (1112)
                               (1121)
                               (1211)
                               (11111)
		

Crossrefs

The version for partitions is A001522, ranked by A352827 (unproved).
The version for permutations is A002467, complement A000166.
The complement for partitions is A064428, ranked by A352826 (unproved).
This is the sum of latter columns of A238349, nonfixed A352523.
The complement is counted by A238351.
The complement for reversed partitions is A238394, ranked by A352830.
The version for reversed partitions is A238395, ranked by A352872.
The case of just one fixed point is A240736.
A008290 counts permutations by fixed points, nonfixed A098825.
A011782 counts compositions.
A115720 and A115994 count partitions by Durfee square.
A238352 counts reversed partitions by fixed points, rank statistic A352822.
A352512 counts fixed points in standard compositions, nonfixed A352513.
A352521 = comps by subdiags, first col A219282, rank stat A352514.
A352522 = comps by weak subdiags, first col A238874, rank stat A352515.
A352524 = comps by superdiags, first col A008930, rank stat A352516.
A352525 = comps by weak superdiags, col k=1 A177510, rank stat A352517.
A352833 counts partitions by fixed points.

Programs

  • Mathematica
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pq[#]>0&]],{n,0,15}]
  • PARI
    S(v,u,c)={vector(#v, k, c + sum(i=1, k-1, v[k-i]*u[i]))}
    seq(n)={my(v=vector(1+n), s=vector(#v, i, 2^(i-2))); v[1]=1; s[1]=0; for(i=1, n, v=S(v, vector(n, j, if(j==i,'x,1)), O(x)); s-=apply(p->polcoef(p,0), v)); s} \\ Andrew Howroyd, Jan 02 2023

Formula

a(n) = 2^(n-1) - A238351(n) for n >= 1. - Andrew Howroyd, Jan 02 2023

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jan 02 2023

A382992 Number of compositions of n that have at least 1 part equal to 1 and any part 1 at position k can be k different colors.

Original entry on oeis.org

0, 1, 2, 9, 38, 190, 1105, 7465, 57808, 505924, 4940320, 53248819, 627848796, 8037734786, 111017325240, 1645384681388, 26044845197271, 438499277778649, 7824114643729925, 147476551001252541, 2928074880767250057, 61078483577649281698, 1335438738400978500931
Offset: 0

Views

Author

John Tyler Rascoe, Apr 11 2025

Keywords

Examples

			a(3) = 9 counts: (2, 1_a), (2, 1_b), (1_a, 2), (1_a, 1_a, 1_a), (1_a, 1_a, 1_b), (1_a, 1_a, 1_c), (1_a, 1_b, 1_a), (1_a, 1_b, 1_b), (1_a, 1_b, 1_c).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, t, add(
          b(n-j, i+1, `if`(j=1, 1, t))*`if`(j=1, i, 1), j=1..n))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..22);  # Alois P. Heinz, Apr 23 2025
  • PARI
    A_x(N) = {my(x='x+O('x^N)); Vec(-x^2/(1-x-x^2) + sum(i=1,N, prod(j=1,i, j*x + x^2/(1-x))))}
    A_x(30)

Formula

G.f.: -x^2/(1-x-x^2) + Sum_{i>0} Product_{j=1..i} ( j*x + x^2/(1-x) ).
a(n) = A382991(n) - A000045(n-1).

Extensions

Edited by Alois P. Heinz, Apr 23 2025
Showing 1-10 of 10 results.