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

A351637 Triangle read by rows: T(n,k) is the number of length n word structures with all distinct run-lengths using exactly k different symbols, n >= 0, k = 0..floor(sqrt(8*n+1)-1/2).

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 4, 0, 1, 10, 6, 0, 1, 12, 6, 0, 1, 18, 12, 0, 1, 26, 18, 0, 1, 56, 96, 24, 0, 1, 64, 102, 24, 0, 1, 100, 186, 48, 0, 1, 132, 264, 72, 0, 1, 192, 420, 120, 0, 1, 350, 1344, 864, 120, 0, 1, 434, 1572, 936, 120
Offset: 0

Views

Author

Andrew Howroyd, Feb 15 2022

Keywords

Comments

Permuting the symbols will not change the structure.
Equivalently, T(n,k) is the number of restricted growth strings [s(0), s(1), ..., s(n-1)] where s(0)=0 and s(i) <= 1 + max(prefix) for i >= 1, the maximum value is k and every run has a different length.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1;
  0, 1,   2;
  0, 1,   2;
  0, 1,   4;
  0, 1,  10,   6;
  0, 1,  12,   6;
  0, 1,  18,  12;
  0, 1,  26,  18;
  0, 1,  56,  96, 24;
  0, 1,  64, 102, 24;
  0, 1, 100, 186, 48;
  0, 1, 132, 264, 72;
  ...
The T(6,1) = 1 word is 111111.
The T(6,2) = 10 words are 111112, 111122, 111211, 111221, 112111, 112221, 112222, 122111, 122211, 122222.
The T(6,3) = 6 words are 111223, 111233, 112333, 112223, 122333, 122233.
		

Crossrefs

Row sums are A351638.
Partial row sums include A000007, A000012, A032020, A351639.
Column k=2 is A216695.

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)/r!) ))); [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)/k! for n > 0, where R(n,k) = Sum_{j=1..A003056(n)} k*(k-1)^(j-1) * j! * A008289(n,j).
T(n,k) = A350824(n,k)/k!.
T(A000217(n),n) = A000142(n). - Alois P. Heinz, Feb 15 2022

A351640 Triangle read by rows: T(n,k) is the number of patterns of length n with all distinct runs and maximum value k.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 4, 6, 0, 1, 10, 18, 24, 0, 1, 16, 72, 96, 120, 0, 1, 34, 168, 528, 600, 720, 0, 1, 52, 486, 1632, 4200, 4320, 5040, 0, 1, 90, 1062, 6024, 16200, 36720, 35280, 40320, 0, 1, 152, 2460, 16896, 73200, 169920, 352800, 322560, 362880
Offset: 0

Views

Author

Andrew Howroyd, Feb 15 2022

Keywords

Comments

A pattern is a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670.

Examples

			Triangle begins:
  1,
  0, 1;
  0, 1,  2;
  0, 1,  4,   6;
  0, 1, 10,  18,  24;
  0, 1, 16,  72,  96, 120;
  0, 1, 34, 168, 528, 600, 720;
  ...
The T(3,1) = 1 pattern is 111.
The T(3,2) = 4 patterns are 112, 122, 211, 221.
The T(3,3) = 6 patterns are 123, 132, 213, 231, 312, 321.
		

Crossrefs

Row sums are A351200.
Main diagonal is A000142.

