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

A373949 Triangle read by rows where T(n,k) is the number of integer compositions of n such that replacing each run of repeated parts with a single part (run-compression) yields a composition of k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 0, 3, 0, 1, 1, 2, 4, 0, 1, 0, 4, 4, 7, 0, 1, 1, 5, 6, 5, 14, 0, 1, 0, 6, 10, 10, 14, 23, 0, 1, 1, 6, 14, 12, 29, 26, 39, 0, 1, 0, 9, 16, 19, 40, 54, 46, 71, 0, 1, 1, 8, 22, 22, 64, 82, 96, 92, 124, 0, 1, 0, 10, 26, 30, 82, 137, 144, 204, 176, 214
Offset: 0

Views

Author

Gus Wiseman, Jun 28 2024

Keywords

Examples

			Triangle begins:
   1
   0   1
   0   1   1
   0   1   0   3
   0   1   1   2   4
   0   1   0   4   4   7
   0   1   1   5   6   5  14
   0   1   0   6  10  10  14  23
   0   1   1   6  14  12  29  26  39
   0   1   0   9  16  19  40  54  46  71
   0   1   1   8  22  22  64  82  96  92 124
   0   1   0  10  26  30  82 137 144 204 176 214
   0   1   1  11  32  31 121 186 240 331 393 323 378
Row n = 6 counts the following compositions:
  .  (111111)  (222)  (33)     (3111)   (411)   (6)
                      (2211)   (1113)   (114)   (51)
                      (1122)   (1221)   (1311)  (15)
                      (21111)  (12111)  (1131)  (42)
                      (11112)  (11211)  (2112)  (24)
                               (11121)          (141)
                                                (321)
                                                (312)
                                                (231)
                                                (213)
                                                (132)
                                                (123)
                                                (2121)
                                                (1212)
For example, the composition (1,2,2,1) with compression (1,2,1) is counted under T(6,4).
		

Crossrefs

