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.

A350824 Triangle read by rows: T(n,k) is the number of patterns of length n with all distinct run lengths and maximum value k, n >= 0, k = 0..floor(sqrt(8*n+1)-1/2).

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 4, 0, 1, 4, 0, 1, 8, 0, 1, 20, 36, 0, 1, 24, 36, 0, 1, 36, 72, 0, 1, 52, 108, 0, 1, 112, 576, 576, 0, 1, 128, 612, 576, 0, 1, 200, 1116, 1152, 0, 1, 264, 1584, 1728, 0, 1, 384, 2520, 2880, 0, 1, 700, 8064, 20736, 14400, 0, 1, 868, 9432, 22464, 14400
Offset: 0

Views

Author

Andrew Howroyd, Feb 12 2022

Keywords

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1;
  0, 1,   4;
  0, 1,   4;
  0, 1,   8;
  0, 1,  20,   36;
  0, 1,  24,   36;
  0, 1,  36,   72;
  0, 1,  52,  108;
  0, 1, 112,  576,  576;
  0, 1, 128,  612,  576;
  0, 1, 200, 1116, 1152;
  ...
The T(5,1) = 1 pattern is 11111.
The T(5,2) = 8 patterns are 12222, 11222, 11122, 11112, 21111, 22111, 22211, 22221.
		

Crossrefs

Programs

  • PARI
    P(n) = {Vec(-1 + prod(k=1, n, 1 + y*x^k + O(x*x^n)))}
    R(u, k) = {k*[subst(serlaplace(p)/y, y, k-1) | p<-u]}
    T(n)={my(u=P(n), v=concat([1], sum(k=1, n, R(u, k)*sum(r=k, n, y^r*binomial(r, k)*(-1)^(r-k)) ))); [Vecrev(p) | p<-v]}
    { my(A=T(16)); for(n=1, #A, print(A[n])) }

Formula

T(n,k) = Sum_{j=1..k} R(n,j)*binomial(k, j)*(-1)^(k-j) for n > 0, where R(n,k) = Sum_{j=1..A003056(n)} k*(k-1)^(j-1) * j! * A008289(n,j).
T(n,k) = k! * A351637(n,k).
T(A000217(n),n) = A001044(n). - Alois P. Heinz, Feb 15 2022