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.

A123221 Irregular triangle read by rows: the n-th row consists of the coefficients in the expansion of Sum_{j=0..n*(n+1)/2} A008302(n+1,j)*x^j*(1 - x)^(n - min(n, j)), where A008302 is the triangle of Mahonian numbers.

This page as a plain text file.
%I A123221 #15 Jul 16 2021 02:37:23
%S A123221 1,1,1,0,1,1,1,0,2,3,5,3,1,1,0,3,5,11,22,20,15,9,4,1,1,0,4,7,18,41,90,
%T A123221 101,101,90,71,49,29,14,5,1,1,0,5,9,26,64,154,359,455,531,573,573,531,
%U A123221 455,359,259,169,98,49,20,6,1,1,0,6,11,35,91,234,583
%N A123221 Irregular triangle read by rows: the n-th row consists of the coefficients in the expansion of Sum_{j=0..n*(n+1)/2} A008302(n+1,j)*x^j*(1 - x)^(n - min(n, j)), where A008302 is the triangle of Mahonian numbers.
%H A123221 G. C. Greubel, <a href="/A123221/b123221.txt">Rows n = 0..20 of the irregular triangle, flattened</a>
%H A123221 Wikipedia, <a href="https://en.wikipedia.org/wiki/Major_index">Major index</a>
%F A123221 T(n,k) = A008302(n+1,k) for n + 1 <= k <= n*(n + 1)/2, n > 1. - _Franck Maminirina Ramaharo_, Oct 14 2018
%e A123221 Triangle begins:
%e A123221     1;
%e A123221     1;
%e A123221     1, 0, 1, 1;
%e A123221     1, 0, 2, 3,  5,  3,  1;
%e A123221     1, 0, 3, 5, 11, 22, 20,  15,   9,  4,  1;
%e A123221     1, 0, 4, 7, 18, 41, 90, 101, 101, 90, 71, 49, 29, 14, 5, 1;
%e A123221     ...
%t A123221 M[n_]:= CoefficientList[Product[1-x^j, {j, n}]/(1-x)^n, x];
%t A123221 Table[CoefficientList[Sum[M[n+1][[m+1]]*x^m*(1-x)^(n -Min[n, m]), {m, 0, Binomial[n+1,2]}], x], {n, 0, 10}]//Flatten
%o A123221 (Maxima)
%o A123221 A008302(n, k) := ratcoef(ratsimp(product((1 - x^j)/(1 - x), j, 1, n)), x, k)$
%o A123221 P(x, n) := sum(A008302(n + 1, j)*x^j*(1 - x)^(n - min(n, j)), j, 0, n*(n + 1)/2)$
%o A123221 create_list(ratcoef(expand(P(x, n)), x, k), n, 0, 10, k, 0, hipow(P(x, n), x)); /* _Franck Maminirina Ramaharo_, Oct 14 2018 */
%o A123221 (Sage)
%o A123221 @CachedFunction
%o A123221 def A008302(n,k):
%o A123221     if (k<0 or k>binomial(n,2)): return 0
%o A123221     elif (n==1 and k==0): return 1
%o A123221     else: return A008302(n, k-1) + A008302(n-1, k) - A008302(n-1, k-n)
%o A123221 def p(n,x): return sum( A008302(n+1, j)*x^j*(1-x)^(n-min(n, j)) for j in (0..binomial(n+1,2)) )
%o A123221 def T(n): return ( p(n,x) ).full_simplify().coefficients(sparse=False)
%o A123221 flatten([T(n) for n in (0..12)]) # _G. C. Greubel_, Jul 16 2021
%Y A123221 Cf. A122753, A123018, A123019, A123021, A123027, A123199, A123202, A123217.
%K A123221 nonn,tabf
%O A123221 0,9
%A A123221 _Roger L. Bagula_, Oct 05 2006
%E A123221 Edited, new name, and offset corrected by _Franck Maminirina Ramaharo_, Oct 14 2018