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-4 of 4 results.

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

A384881 Triangle read by rows where T(n,k) is the number of integer partitions of n with k maximal runs of consecutive parts decreasing by 1.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 2, 2, 2, 0, 1, 0, 2, 3, 3, 2, 0, 1, 0, 2, 5, 3, 2, 2, 0, 1, 0, 1, 8, 4, 4, 2, 2, 0, 1, 0, 3, 5, 10, 4, 3, 2, 2, 0, 1, 0, 2, 9, 9, 9, 5, 3, 2, 2, 0, 1, 0, 2, 11, 13, 9, 9, 4, 3, 2, 2, 0, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 25 2025

Keywords

Examples

			The partition (5,4,2,1,1) has maximal runs ((5,4),(2,1),(1)) so is counted under T(13,3) = 23.
Row n = 9 counts the following partitions:
  9    63    333    6111    33111   411111   3111111   111111111
  54   72    441    22221   51111   2211111  21111111
  432  81    522    42111   222111
       621   531    321111
       3321  711
             3222
             4221
             4311
             5211
             32211
Triangle begins:
  1
  0  1
  0  1  1
  0  2  0  1
  0  1  3  0  1
  0  2  2  2  0  1
  0  2  3  3  2  0  1
  0  2  5  3  2  2  0  1
  0  1  8  4  4  2  2  0  1
  0  3  5 10  4  3  2  2  0  1
  0  2  9  9  9  5  3  2  2  0  1
  0  2 11 13  9  9  4  3  2  2  0  1
  0  2 13 15 17  8 10  4  3  2  2  0  1
  0  2 14 23 16 17  8  9  4  3  2  2  0  1
  0  2 16 26 26 19 16  9  9  4  3  2  2  0  1
  0  4 13 37 32 26 19 16  8  9  4  3  2  2  0  1
		

Crossrefs