Programs

  • PARI
    \\ here LahI is A111596 as row polynomials.
    LahI(n, y)={sum(k=1, n, y^k*(-1)^(n-k)*(n!/k!)*binomial(n-1, k-1))}
    S(n)={my(p=prod(k=1, n, 1 + y*x^k + O(x*x^n))); 1 + sum(i=1, (sqrtint(8*n+1)-1)\2, polcoef(p, i, y)*LahI(i, y))}
    R(q)={[subst(serlaplace(p), y, 1) | p<-Vec(q)]}
    T(n)={my(q=S(n), v=concat([1], sum(k=1, n, R(q^k-1)*sum(r=k, n, y^r*binomial(r, k)*(-1)^(r-k)) ))); [Vecrev(p) | p<-v]}
    { my(A=T(10)); for(n=1, #A, print(A[n])) }

Formula

T(n,k) = k! * A351641(n,k).

A351642 Number of length n word structures with all distinct runs using an infinite alphabet.

Original entry on oeis.org

1, 1, 2, 4, 10, 26, 74, 218, 668, 2116, 6928, 23254, 79998, 281694, 1011956, 3704900, 13815692, 52386978, 201787950, 789178950, 3130824160, 12589367840, 51287685476, 211557376938, 883067740514, 3728494418330, 15916998678040, 68672820917088, 299331260431104
Offset: 0

Views

Author

Andrew Howroyd, Feb 15 2022

Keywords

Comments

Permuting the symbols will not change the structure.
Equivalently, a(n) is the number of restricted growth strings [s(0), s(1), ..., s(n-1)] where s(0)=0 and s(i) <= 1 + max(prefix) for i >= 1 and all runs are distinct.

Examples

			The a(4) = 10 words are 1111, 1112, 1121, 1122, 1211, 1222, 1123, 1223, 1233, 1234.
		

Crossrefs

Row sums of A351641.
The initial terms are similar to A206464.

Programs

  • PARI
    \\ See A351641 for R, S.
    seq(n)={my(q=S(n)); concat([1], sum(k=1, n, R(q^k-1)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)/r!) )); }

A351643 Number of length n word structures with all distinct runs using exactly 3 symbols.

Original entry on oeis.org

0, 0, 1, 3, 12, 28, 81, 177, 410, 906, 1869, 4001, 8094, 16032, 32355, 62499, 120078, 227880, 436743, 805797, 1487920, 2751618, 5017143, 9063625, 16153560, 29066676, 51334289, 90784671, 157941132, 275244344, 478874505, 823848357, 1412686722, 2400778830, 4091929101
Offset: 1

Views

Author

Andrew Howroyd, Feb 16 2022

Keywords

Comments

Permuting the symbols will not change the structure.

Examples

			The a(3) = 1 word is 123.
The a(4) = 3 words are 1123, 1223, 1233.
The a(5) = 12 words are 11123, 11213, 11223, 11231, 11233, 12113, 12223, 12232, 12233, 12311, 12322, 12333.
		

Crossrefs

Column k=3 of A351641.
Cf. A351644.

Programs

  • PARI
    \\ See A351641 for R, S.
    seq(n)={my(q=S(n), c=3); sum(k=1, c, R(q^k-1)*binomial(c, k)*(-1)^(3-k))/c!}

A351644 Number of length n word structures with all distinct runs using at most 3 symbols.

Original entry on oeis.org

1, 1, 2, 4, 9, 21, 46, 108, 223, 487, 1028, 2060, 4327, 8591, 16818, 33562, 64441, 122983, 232378, 443446, 816371, 1503517, 2775372, 5052186, 9116047, 16231929, 29182198, 51503788, 91032821, 158301653, 275776810, 479642780, 824964483, 1414293391, 2403093256, 4095230980
Offset: 0

Views

Author

Andrew Howroyd, Feb 16 2022

Keywords

Comments

Permuting the symbols will not change the structure.

Examples

			The a(1) = 1 word is 1.
The a(2) = 2 words are 11, 12.
The a(3) = 4 words are 111, 112, 122, 123.
The a(4) = 9 words are 1111, 1112, 1121, 1122, 1211, 1222, 1123, 1223, 1233.
		

Crossrefs

Programs

  • PARI
    \\ See A351641 for R, S.
    seq(n)={my(q=S(n), c=3); concat([1], sum(k=1, c, R(q^k-1)*sum(r=k, c, binomial(r, k)*(-1)^(r-k)/r!) )); }

Formula

a(n) = A351018(n) + A351643(n).
a(n) = Sum_{k=0..3} A351641(n,k).
Showing 1-5 of 5 results.