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

A384175 Number of subsets of {1..n} with all distinct lengths of maximal runs (increasing by 1).

Original entry on oeis.org

1, 2, 4, 7, 13, 24, 44, 77, 135, 236, 412, 713, 1215, 2048, 3434, 5739, 9559, 15850, 26086, 42605, 69133, 111634, 179602, 288069, 460553, 733370, 1162356, 1833371, 2878621, 4501856, 7016844, 10905449, 16904399, 26132460, 40279108, 61885621, 94766071, 144637928
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2025

Keywords

Examples

			The subset {2,3,5,6,7,9} has maximal runs ((2,3),(5,6,7),(9)), with lengths (2,3,1), so is counted under a(9).
The a(0) = 1 through a(4) = 13 subsets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {2}    {2}      {2}
           {1,2}  {3}      {3}
                  {1,2}    {4}
                  {2,3}    {1,2}
                  {1,2,3}  {2,3}
                           {3,4}
                           {1,2,3}
                           {1,2,4}
                           {1,3,4}
                           {2,3,4}
                           {1,2,3,4}
		

Crossrefs

For equal instead of distinct lengths we have A243815.
These subsets are ranked by A328592.
The complement is counted by A384176.
For anti-runs instead of runs we have A384177, ranks A384879.
For partitions instead of subsets we have A384884, A384178, A384886, A384880.
For permutations instead of subsets we have A384891, equal instead of distinct A384892.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)={my(o=(1-x^(n+1))/(1-x)*O(y^(n+2)),p=prod(i=1,n,1+o+x*y^(i+1)/(1-y),1/(1-y)));p=subst(serlaplace(p),x,1);Vec(p-1)} \\ Christian Sievers, Jun 18 2025

Extensions

a(21) and beyond from Christian Sievers, Jun 18 2025

A384893 Triangle read by rows where T(n,k) is the number of subsets of {1..n} with k maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 7, 5, 2, 1, 1, 12, 10, 6, 2, 1, 1, 20, 20, 13, 7, 2, 1, 1, 33, 38, 29, 16, 8, 2, 1, 1, 54, 71, 60, 39, 19, 9, 2, 1, 1, 88, 130, 122, 86, 50, 22, 10, 2, 1, 1, 143, 235, 241, 187, 116, 62, 25, 11, 2, 1, 1, 232, 420, 468, 392, 267, 150, 75, 28, 12, 2, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 21 2025

Keywords

Examples

			The subset {3,6,7,9,11,12} has maximal anti-runs ((3,6),(7,9,11),(12)), so is counted under T(12,3).
The subset {3,6,7,9,10,12} has maximal anti-runs ((3,6),(7,9),(10,12)), so is counted under T(12,3).
Row n = 5 counts the following subsets:
  {}  {1}      {1,2}    {1,2,3}    {1,2,3,4}  {1,2,3,4,5}
      {2}      {2,3}    {2,3,4}    {2,3,4,5}
      {3}      {3,4}    {3,4,5}
      {4}      {4,5}    {1,2,3,5}
      {5}      {1,2,4}  {1,2,4,5}
      {1,3}    {1,2,5}  {1,3,4,5}
      {1,4}    {1,3,4}
      {1,5}    {1,4,5}
      {2,4}    {2,3,5}
      {2,5}    {2,4,5}
      {3,5}
      {1,3,5}
Triangle begins:
   1
   1   1
   1   2   1
   1   4   2   1
   1   7   5   2   1
   1  12  10   6   2   1
   1  20  20  13   7   2   1
   1  33  38  29  16   8   2   1
   1  54  71  60  39  19   9   2   1
   1  88 130 122  86  50  22  10   2   1
   1 143 235 241 187 116  62  25  11   2   1
   1 232 420 468 392 267 150  75  28  12   2   1
   1 376 744 894 806 588 363 188  89  31  13   2   1
		

Crossrefs