Row sums are A000041.
Column k = 1 is A001227.
For distinct parts instead of maximal runs we have A116608.
The strict case appears to be A116674.
For anti-runs instead of runs we have A268193.
Partitions with distinct runs of this type are counted by A384882, gapless A384884.
For prime indices see A385213, A287170, A066205, A356229.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[Split[#,#1==#2+1&]]==k&]],{n,0,10},{k,0,n}]
  • PARI
    tri(n) = {(n*(n+1)/2)}
    B_list(N) = {my(v = vector(N, i, 0)); v[1] = q*t; for(m=2,N, v[m] = t * (q^tri(m) + sum(i=1,m-1, q^tri(i) * v[m-i] * (q^((m-i)*(i-1))/(1 - q^(m-i)) - q^((m-i)*i) + O('q^(N-tri(i)+1)))))); v}
    A_qt(max_row) = {my(N = max_row+1, B = B_list(N), g = 1 + sum(m=1,N, B[m]/(1 - q^m)) + O('q^(N+1))); vector(N, n, Vecrev(polcoeff(g, n-1)))} \\ John Tyler Rascoe, Aug 18 2025

Formula

G.f.: 1 + Sum_{m>0} B(m,q,t)/(1 - q^m) where B(m,q,t) = t * (q^tri(m) + Sum_{i=1..m-1} q^tri(i) * B(m-i,q,t) * ((q^((m-i)*(i-1))/(1 - q^(m-i))) - q^((m-i)*i))) and tri(n) = A000217(n). - John Tyler Rascoe, Aug 18 2025

A384904 Number of integer partitions of n with all equal lengths of maximal runs of consecutive parts decreasing by 1 but not by 0.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 9, 9, 14, 17, 23, 25, 40, 41, 59, 68, 92, 99, 140, 151, 204, 229, 296, 328, 433, 476, 606, 685, 858, 955, 1203, 1336, 1654, 1858, 2266, 2537, 3102, 3453, 4169, 4680, 5611, 6262, 7495, 8358, 9927, 11105, 13096, 14613, 17227, 19179, 22459
Offset: 0

Views

Author

Gus Wiseman, Jun 20 2025

Keywords

Examples

			The partition (6,5,5,4,2,1) has maximal runs ((6,5),(5,4),(2,1)), with lengths (2,2,2), so is counted under a(23).
The a(1) = 1 through a(8) = 14 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (311)    (51)      (61)       (62)
                            (11111)  (222)     (331)      (71)
                                     (321)     (511)      (422)
                                     (411)     (4111)     (611)
                                     (3111)    (31111)    (2222)
                                     (111111)  (1111111)  (3221)
                                                          (3311)
                                                          (5111)
                                                          (41111)
                                                          (311111)
                                                          (11111111)
		

Crossrefs

For subsets instead of strict partitions we have A243815, distinct lengths A384175.
For distinct instead of equal lengths we have A384882, counting gaps of 0 A384884.
The strict case is A384886.
Counting gaps of 0 gives A384887.
A000041 counts integer partitions, strict A000009.
A047993 counts partitions with max part = length (A106529).
A098859 counts Wilf partitions (complement A336866), compositions A242882.
A239455 counts Look-and-Say or section-sum partitions, ranks A351294 or A381432.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],SameQ@@Length/@Split[#,#2==#1-1&]&]],{n,0,30}]
  • PARI
    A_q(N) = {Vec(1+sum(k=1,floor(-1/2+sqrt(2+2*N)), sum(i=1,(N/(k*(k+1)/2))+1, q^((k*i*(2+i*(k-1)))/2)/(1-q^(k*i))*prod(j=1,i-1, 1 + q^(2*k*j)/(1 - q^(k*j))))) + O('q^(N+1)))} \\ John Tyler Rascoe, Aug 20 2025

Formula

G.f.: 1 + Sum_{i,k>0} q^((i*k*(2 + i*(k-1)))/2) * Product_{j=1..i-1} ( 1 + q^(2*k*j)/(1 - q^(k*j)) ) / (1 - q^(i*k)). - John Tyler Rascoe, Aug 20 2025

A385574 Number of integer partitions of n with the same number of adjacent equal parts as adjacent unequal parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 4, 5, 6, 10, 11, 13, 17, 20, 30, 36, 44, 55, 70, 86, 98, 128, 156, 190, 235, 288, 351, 409, 499, 603, 722, 863, 1025, 1227, 1461, 1757, 2061, 2444, 2892, 3406, 3996, 4708, 5497, 6430, 7595, 8835, 10294, 12027, 13971, 16252, 18887, 21878
Offset: 0

Views

Author

Gus Wiseman, Jul 04 2025

Keywords

Comments

These are also integer partitions of n with the same number of distinct parts as maximal anti-runs of parts.

Examples

			The partition (5,3,2,1,1,1,1) has 4 runs ((5),(3),(2),(1,1,1,1)) and 4 anti-runs ((5,3,2,1),(1),(1),(1)) so is counted under a(14).
The a(1) = 1 through a(10) = 10 reversed partitions (A = 10):
  (1)  (2)  (3)  (4)    (5)    (6)    (7)    (8)      (9)      (A)
                 (112)  (113)  (114)  (115)  (116)    (117)    (118)
                        (122)         (133)  (224)    (144)    (226)
                                      (223)  (233)    (225)    (244)
                                             (11123)  (11124)  (334)
                                                      (11223)  (11125)
                                                               (11134)
                                                               (11224)
                                                               (11233)
                                                               (12223)
		

Crossrefs

The RHS is counted by A116608, rank statistic A297155.
The LHS is counted by A133121, rank statistic A046660.
For related inequalities see A212165, A212168, A361204.
For subsets instead of partitions see A217615, A385572, A385575.
These partitions are ranked by A385576.
A000041 counts integer partitions, strict A000009.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A034839 counts subsets by number maximal runs, for partitions A384881, strict A116674.
A047993 counts partitions with max part = length (A106529).
A098859 counts Wilf partitions (complement A336866), compositions A242882.
A268193 counts partitions by maximal anti-runs, strict A384905, subsets A384893.
A355394 counts partitions with neighbors, complement A356236.

Programs

  • Mathematica
    Table[Length[Select[Reverse/@IntegerPartitions[n],Length[Union[#]]==Length[Split[#,#2!=#1&]]&]],{n,0,30}]
  • PARI
    lista(n)=Vec(polcoef((prod(i=1,n,1+x^i/(t*(1-t*x^i))+O(x*x^n))-1)*t+1,0,t)) \\ Christian Sievers, Jul 18 2025

Formula

For a partition p, let s(p) be its sum, e(p) the number of equal adjacent pairs, and d(p) the number of distinct adjacent pairs. Then Sum_{p partition} x^s(p) * t^(e(p)-d(p)) = (Product_{i>=1} (1 + x^i/(t*(1-t*x^i))) - 1) * t + 1, so a(n) is the coefficient of x^n*t^0 of this expression. - Christian Sievers, Jul 18 2025
Showing 1-4 of 4 results.