login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A083906
Table read by rows: T(n, k) is the number of length n binary words with exactly k inversions.
12
1, 2, 3, 1, 4, 2, 2, 5, 3, 4, 3, 1, 6, 4, 6, 6, 6, 2, 2, 7, 5, 8, 9, 11, 9, 7, 4, 3, 1, 8, 6, 10, 12, 16, 16, 18, 12, 12, 8, 6, 2, 2, 9, 7, 12, 15, 21, 23, 29, 27, 26, 23, 21, 15, 13, 7, 4, 3, 1, 10, 8, 14, 18, 26, 30, 40, 42, 48, 44, 46, 40, 40, 30, 26, 18, 14, 8, 6, 2, 2
OFFSET
0,2
COMMENTS
There are A033638(n) values in the n-th row, compliant with the order of the polynomial.
In the example for n=6 detailed below, the orders of [6, k]_q are 1, 6, 9, 10, 9, 6, 1 for k = 0..6,
the maximum order 10 defining the row length.
Note that 1 6 9 10 9 6 1 and related distributions are antidiagonals of A077028.
A083480 is a variation illustrating a relationship with numeric partitions, A000041.
The rows are formed by the nonzero entries of the columns of A049597.
The coefficient of q^j in the Gaussian polynomial [n, m]_q is the number of binary words on alphabet {0,1} of length n having m 1's and j inversions. Hence T(n, k) is the number of length n binary words with exactly k inversions. - Geoffrey Critzer, May 14 2017
If n is even the n-th row converges to n+1, n-1, n-4, ..., 19, 13, 7, 4, 3, 1 which is A029552 reversed, and if n is odd the sequence is twice A098613. - Michael Somos, Jun 25 2017
REFERENCES
George E. Andrews, 'Theory of Partitions', 1976, page 242.
LINKS
Seiichi Manyama, Rows n = 0..48, flattened
Geoffrey Critzer, Combinatorics of Vector Spaces over Finite Fields, Master's thesis, Emporia State University, 2018.
Alexander Gruber, "The Egg:" Bizarre behavior of the roots of a family of polynomials Mathematics StackExchange Oct 04 2012
Eric Weisstein, q-Binomial Coefficient, Mathworld.
Wikipedia, q-binomial
FORMULA
T(n, k) is the coefficient [q^k] of the Sum_{m=0..n} [n, m]_q over q-Binomial coefficients.
Row sums: Sum_{k=0..floor(n^2/4)} T(n,k) = 2^n.
For n >= k, T(n+1,k) = T(n, k) + A000041(k). - Geoffrey Critzer, Feb 12 2021
Sum_{k=0..floor(n^2/4)} (-1)^k*T(n, k) = A060546(n). - G. C. Greubel, Feb 13 2024
From Mikhail Kurkov, Feb 14 2024: (Start)
T(n, k) = 2*T(n-1, k) - T(n-2, k) + T(n-2, k - n + 1) for n >= 2 and 0 <= k <= floor(n^2/4).
Sum_{i=0..n} T(n-i, i) = A000041(n+1). Note that upper limit of the summation can be reduced to A083479(n) = (n + 2) - ceiling(sqrt(4*n))).
Both results were proved (see MathOverflow link for details). (End)
From G. C. Greubel, Feb 17 2024: (Start)
T(n, floor(n^2/4)) = A000034(n).
Sum_{k=0..floor(n^2/4}} (-1)^k*T(n, k) = A016116(n+1).
Sum_{k=0..(n + 2) - ceiling(sqrt(4*n))} (-1)^k*T(n - k, k) = (-1)^n*A000025(n+1) = -A260460(n+1). (End)
EXAMPLE
When viewed as an array with A033638(r) entries per row, the table begins:
. 1 ............... : 1
. 2 ............... : 2
. 3 1 ............. : 3 + q = (1) + (1+q) + (1)
. 4 2 2 ........... : 4 + 2q + 2q^2 = 1 + (1+q+q^2) + (1+q+q^2) + 1
. 5 3 4 3 1 ....... : 5 + 3q + 4q^2 + 3q^3 + q^4
. 6 4 6 6 6 2 2
. 7 5 8 9 11 9 7 4 3 1
. 8 6 10 12 16 16 18 12 12 8 6 2 2
. 9 7 12 15 21 23 29 27 26 23 21 15 13 7 4 3 1
...
The second but last row is from the sum over 7 q-polynomials coefficients:
. 1 ....... : 1 = [6,0]_q
. 1 1 1 1 1 1 ....... : 1+q+q^2+q^3+q^4+q^5 = [6,1]_q
. 1 1 2 2 3 2 2 1 1 ....... : 1+q+2q^2+2q^3+3q^4+2q^5+2q^6+q^7+q^8 = [6,2]_q
. 1 1 2 3 3 3 3 2 1 1 ....... : 1+q+2q^2+3q^3+3q^4+3q^5+3q^6+2q^7+q^8+q^9 = [6,3]_q
. 1 1 2 2 3 2 2 1 1 ....... : 1+q+2q^2+2q^3+3q^4+2q^5+2q^6+q^7+q^8 = [6,4]_q
. 1 1 1 1 1 1 ....... : 1+q+q^2+q^3+q^4+q^5 = [6,5]_q
. 1 ....... : 1 = [6,6]_q
MAPLE
QBinomial := proc(n, m, q) local i ; factor( mul((1-q^(n-i))/(1-q^(i+1)), i=0..m-1) ) ; expand(%) ; end:
A083906 := proc(n, k) add( QBinomial(n, m, q), m=0..n ) ; coeftayl(%, q=0, k) ; end:
for n from 0 to 10 do for k from 0 to A033638(n)-1 do printf("%d, ", A083906(n, k)) ; od: od: # R. J. Mathar, May 28 2009
T := proc(n, k) if n < 0 or k < 0 or k > floor(n^2/4) then return 0 fi;
if n < 2 then return n + 1 fi; 2*T(n-1, k) - T(n-2, k) + T(n-2, k - n + 1) end:
seq(print(seq(T(n, k), k = 0..floor((n/2)^2))), n = 0..8); # Peter Luschny, Feb 16 2024
MATHEMATICA
Table[CoefficientList[Total[Table[FunctionExpand[QBinomial[n, k, q]], {k, 0, n}]], q], {n, 0, 10}] // Grid (* Geoffrey Critzer, May 14 2017 *)
PROG
(PARI) {T(n, k) = polcoeff(sum(m=0, n, prod(k=0, m-1, (x^n - x^k) / (x^m - x^k))), k)}; /* Michael Somos, Jun 25 2017 */
(Magma)
R<x>:=PowerSeriesRing(Rationals(), 100);
qBinom:= func< n, k, x | n eq 0 or k eq 0 select 1 else (&*[(1-x^(n-j))/(1-x^(j+1)): j in [0..k-1]]) >;
A083906:= func< n, k | Coefficient(R!((&+[qBinom(n, k, x): k in [0..n]]) ), k) >;
[A083906(n, k): k in [0..Floor(n^2/4)], n in [0..12]]; // G. C. Greubel, Feb 13 2024
(SageMath)
def T(n, k): # T = A083906
if k<0 or k> (n^2//4): return 0
elif n<2 : return n+1
else: return 2*T(n-1, k) - T(n-2, k) + T(n-2, k-n+1)
flatten([[T(n, k) for k in range(int(n^2//4)+1)] for n in range(13)]) # G. C. Greubel, Feb 13 2024
KEYWORD
nonn,tabf
AUTHOR
Alford Arnold, Jun 19 2003
EXTENSIONS
Edited by R. J. Mathar, May 28 2009
New name using a comment from Geoffrey Critzer by Peter Luschny, Feb 17 2024
STATUS
approved