Column k = 1 is A000071.
Row sums are A000079.
Column k = 2 is A001629.
For runs instead of anti-runs we have A034839, for strict partitions A116674.
The case containing n is A053538.
For integer partitions instead of subsets we have A268193, strict A384905.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Length[Split[#,#2!=#1+1&]]==k&]],{n,0,10},{k,0,n}]

A268193 Triangle read by rows: T(n,k) (n>=1, k>=0) is the number of partitions of n which have k distinct parts i such that i+1 is also a part.

Original entry on oeis.org

1, 2, 2, 1, 4, 1, 4, 3, 8, 2, 1, 8, 6, 1, 13, 7, 2, 15, 11, 4, 22, 15, 4, 1, 24, 24, 7, 1, 37, 26, 12, 2, 40, 42, 16, 3, 57, 50, 22, 6, 64, 72, 33, 6, 1, 89, 84, 46, 11, 1, 98, 122, 60, 15, 2, 135, 141, 82, 24, 3, 149, 198, 106, 32, 5, 199, 231, 144, 45, 8, 224, 309, 187, 61, 10, 1
Offset: 1

Views

Author

Emeric Deutsch, Feb 13 2016

Keywords

Comments

T(n,k) = number of partitions of n having k singleton parts other than the largest part. Example: T(5,1) = 3 because we have [4,1'], [3,2'], [2,2,1'] (the counted singletons are marked). These partitions are connected by conjugation to those in the definition.
From Gus Wiseman, Jul 10 2025: (Start)
Also the number of integer partitions of n with k maximal subsequences of consecutive parts not decreasing by 1 (anti-runs). For example, row n = 8 counts partitions with the following anti-runs:
((8)) ((3,3),(2)) ((3),(2,2),(1))
((4,4)) ((4),(3,1)) ((3),(2),(1,1,1))
((5,3)) ((5,2),(1))
((6,2)) ((4,2),(1,1))
((7,1)) ((2,2,2),(1,1))
((4,2,2)) ((2,2),(1,1,1,1))
((6,1,1)) ((2),(1,1,1,1,1,1))
((2,2,2,2))
((3,3,1,1))
((5,1,1,1))
((4,1,1,1,1))
((3,1,1,1,1,1))
((1,1,1,1,1,1,1,1))
(End)

Examples

			T(5,1) = 3 because we have [3,2], [2,2,1], and [2,1,1,1].
T(9,2) = 4 because we have [3,2',1,1,1,1'], [3,2,2',1,1'], [3,3,2',1'], and [4,3',2'] (the i's are marked).
Triangle starts:
  1;
  2;
  2,1;
  4,1;
  4,3;
  8,2,1;
  8,6,1;
From _Gus Wiseman_, Jul 11 2025: (Start)
Row n = 8 counts the following partitions by number of singleton parts other than the largest part:
  (8)                (5,3)        (4,3,1)
  (4,4)              (6,2)        (5,2,1)
  (4,2,2)            (7,1)
  (6,1,1)            (3,3,2)
  (2,2,2,2)          (3,2,2,1)
  (3,3,1,1)          (4,2,1,1)
  (5,1,1,1)          (3,2,1,1,1)
  (2,2,2,1,1)
  (4,1,1,1,1)
  (2,2,1,1,1,1)
  (3,1,1,1,1,1)
  (2,1,1,1,1,1,1)
  (1,1,1,1,1,1,1,1)
(End)
		

Crossrefs

Row sums are A000041.
Row lengths are A003056.
For distinct parts instead of anti-runs we have A116608.
Column k = 1 is A116931.
For runs instead of anti-runs we have A384881.
The strict case is A384905.
The corresponding rank statistic is A356228, non-strict version A384906.
The proper case is A385814, runs A385815.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.

Programs

  • Maple
    g := add(x^j*mul(1+t*x^i+x^(2*i)/(1-x^i), i = 1 .. j-1)/(1-x^j), j = 1 .. 80): gser := simplify(series(g, x = 0, 27)): for n from 0 to 25 do P[n] := sort(coeff(gser, x, n)) end do: for n to 25 do seq(coeff(P[n], t, k), k = 0 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i, t) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-1, t or j>0)*
          `if`(t and j=1, x, 1), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, false)):
    seq(T(n), n=1..20);  # Alois P. Heinz, Feb 13 2016
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1, t || j > 0]*If[t && j == 1, x, 1], {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n, False]]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Length[Split[#,#1!=#2+1&]]==k&]],{n,0,10},{k,0,n}] (* Delete zeros for A268193. Gus Wiseman, Jul 10 2025 *)

Formula

T(n,0) = A116931(n).
Sum_{k>=1} T(n, k) = A000041(n) (the partition numbers).
Sum_{k>=1} k*T(n,k) = A024786(n-1).
G.f.: G(t,x) = Sum_{j>=1} ((x^j/(1-x^j))*Product_{i=1..j-1} (1 + tx^i + x^{2i}/(1-x^i))).

A116674 Triangle read by rows: T(n,k) is the number of partitions of n into odd parts and having exactly k distinct parts (n>=1, k>=1).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 3, 1, 5, 3, 4, 1, 2, 7, 1, 2, 8, 2, 2, 10, 3, 2, 11, 5, 2, 13, 7, 4, 12, 11, 1, 19, 11, 1, 2, 18, 17, 1, 3, 20, 21, 2, 2, 22, 27, 3, 2, 25, 32, 5, 4, 24, 41, 7, 2, 30, 46, 11, 2, 31, 56, 15, 2, 36, 62, 22, 3, 33, 80, 25, 1, 2, 39, 87, 36, 1, 4, 38, 103, 45, 2, 2, 45
Offset: 1

Views

Author

Emeric Deutsch, Feb 22 2006

Keywords

Comments

Row n has floor(sqrt(n)) terms. Row sums yield A000009. T(n,1)=A001227(n) (n>=1). Sum(k*T(n,k),k>=1)=A038348(n-1) (n>=1).
Conjecture: Also the number of strict integer partitions of n with k maximal runs of consecutive parts decreasing by 1. - Gus Wiseman, Jun 24 2025

Examples

			From _Gus Wiseman_, Jun 24 2025: (Start)
Triangle begins:
   1:  1
   2:  1
   3:  2
   4:  1  1
   5:  2  1
   6:  2  2
   7:  2  3
   8:  1  5
   9:  3  4  1
  10:  2  7  1
  11:  2  8  2
  12:  2 10  3
  13:  2 11  5
  14:  2 13  7
  15:  4 12 11
  16:  1 19 11  1
  17:  2 18 17  1
  18:  3 20 21  2
  19:  2 22 27  3
  20:  2 25 32  5
Row n = 9 counts the following partitions into odd parts by number of distinct parts:
  (9)                  (7,1,1)          (5,3,1)
  (3,3,3)              (3,3,1,1,1)
  (1,1,1,1,1,1,1,1,1)  (5,1,1,1,1)
                       (3,1,1,1,1,1,1)
Row n = 9 counts the following strict partitions by number of maximal runs:
  (9)      (6,3)    (5,3,1)
  (5,4)    (7,2)
  (4,3,2)  (8,1)
           (6,2,1)
(End)
		

Crossrefs

Row sums are A000009, strict case of A000041.
Row lengths are A000196.
Leading terms are A001227.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat partitions, ranks A066311 or A073491.
A047993 counts partitions with max part = length.
A152140 counts partitions into odd parts by length.
A268193 counts partitions by number of maximal anti-runs, strict A384905.
A384881 counts partitions by number of maximal runs.

Programs

  • Maple
    g:=product(1+t*x^(2*j-1)/(1-x^(2*j-1)),j=1..35): gser:=simplify(series(g,x=0,34)): for n from 1 to 29 do P[n]:=coeff(gser,x^n) od: for n from 1 to 29 do seq(coeff(P[n],t,j),j=1..floor(sqrt(n))) od; # yields sequence in triangular form
    # second Maple program:
    with(numtheory):
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-2)*`if`(j=0, 1, x), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(
             b(n, iquo(n+1, 2)*2-1)):
    seq(T(n), n=1..30);  # Alois P. Heinz, Mar 08 2015
  • Mathematica
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i<1, 0, Sum[b[n-i*j, i-2]*If[j == 0, 1, x], {j, 0, n/i}]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, Quotient[n+1, 2]*2-1]]; Table[T[n], {n, 1, 30}] // Flatten (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],OddQ[Times@@#]&&Length[Union[#]]==k&]],{n,1,12},{k,1,Floor[Sqrt[n]]}] (*  Gus Wiseman, Jun 24 2025 *)

