%I #67 Apr 26 2024 05:17:27
%S 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,
%T 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,
%U 10,8,14,18,26,30,40,42,48,44,46,40,40,30,26,18,14,8,6,2,2
%N Table read by rows: T(n, k) is the number of length n binary words with exactly k inversions.
%C There are A033638(n) values in the n-th row, compliant with the order of the polynomial.
%C 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,
%C the maximum order 10 defining the row length.
%C Note that 1 6 9 10 9 6 1 and related distributions are antidiagonals of A077028.
%C A083480 is a variation illustrating a relationship with numeric partitions, A000041.
%C The rows are formed by the nonzero entries of the columns of A049597.
%C 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
%C 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
%D George E. Andrews, 'Theory of Partitions', 1976, page 242.
%H Seiichi Manyama, <a href="/A083906/b083906.txt">Rows n = 0..48, flattened</a>
%H Geoffrey Critzer, <a href="https://esirc.emporia.edu/handle/123456789/3595">Combinatorics of Vector Spaces over Finite Fields</a>, Master's thesis, Emporia State University, 2018.
%H Alexander Gruber, <a href="http://math.stackexchange.com/q/206890/">"The Egg:" Bizarre behavior of the roots of a family of polynomials</a> Mathematics StackExchange Oct 04 2012
%H MathOverflow, <a href="https://mathoverflow.net/a/463975">Partition numbers and Gaussian binomial coefficient</a>
%H Eric Weisstein, <a href="http://mathworld.wolfram.com/q-BinomialCoefficient.html">q-Binomial Coefficient</a>, Mathworld.
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Q-binomial">q-binomial</a>
%H <a href="/index/Coa#codes_binary_linear">Index entries for sequences related to binary linear codes</a>
%F T(n, k) is the coefficient [q^k] of the Sum_{m=0..n} [n, m]_q over q-Binomial coefficients.
%F Row sums: Sum_{k=0..floor(n^2/4)} T(n,k) = 2^n.
%F For n >= k, T(n+1,k) = T(n, k) + A000041(k). - _Geoffrey Critzer_, Feb 12 2021
%F Sum_{k=0..floor(n^2/4)} (-1)^k*T(n, k) = A060546(n). - _G. C. Greubel_, Feb 13 2024
%F From _Mikhail Kurkov_, Feb 14 2024: (Start)
%F 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).
%F 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))).
%F Both results were proved (see MathOverflow link for details). (End)
%F From _G. C. Greubel_, Feb 17 2024: (Start)
%F T(n, floor(n^2/4)) = A000034(n).
%F Sum_{k=0..floor(n^2/4}} (-1)^k*T(n, k) = A016116(n+1).
%F Sum_{k=0..(n + 2) - ceiling(sqrt(4*n))} (-1)^k*T(n - k, k) = (-1)^n*A000025(n+1) = -A260460(n+1). (End)
%e When viewed as an array with A033638(r) entries per row, the table begins:
%e . 1 ............... : 1
%e . 2 ............... : 2
%e . 3 1 ............. : 3 + q = (1) + (1+q) + (1)
%e . 4 2 2 ........... : 4 + 2q + 2q^2 = 1 + (1+q+q^2) + (1+q+q^2) + 1
%e . 5 3 4 3 1 ....... : 5 + 3q + 4q^2 + 3q^3 + q^4
%e . 6 4 6 6 6 2 2
%e . 7 5 8 9 11 9 7 4 3 1
%e . 8 6 10 12 16 16 18 12 12 8 6 2 2
%e . 9 7 12 15 21 23 29 27 26 23 21 15 13 7 4 3 1
%e ...
%e The second but last row is from the sum over 7 q-polynomials coefficients:
%e . 1 ....... : 1 = [6,0]_q
%e . 1 1 1 1 1 1 ....... : 1+q+q^2+q^3+q^4+q^5 = [6,1]_q
%e . 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
%e . 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
%e . 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
%e . 1 1 1 1 1 1 ....... : 1+q+q^2+q^3+q^4+q^5 = [6,5]_q
%e . 1 ....... : 1 = [6,6]_q
%p QBinomial := proc(n,m,q) local i ; factor( mul((1-q^(n-i))/(1-q^(i+1)),i=0..m-1) ) ; expand(%) ; end:
%p A083906 := proc(n,k) add( QBinomial(n,m,q),m=0..n ) ; coeftayl(%,q=0,k) ; end:
%p 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
%p T := proc(n, k) if n < 0 or k < 0 or k > floor(n^2/4) then return 0 fi;
%p if n < 2 then return n + 1 fi; 2*T(n-1, k) - T(n-2, k) + T(n-2, k - n + 1) end:
%p seq(print(seq(T(n, k), k = 0..floor((n/2)^2))), n = 0..8); # _Peter Luschny_, Feb 16 2024
%t Table[CoefficientList[Total[Table[FunctionExpand[QBinomial[n, k, q]], {k, 0, n}]],q], {n, 0, 10}] // Grid (* _Geoffrey Critzer_, May 14 2017 *)
%o (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 */
%o (Magma)
%o R<x>:=PowerSeriesRing(Rationals(), 100);
%o 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]]) >;
%o A083906:= func< n,k | Coefficient(R!((&+[qBinom(n,k,x): k in [0..n]]) ), k) >;
%o [A083906(n,k): k in [0..Floor(n^2/4)], n in [0..12]]; // _G. C. Greubel_, Feb 13 2024
%o (SageMath)
%o def T(n,k): # T = A083906
%o if k<0 or k> (n^2//4): return 0
%o elif n<2 : return n+1
%o else: return 2*T(n-1, k) - T(n-2, k) + T(n-2, k-n+1)
%o flatten([[T(n,k) for k in range(int(n^2//4)+1)] for n in range(13)]) # _G. C. Greubel_, Feb 13 2024
%Y Cf. A000025, A000034, A000041, A016116, A029552, A033638, A060546, A063746, A077028, A083479, A083480, A098613, A260460.
%K nonn,tabf
%O 0,2
%A _Alford Arnold_, Jun 19 2003
%E Edited by _R. J. Mathar_, May 28 2009
%E New name using a comment from _Geoffrey Critzer_ by _Peter Luschny_, Feb 17 2024