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.

A093190 Array t read by antidiagonals: number of {112,212}-avoiding words.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 1, 6, 9, 4, 1, 8, 21, 16, 5, 1, 10, 39, 52, 25, 6, 1, 12, 63, 136, 105, 36, 7, 1, 14, 93, 292, 365, 186, 49, 8, 1, 16, 129, 544, 1045, 816, 301, 64, 9, 1, 18, 171, 916, 2505, 3006, 1603, 456, 81, 10, 1, 20, 219, 1432, 5225, 9276, 7315, 2864, 657, 100, 11
Offset: 1

Views

Author

Ralf Stephan, Apr 20 2004

Keywords

Comments

t(k,n) = number of n-long k-ary words that simultaneously avoid the patterns 112 and 212.

Examples

			Square array begins as:
  1  1   1   1    1    1 ... 1*A000012;
  2  4   6   8   10   12 ... 2*A000027;
  3  9  21  39   63   93 ... 3*A002061;
  4 16  52 136  292  544 ... 4*A135859;
  5 25 105 365 1045 2505 ... ;
Antidiagonal rows begins as:
  1;
  1,  2;
  1,  4,  3;
  1,  6,  9,   4;
  1,  8, 21,  16,   5;
  1, 10, 39,  52,  25,  6;
  1, 12, 63, 136, 105, 36, 7;
		

Crossrefs

Main diagonal is A052852.
Antidiagonal sums are in A084261 - 1.

Programs

  • Magma
    [(&+[Factorial(j)*Binomial(k,j)*Binomial(n-k,j-1): j in [0..n-k+1]]): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 09 2021
  • Mathematica
    T[n_, k_]:= Sum[j!*Binomial[k, j]*Binomial[n-k, j-1], {j,0,n-k+1}];
    Table[T[n, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Mar 09 2021 *)
  • PARI
    t(n,k)=sum(j=0,k,j!*binomial(k,j)*binomial(n-1,j-1))
    
  • Sage
    flatten([[ sum(factorial(j)*binomial(k,j)*binomial(n-k,j-1) for j in (0..n-k+1)) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Mar 09 2021
    

Formula

t(n, k) = Sum{j=0..n} j!*C(n, j)*C(k-1, j-1). (square array)
T(n, k) = Sum_{j=0..n-k+1} j!*binomial(k,j)*binomial(n-k,j-1). (number triangle) - G. C. Greubel, Mar 09 2021