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.

A381899 Irregular triangular array read by rows. T(n,k) is the number of length n words x on {0,1} such that I(x) + W(x)*(n-W(x)) = k, where I(x) is the number of inversions in x and W(x) is the number of 1's in x, n >= 0, 0 <= k <= floor(n^2/2).

Original entry on oeis.org

1, 2, 2, 1, 1, 2, 0, 2, 2, 2, 2, 0, 0, 2, 3, 3, 4, 1, 1, 2, 0, 0, 0, 2, 2, 4, 4, 6, 4, 4, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 4, 5, 7, 6, 9, 7, 7, 5, 4, 1, 1, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 8, 6, 10, 12, 14, 12, 14, 10, 10, 6, 4, 2, 2
Offset: 0

Views

Author

Geoffrey Critzer, Mar 09 2025

Keywords

Comments

Sum_{k>=0} T(n,k)*2^k = A132186(n).
Sum_{k>=0} T(n,k)*3^k = A053846(n).
Sum_{k>=0} T(n,k)*q^k = the number of idempotent n X n matrices over GF(q).
It appears that if n is even the n-th row converges to 2,0,0,...,21,13,9,5,4,1,1 which is A226622 reversed, and if n is odd the sequence is twice A226635.
From Alois P. Heinz, Mar 09 2025: (Start)
Sum_{k>=0} k * T(n,k) = 3*A001788(n-1) for n>=1.
Sum_{k>=0} (-1)^k * T(n,k) = A060546(n). (End)

Examples

			Triangle T(n,k) begins:
  1;
  2;
  2, 1, 1;
  2, 0, 2, 2, 2;
  2, 0, 0, 2, 3, 3, 4, 1, 1;
  2, 0, 0, 0, 2, 2, 4, 4, 6, 4, 4, 2, 2;
  ...
T(4,5) = 3 because we have: {0, 1, 0, 0}, {0, 1, 0, 1}, {1, 1, 0, 1}.
		

Crossrefs

Programs

  • Maple
    b:= proc(i, j) option remember; expand(`if`(i+j=0, 1,
         `if`(i=0, 0, b(i-1, j))+`if`(j=0, 0, b(i, j-1)*z^i)))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(
             expand(add(b(n-j, j)*z^(j*(n-j)), j=0..n))):
    seq(T(n), n=0..10);  # Alois P. Heinz, Mar 09 2025
  • Mathematica
    nn = 7; B[n_] := FunctionExpand[QFactorial[n, q]]*q^Binomial[n, 2];e[z_] := Sum[z^n/B[n], {n, 0, nn}]; Map[CoefficientList[#, q] &, Table[B[n], {n, 0, nn}] CoefficientList[Series[e[z]^2, {z, 0, nn}],z]]

Formula

Sum_{n>=0} Sum_{k>=0} T(n,k)*q^k*x^n/(n_q!*q^binomial(n,2)) = e(x)^2 where e(x) = Sum_{n>=0} x^n/(n_q!*q^binomial(n,2)) where n_q! = Product{i=1..n} (q^n-1)/(q-1).