Column k = n is A003242 (anti-runs or compressed compositions).
Row-sums are A011782.
Same as A373951 with rows reversed.
Column k = 3 is A373952.
This statistic is represented by A373953, difference A373954.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by compressed sum, by compressed length A116608.
A124767 counts runs in standard compositions, anti-runs A333381.
A240085 counts compositions with no unique parts.
A333755 counts compositions by compressed length.
A373948 represents the run-compression transformation.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Total[First/@Split[#]]==k&]], {n,0,10},{k,0,n}]
  • PARI
    T_xy(row_max) = {my(N=row_max+1, x='x+O('x^N), h=1/(1-sum(i=1,N, (y^i*x^i)/(1+x^i*(y^i-1))))); vector(N, n, Vecrev(polcoeff(h, n-1)))}
    T_xy(13) \\ John Tyler Rascoe, Mar 20 2025

Formula

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

A114901 Number of compositions of n such that each part is adjacent to an equal part.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 5, 3, 10, 10, 21, 22, 49, 51, 105, 126, 233, 292, 529, 678, 1181, 1585, 2654, 3654, 6016, 8416, 13606, 19395, 30840, 44517, 70087, 102070, 159304, 233941, 362429, 535520, 825358, 1225117, 1880220, 2801749, 4285086, 6404354, 9769782, 14634907
Offset: 0

Views

Author

Christian G. Bower, Jan 05 2006

Keywords

Examples

			The 5 compositions of 6 are 3+3, 2+2+2, 2+2+1+1, 1+1+2+2, 1+1+1+1+1+1.
From _Gus Wiseman_, Nov 25 2019: (Start)
The a(2) = 1 through a(9) = 10 compositions:
  (11)  (111)  (22)    (11111)  (33)      (11122)    (44)        (333)
               (1111)           (222)     (22111)    (1133)      (11133)
                                (1122)    (1111111)  (2222)      (33111)
                                (2211)               (3311)      (111222)
                                (111111)             (11222)     (222111)
                                                     (22211)     (1111122)
                                                     (111122)    (1112211)
                                                     (112211)    (1122111)
                                                     (221111)    (2211111)
                                                     (11111111)  (111111111)
(End)
		

Crossrefs

The case of partitions is A007690.
Compositions with no adjacent parts equal are A003242.
Compositions with all multiplicities > 1 are A240085.
Compositions with minimum multiplicity 1 are A244164.
Compositions with at least two adjacent parts equal are A261983.

Programs

  • Maple
    g:= proc(n, i) option remember; add(b(n-i*j, i), j=2..n/i) end:
    b:= proc(n, l) option remember; `if`(n=0, 1,
          add(`if`(i=l, 0, g(n,i)), i=1..n/2))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Nov 29 2019
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Min@@Length/@Split[#]>1&]],{n,0,10}] (* Gus Wiseman, Nov 25 2019 *)
    g[n_, i_] := g[n, i] = Sum[b[n - i*j, i], {j, 2, n/i}] ;
    b[n_, l_] := b[n, l] = If[n==0, 1, Sum[If[i==l, 0, g[n, i]], {i, 1, n/2}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 50] (* Jean-François Alcover, May 23 2021, after Alois P. Heinz *)
  • PARI
    A_x(N,k) = { my(x='x+O('x^N), g=1/(1-sum(i=1,N,sum(j=k+1,N, x^(i*j))/(1+ sum(j=k+1,N, x^(i*j)))))); Vec(g)}
    A_x(50,1) \\ John Tyler Rascoe, May 17 2024

Formula

INVERT(iMOEBIUS(iINVERT(A000012 shifted right 2 places)))
G.f.: A(x,1) is the k = 1 case of A(x,k) = 1/(1 - Sum_{i>0} ( (Sum_{j>k} x^(i*j))/(1 + Sum_{j>k} x^(i*j)) )) where A(x,k) is the g.f. for compositions of n with all run-lengths > k. - John Tyler Rascoe, May 16 2024

A373948 Run-compression encoded as a transformation of compositions in standard order.

Original entry on oeis.org

0, 1, 2, 1, 4, 5, 6, 1, 8, 9, 2, 5, 12, 13, 6, 1, 16, 17, 18, 9, 20, 5, 22, 5, 24, 25, 6, 13, 12, 13, 6, 1, 32, 33, 34, 17, 4, 37, 38, 9, 40, 41, 2, 5, 44, 45, 22, 5, 48, 49, 50, 25, 52, 13, 54, 13, 24, 25, 6, 13, 12, 13, 6, 1, 64, 65, 66, 33, 68, 69, 70, 17, 72
Offset: 0

Views

Author

Gus Wiseman, Jun 24 2024

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.
We define the (run-) compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has compression (1,2,1).
For the present sequence, the a(n)-th composition in standard order is obtained by compressing the n-th composition in standard order.

Examples

			The standard compositions and their compressions begin:
   0: ()        -->  0: ()
   1: (1)       -->  1: (1)
   2: (2)       -->  2: (2)
   3: (1,1)     -->  1: (1)
   4: (3)       -->  4: (3)
   5: (2,1)     -->  5: (2,1)
   6: (1,2)     -->  6: (1,2)
   7: (1,1,1)   -->  1: (1)
   8: (4)       -->  8: (4)
   9: (3,1)     -->  9: (3,1)
  10: (2,2)     -->  2: (2)
  11: (2,1,1)   -->  5: (2,1)
  12: (1,3)     --> 12: (1,3)
  13: (1,2,1)   --> 13: (1,2,1)
  14: (1,1,2)   -->  6: (1,2)
  15: (1,1,1,1) -->  1: (1)
		

Crossrefs

Positions of 1's are A000225.
The image is A333489, counted by A003242.
Sum of standard composition for a(n) is given by A373953, length A124767.
A037201 gives compression of first differences of primes, halved A373947.
A066099 lists the parts of all compositions in standard order.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by compressed sum, by length A116608.
A240085 counts compositions with no unique parts.
A333755 counts compositions by compressed length.
A373949 counts compositions by compressed sum, opposite A373951.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    Table[stcinv[First/@Split[stc[n]]],{n,0,30}]

Formula

A029837(a(n)) = A373953(n).
A000120(a(n)) = A124767(n).

A373953 Sum of run-compression of the n-th integer composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 25 2024

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.
We define the (run-) compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has compression (1,2,1).

Examples

			The standard compositions and their compressions and compression sums begin:
   0: ()        --> ()      --> 0
   1: (1)       --> (1)     --> 1
   2: (2)       --> (2)     --> 2
   3: (1,1)     --> (1)     --> 1
   4: (3)       --> (3)     --> 3
   5: (2,1)     --> (2,1)   --> 3
   6: (1,2)     --> (1,2)   --> 3
   7: (1,1,1)   --> (1)     --> 1
   8: (4)       --> (4)     --> 4
   9: (3,1)     --> (3,1)   --> 4
  10: (2,2)     --> (2)     --> 2
  11: (2,1,1)   --> (2,1)   --> 3
  12: (1,3)     --> (1,3)   --> 4
  13: (1,2,1)   --> (1,2,1) --> 4
  14: (1,1,2)   --> (1,2)   --> 3
  15: (1,1,1,1) --> (1)     --> 1
		

Crossrefs

Positions of 1's are A000225.
Counting partitions by this statistic gives A116861, by length A116608.
For length instead of sum we have A124767, counted by A238279 and A333755.
Compositions counted by this statistic are A373949, opposite A373951.
A037201 gives compression of first differences of primes, halved A373947.
A066099 lists the parts of all compositions in standard order.
A114901 counts compositions with no isolated parts.
A240085 counts compositions with no unique parts.
A333489 ranks anti-runs, counted by A003242.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[First/@Split[stc[n]]],{n,0,100}]

Formula

a(n) = A029837(A373948(n)).

A373954 Excess run-compression of standard compositions. Sum of all parts minus sum of compressed parts of the n-th integer composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 27 2024

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.
We define the (run-) compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has compression (1,2,1).

Examples

			The excess compression of (2,1,1,3) is 1, so a(92) = 1.
		

Crossrefs

For length instead of sum we have A124762, counted by A106356.
The opposite for length is A124767, counted by A238279 and A333755.
Positions of zeros are A333489, counted by A003242.
Positions of nonzeros are A348612, counted by A131044.
Compositions counted by this statistic are A373951, opposite A373949.
Compression of standard compositions is A373953.
Positions of ones are A373955.
A037201 gives compression of first differences of primes, halved A373947.
A066099 lists the parts of all compositions in standard order.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by this statistic, by length A116608.
A240085 counts compositions with no unique parts.
A333627 takes the rank of a composition to the rank of its run-lengths.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[stc[n]]-Total[First/@Split[stc[n]]],{n,0,100}]

