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.

Previous Showing 21-30 of 34 results. Next

A329741 Number of compositions of n whose multiplicities cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 3, 6, 11, 14, 34, 52, 114, 225, 464, 539, 1183, 1963, 3753, 6120, 11207, 19808, 38254, 77194, 147906, 224853, 374216, 611081, 1099933, 2129347, 3336099, 5816094, 9797957, 17577710, 29766586, 53276392, 93139668, 163600815, 324464546, 637029845, 1010826499
Offset: 0

Views

Author

Gus Wiseman, Nov 20 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.

Examples

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

Crossrefs

Looking at run-lengths instead of multiplicities gives A329766.
The complete case is A329748.
Complete compositions are A107429.

Programs

  • Mathematica
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[Length/@Split[Sort[#]]]&]],{n,20}]

Extensions

a(0), a(21)-a(37) from Alois P. Heinz, Nov 21 2019

A329750 Triangle read by rows where T(n,k) is the number of compositions of n >= 1 with runs-resistance n - k, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 3, 2, 1, 2, 6, 6, 1, 1, 0, 4, 9, 15, 3, 1, 0, 2, 16, 22, 22, 1, 1, 0, 0, 8, 37, 38, 41, 3, 1, 0, 0, 0, 26, 86, 69, 72, 2, 1, 0, 0, 0, 2, 78, 175, 124, 129, 3, 1, 0, 0, 0, 0, 14, 202, 367, 226, 213, 1, 1, 0, 0, 0, 0, 0, 52, 469, 750, 376, 395, 5, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.

Examples

			Triangle begins:
   1
   1   1
   2   1   1
   2   3   2   1
   2   6   6   1   1
   0   4   9  15   3   1
   0   2  16  22  22   1   1
   0   0   8  37  38  41   3   1
   0   0   0  26  86  69  72   2   1
   0   0   0   2  78 175 124 129   3   1
   0   0   0   0  14 202 367 226 213   1   1
   0   0   0   0   0  52 469 750 376 395   5   1
Row n = 6 counts the following compositions:
  (1,1,3,1)    (1,1,4)      (1,5)      (3,3)          (6)
  (1,3,1,1)    (4,1,1)      (2,4)      (2,2,2)
  (1,1,1,2,1)  (1,1,1,3)    (4,2)      (1,1,1,1,1,1)
  (1,2,1,1,1)  (1,2,2,1)    (5,1)
               (2,1,1,2)    (1,2,3)
               (3,1,1,1)    (1,3,2)
               (1,1,1,1,2)  (1,4,1)
               (1,1,2,1,1)  (2,1,3)
               (2,1,1,1,1)  (2,3,1)
                            (3,1,2)
                            (3,2,1)
                            (1,1,2,2)
                            (1,2,1,2)
                            (2,1,2,1)
                            (2,2,1,1)
		

Crossrefs

Row sums are A000079.
Column sums are A329768.
The version with rows reversed is A329744.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]==n-k&]],{n,10},{k,n}]

A329864 Number of compositions of n with the same runs-resistance as cuts-resistance.

Original entry on oeis.org

1, 0, 0, 0, 0, 2, 5, 10, 17, 27, 68, 107, 217, 420, 884, 1761, 3679, 7469, 15437, 31396, 64369
Offset: 0

Views

Author

Gus Wiseman, Nov 23 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined to be the number of applications required to reach a singleton.
For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.

Examples

			The a(5) = 2 through a(8) = 17 compositions:
  (1112)  (1113)   (1114)    (1115)
  (2111)  (1122)   (1222)    (1133)
          (2211)   (2221)    (3311)
          (3111)   (4111)    (5111)
          (11211)  (11122)   (11222)
                   (11311)   (11411)
                   (21112)   (12221)
                   (22111)   (21113)
                   (111121)  (22211)
                   (121111)  (31112)
                             (111131)
                             (111221)
                             (112112)
                             (112211)
                             (122111)
                             (131111)
                             (211211)
For example, the runs-resistance of (111221) is 3 because we have: (111221) -> (321) -> (111) -> (3), while the cuts-resistance is also 3 because we have: (111221) -> (112) -> (1) -> (), so (111221) is counted under a(8).
		

Crossrefs