Formula

G.f.: product(1+tx^(2j-1)/(1-x^(2j-1)), j=1..infinity).

A384177 Number of subsets of {1..n} with all distinct lengths of maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 3, 5, 10, 19, 35, 62, 109, 197, 364, 677, 1251, 2288, 4143, 7443, 13318, 23837, 42809, 77216, 139751, 253293, 458800, 829237, 1494169, 2683316, 4804083, 8580293, 15301324, 27270061, 48607667, 86696300, 154758265, 276453311, 494050894, 882923051
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2025

Keywords

Examples

			The subset {1,2,4,5,7,10} has maximal anti-runs ((1),(2,4),(5,7,10)), with lengths (1,2,3), so is counted under a(10).
The a(0) = 1 through a(5) = 19 subsets:
  {}  {}   {}   {}     {}       {}
      {1}  {1}  {1}    {1}      {1}
           {2}  {2}    {2}      {2}
                {3}    {3}      {3}
                {1,3}  {4}      {4}
                       {1,3}    {5}
                       {1,4}    {1,3}
                       {2,4}    {1,4}
                       {1,2,4}  {1,5}
                       {1,3,4}  {2,4}
                                {2,5}
                                {3,5}
                                {1,2,4}
                                {1,2,5}
                                {1,3,4}
                                {1,3,5}
                                {1,4,5}
                                {2,3,5}
                                {2,4,5}
		