Formula

a(n) = A029837(n) - A373953(n).

A373951 Triangle read by rows where T(n,k) is the number of integer compositions of n such that replacing each run of repeated parts with a single part (run-compression) yields a composition of n - k.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 3, 0, 1, 0, 4, 2, 1, 1, 0, 7, 4, 4, 0, 1, 0, 14, 5, 6, 5, 1, 1, 0, 23, 14, 10, 10, 6, 0, 1, 0, 39, 26, 29, 12, 14, 6, 1, 1, 0, 71, 46, 54, 40, 19, 16, 9, 0, 1, 0, 124, 92, 96, 82, 64, 22, 22, 8, 1, 1, 0, 214, 176, 204, 144, 137, 82, 30, 26, 10, 0, 1, 0
Offset: 0

Views

Author

Gus Wiseman, Jun 28 2024

Keywords

Examples

			Triangle begins:
    1
    1   0
    1   1   0
    3   0   1   0
    4   2   1   1   0
    7   4   4   0   1   0
   14   5   6   5   1   1   0
   23  14  10  10   6   0   1   0
   39  26  29  12  14   6   1   1   0
   71  46  54  40  19  16   9   0   1   0
  124  92  96  82  64  22  22   8   1   1   0
Row n = 6 counts the following compositions:
  (6)     (411)   (3111)   (33)     (222)  (111111)  .
  (51)    (114)   (1113)   (2211)
  (15)    (1311)  (1221)   (1122)
  (42)    (1131)  (12111)  (21111)
  (24)    (2112)  (11211)  (11112)
  (141)           (11121)
  (321)
  (312)
  (231)
  (213)
  (132)
  (123)
  (2121)
  (1212)
For example, the composition (1,2,2,1) with compression (1,2,1) is counted under T(6,2).
		

Crossrefs

