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.

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

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 0, 1, 3, 4, 3, 0, 0, 1, 1, 4, 8, 1, 0, 0, 1, 3, 6, 10, 2, 0, 0, 0, 1, 2, 8, 13, 6, 0, 0, 0, 0, 1, 3, 11, 20, 7, 0, 0, 0, 0, 0, 1, 1, 11, 29, 14, 0, 0, 0, 0, 0, 0, 1, 5, 19, 31, 20, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

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
  1  1  1
  1  2  1  1
  1  1  2  3  0
  1  3  4  3  0  0
  1  1  4  8  1  0  0
  1  3  6 10  2  0  0  0
  1  2  8 13  6  0  0  0  0
  1  3 11 20  7  0  0  0  0  0
  1  1 11 29 14  0  0  0  0  0  0
  1  5 19 31 20  1  0  0  0  0  0  0
  1  1 17 50 30  2  0  0  0  0  0  0  0
  1  3 25 64 37  5  0  0  0  0  0  0  0  0
  1  3 29 74 62  7  0  0  0  0  0  0  0  0  0
Row n = 8 counts the following partitions:
  (8)  (44)        (53)    (332)      (4211)
       (2222)      (62)    (422)      (32111)
       (11111111)  (71)    (611)
                   (431)   (3221)
                   (521)   (5111)
                   (3311)  (22211)
                           (41111)
                           (221111)
                           (311111)
                           (2111111)
		

Crossrefs

Row sums are A000041.
Column k = 1 is A032741.
Column k = 2 is A329745.
A similar invariant is frequency depth; see A323014, A325280.
The version for compositions is A329744.
The version for binary words is A329767.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[Length[Select[IntegerPartitions[n],runsres[#]==k&]],{n,10},{k,0,n-1}]
  • PARI
    \\ rr(p) gives runs resistance of partition.
    rr(p)={my(r=0); while(#p > 1, my(L=List(), k=0); for(i=1, #p, if(i==#p||p[i]<>p[i+1], listput(L, i-k); k=i)); p=Vec(L); r++); r}
    row(n)={my(v=vector(n)); forpart(p=n, v[1+rr(Vec(p))]++); v}
    { for(n=1, 10, print(row(n))) } \\ Andrew Howroyd, Jan 19 2023