Crossrefs

For runs instead of anti-runs we have A384175, complement A384176.
These subsets are ranked by A384879.
For strict partitions instead of subsets we have A384880, see A384178, A384884, A384886.
For equal instead of distinct lengths we have A384889, for runs A243815.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Length/@Split[#,#2!=#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)={my(o=(1-x^(n+1))/(1-x)*O(y*y^n),p=prod(i=1,(n+1)\2,1+o+x*y^(2*i-1)/(1-y)^(i-1)));p=subst(serlaplace(p),x,1);Vec((p-y)/(1-y)^2)} \\ Christian Sievers, Jun 18 2025

Extensions

a(21) and beyond from Christian Sievers, Jun 18 2025

A384176 Number of subsets of {1..n} without all distinct lengths of maximal runs (increasing by 1).

Original entry on oeis.org

0, 0, 0, 1, 3, 8, 20, 51, 121, 276, 612, 1335, 2881, 6144, 12950, 27029, 55977, 115222, 236058, 481683, 979443
Offset: 0

Views

Author

Gus Wiseman, Jun 16 2025

Keywords

Examples

			The subset {1,3,4,8,9} has maximal runs ((1),(3,4),(8,9)), with lengths (1,2,2), so is counted under a(10).
The a(0) = 0 through a(6) = 20 subsets:
  .  .  .  {1,3}  {1,3}  {1,3}      {1,3}
                  {1,4}  {1,4}      {1,4}
                  {2,4}  {1,5}      {1,5}
                         {2,4}      {1,6}
                         {2,5}      {2,4}
                         {3,5}      {2,5}
                         {1,3,5}    {2,6}
                         {1,2,4,5}  {3,5}
                                    {3,6}
                                    {4,6}
                                    {1,3,5}
                                    {1,3,6}
                                    {1,4,6}
                                    {2,4,6}
                                    {1,2,4,5}
                                    {1,2,4,6}
                                    {1,2,5,6}
                                    {1,3,4,6}
                                    {1,3,5,6}
                                    {2,3,5,6}
		

Crossrefs

For equal instead of distinct lengths the complement is A243815.
These subsets are ranked by the non-members of A328592.
The complement is counted by A384175.
For strict partitions instead of subsets see A384178, A384884, A384886, A384880.
For permutations instead of subsets see A384891, A384892, A010027.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A098859 counts Wilf partitions (distinct multiplicities), complement A336866.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],!UnsameQ@@Length/@Split[#,#2==#1+1&]&]],{n,0,10}]

A053538 Triangle: a(n,m) = ways to place p balls in n slots with m in the rightmost p slots, 0<=p<=n, 0<=m<=n, summed over p, a(n,m)= Sum_{k=0..n} binomial(k,m)*binomial(n-k,k-m), (see program line).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 5, 4, 1, 1, 8, 10, 7, 5, 1, 1, 13, 18, 16, 9, 6, 1, 1, 21, 33, 31, 23, 11, 7, 1, 1, 34, 59, 62, 47, 31, 13, 8, 1, 1, 55, 105, 119, 101, 66, 40, 15, 9, 1, 1, 89, 185, 227, 205, 151, 88, 50, 17, 10, 1, 1, 144, 324, 426, 414, 321, 213, 113, 61, 19, 11, 1, 1
Offset: 0

Views

Author

Wouter Meeussen, May 23 2001

Keywords

Comments

Riordan array (1/(1-x-x^2), x(1-x)/(1-x-x^2)). Row sums are A000079. Diagonal sums are A006053(n+2). - Paul Barry, Nov 01 2006
Subtriangle of the triangle given by (0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 05 2012
Mirror image of triangle in A208342. - Philippe Deléham, Mar 05 2012
A053538 is jointly generated with A076791 as an array of coefficients of polynomials u(n,x): initially, u(1,x)=v(1,x)=1, for n>1, u(n,x) = x*u(n-1,x) + v(n-1,x) and v(n,x) = u(n-1,x) + v(n-1,x). See the Mathematica section at A076791. - Clark Kimberling, Mar 08 2012
The matrix inverse starts
1;
-1, 1;
-1, -1, 1;
1, -2, -1, 1;
3, 1, -3, -1, 1;
1, 6, 1, -4, -1, 1;
-7, 4, 10, 1, -5, -1, 1;
-13, -13, 8, 15, 1, -6, -1, 1;
3, -31, -23, 13, 21, 1, -7, -1, 1; - R. J. Mathar, Mar 15 2013
Also appears to be the number of subsets of {1..n} containing n with k maximal anti-runs of consecutive elements increasing by more than 1. For example, the subset {1,3,6,7,11,12} has maximal anti-runs ((1,3,6),(7,11),(12)) so is counted under a(12,3). For runs instead of anti-runs we get A202064. - Gus Wiseman, Jun 26 2025

Examples

			n=4; Table[binomial[k, j]binomial[n-k, k-j], {k, 0, n}, {j, 0, n}] splits {1, 4, 6, 4, 1} into {{1, 0, 0, 0, 0}, {3, 1, 0, 0, 0}, {1, 4, 1, 0, 0}, {0, 0, 3, 1, 0}, {0, 0, 0, 0, 1}} and this gives summed by columns {5, 5, 4, 1, 1}
Triangle begins :
   1;
   1,  1;
   2,  1,  1;
   3,  3,  1, 1;
   5,  5,  4, 1, 1;
   8, 10,  7, 5, 1, 1;
  13, 18, 16, 9, 6, 1, 1;
...
(0, 1, 1, -1, 0, 0, 0, ...) DELTA (1, 0, -1, 1, 0, 0, 0, ...) begins :
  1;
  0,  1;
  0,  1,  1;
  0,  2,  1,  1;
  0,  3,  3,  1, 1;
  0,  5,  5,  4, 1, 1;
  0,  8, 10,  7, 5, 1, 1;
  0, 13, 18, 16, 9, 6, 1, 1;
		

Crossrefs

Column k = 1 is A000045.
Row sums are A000079.
Column k = 2 is A010049.
For runs instead of anti-runs we have A202064.
For integer partitions see A268193, strict A384905, runs A116674.
A034839 counts subsets by number of maximal runs.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.
A384893 counts subsets by number of maximal anti-runs.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> Sum([0..n], j->  Binomial(j,k)*Binomial(n-j,j-k)) ))); # G. C. Greubel, May 16 2019
  • Magma
    [[(&+[Binomial(j,k)*Binomial(n-j,j-k): j in [0..n]]): k in [0..n]]: n in [0..12]]; // G. C. Greubel, May 16 2019
    
  • Maple
    a:= (n, m)-> add(binomial(k, m)*binomial(n-k, k-m), k=0..n):
    seq(seq(a(n,m), m=0..n), n=0..12);  # Alois P. Heinz, Sep 19 2013
  • Mathematica
    Table[Sum[Binomial[k, m]*Binomial[n-k, k-m], {k,0,n}], {n,0,12}, {m,0,n}]
  • PARI
    {T(n,k) = sum(j=0,n, binomial(j,k)*binomial(n-j,j-k))}; \\ G. C. Greubel, May 16 2019
    
  • Sage
    [[sum(binomial(j,k)*binomial(n-j,j-k) for j in (0..n)) for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 16 2019
    

Formula

From Philippe Deléham, Mar 05 2012: (Start)
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) - T(n-2,k-1), T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if k>n.
G.f.: 1/(1-(1+y)*x-(1-y)*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A077957(n), A000045(n+1), A000079(n), A001906(n+1), A007070(n), A116415(n), A084326(n+1), A190974(n+1), A190978(n+1), A190984(n+1), A190990(n+1), A190872(n+1) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively. (End)

A384889 Number of subsets of {1..n} with all equal lengths of maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 4, 8, 14, 23, 37, 59, 93, 146, 230, 365, 584, 940, 1517, 2450, 3959, 6404, 10373, 16822, 27298, 44297, 71843, 116429, 188550, 305200, 493930, 799422, 1294108, 2095291, 3392736, 5493168, 8892148, 14390372, 23282110, 37660759, 60914308, 98528312, 159386110
Offset: 0

Views

Author

Gus Wiseman, Jun 18 2025

Keywords

Examples

			The subset {3,6,7,9,10,12} has maximal anti-runs ((3,6),(7,9),(10,12)), with lengths (2,2,2), so is counted under a(12).
The a(0) = 1 through a(4) = 14 subsets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {2}    {2}      {2}
           {1,2}  {3}      {3}
                  {1,2}    {4}
                  {1,3}    {1,2}
                  {2,3}    {1,3}
                  {1,2,3}  {1,4}
                           {2,3}
                           {2,4}
                           {3,4}
                           {1,2,3}
                           {2,3,4}
                           {1,2,3,4}
		

Crossrefs

For runs instead of anti-runs we have A243815, distinct A384175, complement A384176.
For distinct instead or equal lengths we have A384177, ranks A384879.
For partitions instead of subsets we have A384888.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A047966 counts uniform partitions (equal multiplicities), ranks A072774.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SameQ@@Length/@Split[#,#2!=#1+1&]&]],{n,0,10}]
  • PARI
    lista(n)=Vec(sum(i=1,(n+1)\2,1/(1-x^(2*i-1)/(1-x)^(i-1))-1,1-x+O(x*x^n))/(1-x)^2) \\ Christian Sievers, Jun 20 2025

Formula

G.f.: ( Sum_{i>=1} (1/(1-x^(2*i-1)/(1-x)^(i-1))-1) + 1-x ) / (1-x)^2. - Christian Sievers, Jun 21 2025

Extensions

a(21) and beyond from Christian Sievers, Jun 20 2025

A210034 Triangle of coefficients of polynomials v(n,x) jointly generated with A210033; see the Formula section.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 7, 5, 2, 1, 12, 10, 6, 2, 1, 20, 20, 13, 7, 2, 1, 33, 38, 29, 16, 8, 2, 1, 54, 71, 60, 39, 19, 9, 2, 1, 88, 130, 122, 86, 50, 22, 10, 2, 1, 143, 235, 241, 187, 116, 62, 25, 11, 2, 1, 232, 420, 468, 392, 267, 150, 75, 28, 12, 2, 1, 376, 744, 894, 806
Offset: 1

Views

Author

Clark Kimberling, Mar 16 2012

Keywords

Comments

For a discussion and guide to related arrays, see A208510.
From Gus Wiseman, Jun 29 2025: (Start)
This appears to be the number of subsets of {1..n} with k>0 maximal anti-runs (sequences of consecutive elements increasing by more than 1). For example, the subset {1,2,4,5} has maximal anti-runs ((1),(2,4),(5)) so is counted under T(5,3). Row n = 5 counts the following:
{1} {1,2} {1,2,3} {1,2,3,4} {1,2,3,4,5}
{2} {2,3} {2,3,4} {2,3,4,5}
{3} {3,4} {3,4,5}
{4} {4,5} {1,2,3,5}
{5} {1,2,4} {1,2,4,5}
{1,3} {1,2,5} {1,3,4,5}
{1,4} {1,3,4}
{1,5} {1,4,5}
{2,4} {2,3,5}
{2,5} {2,4,5}
{3,5}
{1,3,5}
For runs instead of anti-runs we have A034839, with n A202064. For reversed partitions instead of subsets we have A268193. (End)

Examples

			First five rows:
  1
  2    1
  4    2    1
  7    5    2   1
  12   10   6   2   1
First three polynomials v(n,x): 1, 2 + x, 4 + 2*x + x^2.
		

Crossrefs

Column k = 1 is A000071.
Row sums are A000225.
Column k = 2 is A001629.
Column k = 3 is A055243.
The version including k = 0 is A384893.
A034839 counts subsets by number of maximal runs, see also A202023, A202064.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
A384877 gives lengths of maximal anti-runs of binary indices, firsts A384878.

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + v[n - 1, x] + 1;
    v[n_, x_] := u[n - 1, x] + x*v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A210033 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A210034 *)

Formula

u(n,x)=u(n-1,x)+v(n-1,x)+1,
v(n,x)=u(n-1,x)+x*v(n-1,x)+1,
where u(1,x)=1, v(1,x)=1.

A202064 Triangle T(n,k), read by rows, given by (2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 4, 0, 0, 5, 10, 1, 0, 0, 6, 20, 6, 0, 0, 0, 7, 35, 21, 1, 0, 0, 0, 8, 56, 56, 8, 0, 0, 0, 0, 9, 84, 126, 36, 1, 0, 0, 0, 0, 10, 120, 252, 120, 10, 0, 0, 0, 0, 0, 11, 165, 462, 330, 55, 1, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2011

Keywords

Comments

Riordan array (x/(1-x)^2, x^2/(1-x)^2).
Mirror image of triangle in A119900.
A203322*A130595 as infinite lower triangular matrices. - Philippe Deléham, Jan 05 2011
From Gus Wiseman, Jul 07 2025: (Start)
Also the number of subsets of {1..n} containing n with k maximal runs (sequences of consecutive elements increasing by 1). For example, row n = 5 counts the following subsets:
{5} {1,5} {1,3,5}
{4,5} {2,5}
{3,4,5} {3,5}
{2,3,4,5} {1,2,5}
{1,2,3,4,5} {1,4,5}
{2,3,5}
{2,4,5}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
For anti-runs instead of runs we have A053538.
Without requiring n see A210039, A202023, reverse A098158, A109446.
(End)

Examples

			Triangle begins :
1
2, 0
3, 1, 0
4, 4, 0, 0
5, 10, 1, 0, 0
6, 20, 6, 0, 0, 0
7, 35, 21, 1, 0, 0, 0
8, 56, 56, 8, 0, 0, 0, 0
		

Crossrefs

Cf. A007318, A005314 (antidiagonal sums), A119900, A084938, A130595, A203322.
Column k = 1 is A000027.
Row sums are A000079.
Column k = 2 is A000292.
Without zeros we have A034867.
Last nonzero term in each row appears to be A124625.
A034839 counts subsets by number of maximal runs, for anti-runs A384893.
A116674 counts strict partitions by number of maximal runs, for anti-runs A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Length[Split[#,#2==#1+1&]]==k&]],{n,12},{k,n}] (* Gus Wiseman, Jul 07 2025 *)

Formula

G.f.: 1/((1-x)^2-y*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000027(n+1), A000079(n), A000129(n+1), A002605(n+1), A015518(n+1), A063727(n), A002532(n+1), A083099(n+1), A015519(n+1), A003683(n+1), A002534(n+1), A083102(n), A015520(n+1), A091914(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 11, 12, 13 respectively.
T(n,k) = binomial(n+1,2k+1).
T(n,k) = 2*T(n-1,k) + T(n-2,k-1) - T(n-2,k), T(0,0) = 1, T(1,0) = 2, T(1,1) = 0 and T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Mar 15 2012
Showing 1-10 of 24 results. Next