Column k = 0 is A003242 (anti-runs or compressed compositions).
Row-sums are A011782.
Same as A373949 with rows reversed.
Column k = 1 is A373950.
This statistic is represented by A373954, difference A373953.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by compressed sum, by compressed length A116608.
A124767 counts runs in standard compositions, anti-runs A333381.
A240085 counts compositions with no unique parts.
A333755 counts compositions by compressed length.
A373948 represents the run-compression transformation.

Programs

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

A329861 Triangle read by rows where T(n,k) is the number of compositions of n with cuts-resistance k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 4, 3, 0, 1, 0, 7, 6, 2, 0, 1, 0, 14, 9, 6, 2, 0, 1, 0, 23, 22, 10, 6, 2, 0, 1, 0, 39, 47, 22, 10, 7, 2, 0, 1, 0, 71, 88, 52, 24, 10, 8, 2, 0, 1, 0, 124, 179, 101, 59, 26, 11, 9, 2, 0, 1, 0, 214, 354, 220, 112, 71, 28, 12, 10, 2, 0, 1
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 shortening all runs by 1, cuts-resistance is defined as the number of applications required to reach an empty word.

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  3  0  1
  0  4  3  0  1
  0  7  6  2  0  1
  0 14  9  6  2  0  1
  0 23 22 10  6  2  0  1
  0 39 47 22 10  7  2  0  1
  0 71 88 52 24 10  8  2  0  1
Row n = 6 counts the following compositions (empty columns not shown):
  (6)     (33)    (222)    (11112)  (111111)
  (15)    (114)   (1113)   (21111)
  (24)    (411)   (3111)
  (42)    (1122)  (11121)
  (51)    (1131)  (11211)
  (123)   (1221)  (12111)
  (132)   (1311)
  (141)   (2112)
  (213)   (2211)
  (231)
  (312)
  (321)
  (1212)
  (2121)
		

Crossrefs

Row sums are A000079.
Column k = 1 is A003242 (for n > 0).
Column k = 2 is A329863.
Row sums without the k = 1 column are A261983.
The version for runs-resistance is A329744.
The version for binary vectors is A329860.
The cuts-resistance of the binary expansion of n is A319416.

Programs

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

A373947 Halved and run-compressed first differences of consecutive odd primes.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3, 1, 3, 2, 1, 3, 2, 3, 4, 2, 1, 2, 1, 2, 7, 2, 3, 1, 5, 1, 3, 2, 3, 1, 5, 1, 2, 1, 6, 2, 1, 2, 3, 1, 5, 3, 1, 3, 2, 1, 5, 7, 2, 1, 2, 7, 3, 5, 1, 2, 3, 4, 3, 2, 3, 4, 2, 4, 5, 1, 5, 1, 3, 2, 3, 4, 2, 1, 2, 6, 4, 2, 4, 2, 3
Offset: 1

Views

Author

Gus Wiseman, Jun 29 2024

Keywords

Comments

We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).

Examples

			The odd primes begin:
3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, ...
with differences:
2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, ...
with run-compression:
2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, ...
which is 2*a(n).
		

Crossrefs

Programs

  • Mathematica
    First/@Split[Differences[Select[Range[3,100],PrimeQ]]]/2

Formula

a(n) = A037201(n+1)/2.

A244164 Number of compositions of n in which the minimal multiplicity of parts equals 1.

Original entry on oeis.org

1, 1, 3, 6, 15, 23, 53, 94, 203, 404, 855, 1648, 3416, 6662, 13400, 26406, 53038, 105306, 212051, 422162, 849267, 1696864, 3406077, 6807024, 13642099, 27268122, 54576003, 109096436, 218250874, 436243705, 872533347, 1744312748, 3488432736, 6974783481
Offset: 1

Views

Author

Alois P. Heinz, Jun 21 2014

Keywords

Examples

			From _Gus Wiseman_, Nov 25 2019: (Start)
The a(1) = 1 through a(5) = 15 compositions:
  (1)  (2)  (3)    (4)      (5)
            (1,2)  (1,3)    (1,4)
            (2,1)  (3,1)    (2,3)
                   (1,1,2)  (3,2)
                   (1,2,1)  (4,1)
                   (2,1,1)  (1,1,3)
                            (1,2,2)
                            (1,3,1)
                            (2,1,2)
                            (2,2,1)
                            (3,1,1)
                            (1,1,1,2)
                            (1,1,2,1)
                            (1,2,1,1)
                            (2,1,1,1)