The version for binary expansion is A329865.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.
Compositions with runs-resistance = cuts-resistance minus 1 are A329869.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]==degdep[#]&]],{n,0,10}]

A333629 Least k such that the runs-resistance of the k-th composition in standard order is n.

Original entry on oeis.org

1, 3, 5, 11, 27, 93, 859, 13789, 1530805, 1567323995
Offset: 0

Views

Author

Gus Wiseman, Mar 31 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of 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.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.

Examples

			The sequence together with the corresponding compositions begins:
        1: (1)
        3: (1,1)
        5: (2,1)
       11: (2,1,1)
       27: (1,2,1,1)
       93: (2,1,1,2,1)
      859: (1,2,2,1,2,1,1)
    13789: (1,2,2,1,1,2,1,1,2,1)
  1530805: (2,1,1,2,2,1,2,1,1,2,1,2,2,1)
For example, starting with 13789 and repeatedly applying A333627 gives: 13789 -> 859 -> 110 -> 29 -> 11 -> 6 -> 3 -> 2, corresponding to the compositions: (1,2,2,1,1,2,1,1,2,1) -> (1,2,2,1,2,1,1) -> (1,2,1,1,2) -> (1,1,2,1) -> (2,1,1) -> (1,2) -> (1,1) -> (2).
		

Crossrefs

Positions of first appearances in A333628 = number of times applying A333627 to reach a power of 2, starting with n.
A subsequence of A333630.
All of the following pertain to compositions in standard order (A066099):
- The length is A000120.
- The partial sums from the right are A048793.
- The sum is A070939.
- Adjacent equal pairs are counted by A124762.
- Equal runs are counted by A124767.
- Strict compositions are ranked by A233564.
- The partial sums from the left are A272020.
- Constant compositions are ranked by A272919.
- Normal compositions are ranked by A333217.
- Heinz number is A333219.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.

Programs

  • Mathematica
    nn=1000;
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    stcrun[n_]:=Total[2^(Accumulate[Reverse[Length/@Split[stc[n]]]])]/2;
    seq=Table[Length[NestWhileList[stcrun,n,Length[stc[#]]>1&]]-1,{n,nn}];
    Table[Position[seq,i][[1,1]],{i,Union[seq]}]

Extensions

a(9) from Amiram Eldar, Aug 04 2025

A329748 Number of complete compositions of n whose multiplicities cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 0, 2, 3, 3, 6, 12, 12, 42, 114, 210, 60, 360, 720, 1320, 1590, 3690, 6450, 16110, 33120, 59940, 61320, 112980, 171780, 387240, 803880, 769440, 1773240, 2823240, 5790960, 9916200, 19502280, 28244160, 56881440, 130548600, 279578880, 320554080, 541323720
Offset: 0

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n. It is complete if it covers an initial interval of positive integers.

Examples

			The a(1) = 1 through a(8) = 12 compositions (empty column not shown):
  (1)  (12)  (112)  (122)  (123)  (1123)  (1223)
       (21)  (121)  (212)  (132)  (1132)  (1232)
             (211)  (221)  (213)  (1213)  (1322)
                           (231)  (1231)  (2123)
                           (312)  (1312)  (2132)
                           (321)  (1321)  (2213)
                                  (2113)  (2231)
                                  (2131)  (2312)
                                  (2311)  (2321)
                                  (3112)  (3122)
                                  (3121)  (3212)
                                  (3211)  (3221)
		

Crossrefs

Looking at run-lengths instead of multiplicities gives A329749.
The non-complete version is A329741.
Complete compositions are A107429.

Programs

  • Mathematica
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[#]&&normQ[Length/@Split[Sort[#]]]&]],{n,0,10}]

Extensions

a(21)-a(38) from Alois P. Heinz, Jul 06 2020

A333630 Least STC-number of a composition whose sequence of run-lengths has STC-number n.

Original entry on oeis.org

0, 1, 3, 5, 7, 14, 11, 13, 15, 30, 43, 29, 23, 46, 27, 45, 31, 62, 122, 61, 87, 117, 59, 118, 47, 94, 107, 93, 55, 110, 91, 109, 63, 126, 250, 125, 343, 245, 123, 246, 175, 350, 235, 349, 119, 238, 347, 237, 95, 190, 378, 189, 215, 373, 187, 374, 111, 222, 363
Offset: 0

Views

Author

Gus Wiseman, Mar 31 2020

Keywords

Comments

All terms belong to A003754.
A composition of n is a finite sequence of positive integers summing to n. The composition with STC-number k (row k of 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 sequence together with the corresponding compositions begins:
   0: ()
   1: (1)
   3: (1,1)
   5: (2,1)
   7: (1,1,1)
  14: (1,1,2)
  11: (2,1,1)
  13: (1,2,1)
  15: (1,1,1,1)
  30: (1,1,1,2)
  43: (2,2,1,1)
  29: (1,1,2,1)
  23: (2,1,1,1)
  46: (2,1,1,2)
  27: (1,2,1,1)
  45: (2,1,2,1)
  31: (1,1,1,1,1)
  62: (1,1,1,1,2)
		

Crossrefs

Position of first appearance of n in A333627.
All of the following pertain to compositions in standard order (A066099):
- The length is A000120.
- Compositions without terms > 2 are A003754.
- Compositions without ones are ranked by A022340.
- The partial sums from the right are A048793.
- The sum is A070939.
- Adjacent equal pairs are counted by A124762.
- Equal runs are counted by A124767.
- Strict compositions are ranked by A233564.
- The partial sums from the left are A272020.
- Constant compositions are ranked by A272919.
- Normal compositions are ranked by A333217.
- Heinz number is A333219.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
- Runs-resistance is A333628.
- First appearances of run-resistances are A333629.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    seq=Table[Total[2^(Accumulate[Reverse[Length/@Split[stc[n]]]])]/2,{n,0,1000}];
    Table[Position[seq,i][[1,1]],{i,First[Split[Union[seq],#1+1==#2&]]}]-1

A003262 Let y=f(x) satisfy F(x,y)=0. a(n) is the number of terms in the expansion of (d/dx)^n y in terms of the partial derivatives of F.

Original entry on oeis.org

1, 3, 9, 24, 61, 145, 333, 732, 1565, 3247, 6583, 13047, 25379, 48477, 91159, 168883, 308736, 557335, 994638, 1755909, 3068960, 5313318, 9118049, 15516710, 26198568, 43904123, 73056724, 120750102, 198304922, 323685343
Offset: 1

Views

Author

Keywords

Examples

			(d/dx)^2 y = -F_xx/F_y + 2*F_x*F_xy/F_y^2 - F_x^2*F_yy/F_y^3, where F_x denotes partial derivative with respect to x, etc. This has three terms, thus a(2)=3.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 175.
  • L. Comtet and M. Fiolet, Sur les dérivées successives d'une fonction implicite. C. R. Acad. Sci. Paris Ser. A 278 (1974), 249-251.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A098504.
Cf. A172004 (generalization to bivariate implicit functions).
Cf. A162326 (analogous sequence for implicit divided differences).
Cf. A172003 (bivariate variant).

Programs

  • Mathematica
    p[, ] = 0; q[, ] = 0; e = 30; For[m = 1, m <= e - 1, m++, For[d = 1, d <= m, d++, If[m == d*Floor[m/d], For[i = 0, i <= m/d + 1, i++, If[d*i <= e, q[m, i*d] = q[m, i*d] + 1/d]]]]]; For[j = 0, j <= e, j++, p[0, j] = 1]; For[n = 1, n <= e - 1, n++, For[s = 0, s <= n, s++, For[j = 0, j <= e, j++, For[i = 0, i <= j, i++, p[n, j] = p[n, j] + (1/n)*s*q[s, j - i]*p[n - s, i]]]]]; A003262 = Table[p[n - 1, n], {n, 1, e}](* Jean-François Alcover, after Tom Wilde *)
  • VBA
    ' Tom Wilde, Jan 19 2008
    Sub Calc_AofN_upto_E()
    E = 30
    ReDim p(0 To E - 1, 0 To E)
    ReDim q(0 To E - 1, 0 To E)
    For m = 1 To E - 1
      For d = 1 To m
        If m = d * Int(m / d) Then
          For i = 0 To m / d + 1
            If d * i <= E Then q(m, i * d) = q(m, i * d) + 1 / d
          Next
        End If
      Next
    Next
    For j = 0 To E
      p(0, j) = 1
    Next
    For n = 1 To E - 1
      For s = 0 To n
        For j = 0 To E
          For i = 0 To j
            p(n, j) = p(n, j) + 1 / n * s * q(s, j - i) * p(n - s, i)
          Next
        Next
      Next
    Next
    For n = 1 To E
       Debug.Print p(n - 1, n)
    Next
    End Sub

Formula

The generating function given by Comtet and Fiolet is incorrect.
a(n) = coefficient of t^n*u^(n-1) in Product_{i,j>=0,(i,j)<>(0,1)} (1 - t^i*u^(i+j-1))^(-1). - Tom Wilde (tom(AT)beech84.fsnet.co.uk), Jan 19 2008

Extensions

More terms from Tom Wilde (tom(AT)beech84.fsnet.co.uk), Jan 19 2008

A329749 Number of complete compositions of n whose run-lengths cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 0, 2, 3, 5, 11, 23, 40, 80, 180, 344, 661, 1321, 2657, 5268, 10481, 20903, 41572, 82734, 164998, 328304, 654510, 1305421, 2598811, 5182174, 10332978, 20594318, 41066611, 81897091, 163309679, 325707492, 649648912, 1295827380, 2584941276, 5156774487
Offset: 0

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n. It is complete if it covers an initial interval of positive integers.

Examples

			The a(0) = 1 through a(6) = 11 compositions (empty column not shown):
  ()  (1)  (1,2)  (1,1,2)  (1,2,2)    (1,2,3)
           (2,1)  (1,2,1)  (2,1,2)    (1,3,2)
                  (2,1,1)  (2,2,1)    (2,1,3)
                           (1,1,2,1)  (2,3,1)
                           (1,2,1,1)  (3,1,2)
                                      (3,2,1)
                                      (1,2,1,2)
                                      (1,2,2,1)
                                      (2,1,1,2)
                                      (2,1,2,1)
                                      (1,1,2,1,1)
		

Crossrefs

Looking at multiplicities instead of run-lengths gives A329748.
The non-complete version is A329766.
Complete compositions are A107429.

Programs

  • Mathematica
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[#]&&normQ[Length/@Split[#]]&]],{n,0,10}]

Extensions

a(21)-a(35) from Alois P. Heinz, Jul 06 2020

A329869 Number of compositions of n with runs-resistance equal to cuts-resistance minus 1.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 4, 5, 11, 19, 36, 77, 138, 252, 528, 1072, 2204, 4634, 9575, 19732, 40754
Offset: 0

Views

Author

Gus Wiseman, Nov 23 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined to be the number of applications required to reach a singleton.
For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.

Examples

			The a(1) = 1 through a(9) = 19 compositions:
  1   2   3   4   5   6      7       8        9
      11      22      33     11113   44       11115
                      11112  31111   11114    12222
                      21111  111211  41111    22221
                             112111  111122   51111
                                     111311   111222
                                     113111   111411
                                     211112   114111
                                     221111   211113
                                     1111121  222111
                                     1211111  311112
                                              1111131
                                              1111221
                                              1112112
                                              1121112
                                              1221111
                                              1311111
                                              2111211
                                              2112111
For example, the runs-resistance of (1221111) is 3 because we have: (1221111) -> (124) -> (111) -> (3), while the cuts-resistance is 4 because we have: (1221111) -> (2111) -> (11) -> (1) -> (), so (1221111) is counted under a(9).
		

Crossrefs

The version for binary indices is A329866.
Compositions counted by runs-resistance are A329744.
Compositions counted by cuts-resistance are A329861.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]+1==degdep[#]&]],{n,0,10}]

A325550 Number of necklace compositions of n with distinct multiplicities.

Original entry on oeis.org

1, 2, 2, 4, 5, 7, 11, 16, 18, 41, 86, 118, 273, 465, 731, 1432, 2791, 4063, 8429, 14761, 29465, 58654, 123799, 227419, 453229, 861909, 1697645, 3192807, 6315007, 11718879, 22795272, 42965245, 83615516, 156215020, 306561088, 587300503, 1140650287, 2203107028
Offset: 1

Views

Author

Gus Wiseman, May 10 2019

Keywords

Comments

A necklace composition of n is a finite sequence of positive integers summing to n that is lexicographically minimal among all of its cyclic rotations.

Examples

			The a(1) = 1 through a(8) = 16 necklace compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (113)    (33)      (115)      (44)
                    (112)   (122)    (114)     (133)      (116)
                    (1111)  (1112)   (222)     (223)      (224)
                            (11111)  (1113)    (1114)     (233)
                                     (11112)   (1222)     (1115)
                                     (111111)  (11113)    (2222)
                                               (11122)    (11114)
                                               (11212)    (11222)
                                               (111112)   (12122)
                                               (1111111)  (111113)
                                                          (111122)
                                                          (111212)
                                                          (112112)
                                                          (1111112)
                                                          (11111111)
		

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&UnsameQ@@Length/@Split[Sort[#]]&]],{n,15}]
  • PARI
    b(n)={((r,k,b,w)->if(!k||!r, if(r,0,(w-1)!), sum(m=0, r\k, if(!m || !bittest(b,m), self()(r-k*m, k-1, bitor(b,1<Andrew Howroyd, Aug 31 2019

Formula

a(n) = Sum_{d|n} phi(d)*(Sum_{k=1..n/d} A242887(n/d, k)/k)/d. - Andrew Howroyd, Aug 31 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Aug 31 2019
Previous Showing 21-30 of 34 results. Next