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

A091602 Triangle: T(n,k) is the number of partitions of n such that some part is repeated k times and no part is repeated more than k times.

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 2, 2, 0, 1, 3, 2, 1, 0, 1, 4, 3, 2, 1, 0, 1, 5, 4, 3, 1, 1, 0, 1, 6, 7, 3, 3, 1, 1, 0, 1, 8, 8, 6, 3, 2, 1, 1, 0, 1, 10, 12, 7, 5, 3, 2, 1, 1, 0, 1, 12, 15, 11, 6, 5, 2, 2, 1, 1, 0, 1, 15, 21, 14, 10, 5, 5, 2, 2, 1, 1, 0, 1, 18, 26, 20, 12, 9, 5, 4, 2, 2, 1, 1, 0, 1, 22, 35, 25, 18, 11, 8, 5, 4, 2, 2, 1, 1, 0, 1
Offset: 1

Views

Author

Christian G. Bower, Jan 23 2004

Keywords

Comments

From Gary W. Adamson, Mar 13 2010: (Start)
The triangle by rows = finite differences starting from the top, of an array in which row 1 = p(x)/p(x^2), row 2 = p(x)/p(x^3), ... row k = p(x)/p(x^k); such that p(x) = polcoeff A000041: (1 + x + 2x^2 + 3x^3 + 5x^4 + 7x^5 + ...)
Note that p(x)/p(x^2) = polcoeff A000009: (1 + x + x^2 + 2x^3 + 2x^4 + ...).
Refer to the example. (End)

Examples

			Triangle starts:
   1:  1;
   2:  1,  1;
   3:  2,  0,  1;
   4:  2,  2,  0,  1;
   5:  3,  2,  1,  0,  1;
   6:  4,  3,  2,  1,  0,  1;
   7:  5,  4,  3,  1,  1,  0,  1;
   8:  6,  7,  3,  3,  1,  1,  0,  1;
   9:  8,  8,  6,  3,  2,  1,  1,  0,  1;
  10: 10, 12,  7,  5,  3,  2,  1,  1,  0,  1;
  11: 12, 15, 11,  6,  5,  2,  2,  1,  1,  0,  1;
  12: 15, 21, 14, 10,  5,  5,  2,  2,  1,  1,  0,  1;
  13: 18, 26, 20, 12,  9,  5,  4,  2,  2,  1,  1,  0,  1;
  14: 22, 35, 25, 18, 11,  8,  5,  4,  2,  2,  1,  1,  0,  1;
  ...
In the partition 5+2+2+2+1+1, 2 is repeated 3 times, no part is repeated more than 3 times.
From _Gary W. Adamson_, Mar 13 2010: (Start)
First few rows of the array =
  ...
  1, 1, 1, 2, 2, 3,  4,  5,  6,  8, 10, ... = p(x)/p(x^2) = A000009
  1, 1, 2, 2, 4, 5,  7,  9, 13, 16, 22, ... = p(x)/p(x^3)
  1, 1, 2, 3, 4, 6,  9, 12, 16, 22, 29, ... = p(x)/p(x^4)
  1, 1, 2, 3, 5, 6, 10, 13, 19, 25, 34, ... = p(x)/p(x^5)
  1, 1, 2, 3, 5, 7, 10, 14, 20, 27, 37, ... = p(x)/p(x^6)
  ...
Finally, taking finite differences from the top and deleting the first "1", we obtain triangle A091602 with row sums = A000041 starting with offset 1:
  1;
  1, 1;
  2, 0, 1;
  2, 2, 0, 1;
  3, 2, 1, 0, 1;
  4, 3, 2, 1, 0, 1;
  ...
(End)
		

Crossrefs

Row sums: A000041. Inverse: A091603. Square: A091604.
Columns 1-6: A000009, A091605-A091609. Convergent of columns: A002865.
Cf. A000009. - Gary W. Adamson, Mar 13 2010
T(2n,n) gives: A232697.

Programs

  • Maple
    g:=sum(t^k*(product((1-x^((k+1)*j))/(1-x^j),j=1..50)-product((1-x^(k*j))/(1-x^j),j=1..50)),k=1..50): gser:=simplify(series(g,x=0,20)): for n from 1 to 13 do P[n]:=coeff(gser,x^n) od: for n from 1 to 13 do seq(coeff(P[n],t^j),j=1..n) od;
    # yields sequence in triangular form - Emeric Deutsch, Mar 30 2006
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i>n, 0, add(b(n-i*j, i+1, min(k,
           iquo(n-i*j, i+1))), j=0..min(n/i, k))))
        end:
    T:= (n, k)-> b(n, 1, k) -`if`(k=0, 0, b(n, 1, k-1)):
    seq(seq(T(n, k), k=1..n), n=1..20);
    # Alois P. Heinz, Nov 27 2013
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i>n, 0, Sum[b[n-i*j, i+1, Min[k, Quotient[n-i*j, i+1]]], {j, 0, Min[n/i, k]}]]]; t[n_, k_] := b[n, 1, k] - If[k == 0, 0, b[n, 1, k-1]]; Table[t[n, k], {n, 1, 20}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 17 2014, after Alois P. Heinz's second Maple program *)

Formula

G.f.: G = G(t,x) = sum(k>=1, t^k*(prod(j>=1, (1-x^((k+1)*j))/(1-x^j) ) -prod(j>=1, (1-x^(k*j))/(1-x^j) ) ) ). - Emeric Deutsch, Mar 30 2006
Sum_{k=1..n} k * T(n,k) = A264397(n). - Alois P. Heinz, Nov 20 2015

A364808 a(n) = sum of minimal runlengths of all the partitions of n.

Original entry on oeis.org

1, 3, 5, 9, 11, 20, 22, 36, 44, 63, 74, 114, 128, 180, 224, 298, 355, 485, 573, 760, 922, 1174, 1419, 1836, 2189, 2756, 3341, 4160, 4988, 6217, 7412, 9131, 10941, 13326, 15916, 19379, 22988, 27770, 33017, 39662, 46919, 56223, 66308, 79047, 93187, 110512
Offset: 1

Views

Author

Clark Kimberling, Sep 10 2023

Keywords

Examples

			The partitions of 4 are [4], [3,1], [2,2], [2,1,1], [1,1,1,1], with runlengths {1}, {1,1}, {2}, {1,2}, {4} having minima 1, 1, 2, 1, 4, with sum 9, so that a(4) = 9.
		

Crossrefs

Cf. A000041, A264397 (sum of maximal runlengths).

Programs

  • Maple
    b:= proc(n, i, m) option remember; `if`(n=0, m, `if`(i=1, min(m, n),
          add(b(n-i*j, i-1, `if`(j=0, m, min(m, j))), j=0..n/i)))
        end:
    a:= n-> b(n$3):
    seq(a(n), n=1..50);  # Alois P. Heinz, Sep 17 2023
  • Mathematica
    m[n_] := m[n] = Map[Split, IntegerPartitions[n]]
    t[n_] := t[n] = Table[Map[Length, m[n][[k]]], {k, 1, PartitionsP[n]}]
    Table[Total[Map[Min, t[n]]], {n, 1, 47}]
  • Python
    from sympy.utilities.iterables import partitions
    def A364808(n): return sum(min(p.values()) for p in partitions(n)) # Chai Wah Wu, Sep 17 2023
Showing 1-2 of 2 results.