(End)
		

Crossrefs

Column k=1 of A242451.
The complement is counted by A240085.

Programs

  • Maple
    b:= proc(n, i, p, k) option remember; `if`(n=0, p!, `if`(i<1, 0,
          add(b(n-i*j, i-1, p+j, k)/j!, j=[0, $max(1, k)..n/i])))
        end:
    a:= n-> b(n$2, 0, 1) -b(n$2, 0, 2):
    seq(a(n), n=1..50);
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Min@@Length/@Split[Sort[#]]==1&]],{n,0,10}] (* Gus Wiseman, Nov 25 2019 *)

Formula

a(n) = 2^(n-1) - A240085(n). - Gus Wiseman, Nov 25 2019

A329863 Number of compositions of n with cuts-resistance 2.

Original entry on oeis.org

0, 0, 1, 0, 3, 6, 9, 22, 47, 88, 179, 354, 691, 1344, 2617, 5042, 9709, 18632, 35639, 68010, 129556, 246202, 467188, 885036, 1674211, 3163094, 5969022, 11251676, 21189382, 39867970, 74950464, 140798302, 264313039, 495861874, 929709687, 1742193854, 3263069271, 6108762316
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 shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.

Examples

			The a(2) = 1 through a(7) = 22 compositions (empty column not shown):
  (1,1)  (2,2)    (1,1,3)    (3,3)      (1,1,5)
         (1,1,2)  (1,2,2)    (1,1,4)    (1,3,3)
         (2,1,1)  (2,2,1)    (4,1,1)    (2,2,3)
                  (3,1,1)    (1,1,2,2)  (3,2,2)
                  (1,1,2,1)  (1,1,3,1)  (3,3,1)
                  (1,2,1,1)  (1,2,2,1)  (5,1,1)
                             (1,3,1,1)  (1,1,2,3)
                             (2,1,1,2)  (1,1,3,2)
                             (2,2,1,1)  (1,1,4,1)
                                        (1,4,1,1)
                                        (2,1,1,3)
                                        (2,1,2,2)
                                        (2,2,1,2)
                                        (2,3,1,1)
                                        (3,1,1,2)
                                        (3,2,1,1)
                                        (1,1,2,1,2)
                                        (1,1,2,2,1)
                                        (1,2,1,1,2)
                                        (1,2,2,1,1)
                                        (2,1,1,2,1)
                                        (2,1,2,1,1)
		

Crossrefs

Column k = 2 of A329861.
Compositions with cuts-resistance 1 are A003242.
Compositions with runs-resistance 2 are A329745.
Numbers whose binary expansion has cuts-resistance 2 are A329862.
Binary words with cuts-resistance 2 are conjectured to be A027383.
Cuts-resistance of binary expansion is A319416.
Binary words counted by cuts-resistance are A319421 and A329860.

Programs

  • Mathematica
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],degdep[#]==2&]],{n,0,10}]
  • PARI
    Ca(N) = {1/(1-sum(k=1, N, x^k/(1+x^k)))}
    A_x(N) = {my(x='x+O('x^N)); concat([0,0],Vec(-1+(1+sum(m=1,N, Ca(N)*x^(2*m)*(Ca(N)-1)/(1+x^m*(2+x^m*(1+Ca(N))))))/(1-sum(m=1,N, Ca(N)*x^(2*m)/(1+x^m*(2+x^m*(1+Ca(N))))))))}
    A_x(38) \\ John Tyler Rascoe, Feb 20 2025

Formula

G.f.: -1 + (1 + Ca(x) * Sum_{m>0} x^(2*m) * (Ca(x)-1)/(1 + x^m * (2 + x^m * (1+Ca(x)))))/(1 - Ca(x) * Sum_{m>0} x^(2*m)/(1 + x^m * (2 + x^m * (1+Ca(x))))) where Ca(x) is the g.f. for A003242. - John Tyler Rascoe, Feb 20 2025

Extensions

a(21) onwards from John Tyler Rascoe, Feb 20 2025
Showing 1-10 of 18 results. Next