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.

Showing 1-5 of 5 results.

A128565 Column 1 of triangle A128564; a(n) equals the number of permutations of {1..n+2} with [n/2+1] inversions for n>=0.

Original entry on oeis.org

1, 2, 5, 9, 29, 49, 174, 285, 1068, 1717, 6655, 10569, 41926, 66013, 266338, 416687, 1703027, 2651355, 10947079, 16976806, 70673825, 109256095, 457927079, 706071989, 2976282415, 4579020513, 19395654894, 29784426945, 126688273871, 194231327451, 829176461458
Offset: 0

Views

Author

Paul D. Hanna, Mar 12 2007

Keywords

Crossrefs

Cf. A008302 (Mahonian numbers); A128564 (triangle), A128566 (column 2).

Programs

  • PARI
    {a(n)=polcoeff(prod(j=1, n+2, (1-q^j)/(1-q)),(n+2)\2,q)}

Formula

a(n) = A008302(n+2,[n/2+1]) = coefficient of q^[n/2+1] in the q-factorial of n+2 for n>=0.

A098558 Expansion of e.g.f. (1+x)/(1-x).

Original entry on oeis.org

1, 2, 4, 12, 48, 240, 1440, 10080, 80640, 725760, 7257600, 79833600, 958003200, 12454041600, 174356582400, 2615348736000, 41845579776000, 711374856192000, 12804747411456000, 243290200817664000, 4865804016353280000, 102181884343418880000, 2248001455555215360000
Offset: 0

Views

Author

Paul Barry, Sep 14 2004

Keywords

Comments

Essentially the same as A052849: a(0)=0 and a(n) = A052849(n) for n>=1.
Equals row sums (unsigned) of triangle A158471. - Gary W. Adamson, Mar 20 2009
Also the number of graceful labelings of the star graph on n+1 nodes. - Eric W. Weisstein, Mar 31 2020

Crossrefs

Row sums of A008518 and of A128564.
Cf. A158471.

Programs

  • Magma
    [1] cat [2*Factorial(n): n in [1..30]]; // G. C. Greubel, Jan 17 2018
    
  • Mathematica
    Join[{1}, 2*Range[30]!] (* G. C. Greubel, Jan 17 2018 *)
    With[{nn=30},CoefficientList[Series[(1+x)/(1-x),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jun 05 2021 *)
    a[n_] := Hypergeometric2F1Regularized[1, -n, 2 - n, -1];
    Table[a[n], {n, 0, 22}]  (* Peter Luschny, Apr 26 2024 *)
  • PARI
    concat([1], vector(30, n, 2*n!)) \\ G. C. Greubel, Jan 17 2018
    
  • SageMath
    CF = ComplexBallField(100)
    def a(n):
        return Integer(CF(-1).hypergeometric([1, -n], [2 - n], regularized=True))
    print([a(n) for n in range(23)]) # Peter Luschny, Apr 26 2024

Formula

a(n) = 2*n! - 0^n.
a(n) = Sum_{k=0..n} (k+1) * A008290(n,k). - Alois P. Heinz, Mar 11 2022
Sum_{n>=0} 1/a(n) = (e+1)/2. - Amiram Eldar, Feb 02 2023
a(n) = HypergeomRegularized([1, -n], [2 - n], -1). - Peter Luschny, Apr 26 2024

A128566 Number of permutations of {1..n} with n inversions.

Original entry on oeis.org

1, 0, 0, 1, 5, 22, 90, 359, 1415, 5545, 21670, 84591, 330121, 1288587, 5032235, 19664205, 76893687, 300895513, 1178290263, 4617369760, 18106447251, 71048746505, 278966179936, 1095987764828, 4308300939450, 16944940572831, 66680029591816, 262519664110588
Offset: 0

Views

Author

Paul D. Hanna, Mar 12 2007

Keywords

Crossrefs

Diagonal of A008302 (Mahonian numbers).
Column 2 of A128564.
Cf. A128565 (column 1), A214086, A048651.

Programs

  • Maple
    a:= n-> coeff(series(mul((1-q^j)/(1-q), j=1..n), q, n+1), q, n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 05 2013
  • Mathematica
    Table[SeriesCoefficient[QPochhammer[x, x, n]/(1-x)^n, {x, 0, n}], {n, 0, 25}] (* Vaclav Kotesovec, May 13 2016 *)
  • PARI
    {a(n)=polcoeff(prod(j=1, n, (1-q^j)/(1-q)),n,q)}

Formula

a(n) = A008302(n,n) = coefficient of q^n in the q-factorial of n.
a(n) = T(n,n) with T(n,k) = T(n-1,k) + Sum_{j=1..n-1} T(n-1,k-j) for n>=0, k>0; T(n,k) = 0 for n<0; T(n,0) = 1 for n>=0. - Alois P. Heinz, Mar 07 2013
a(n) ~ c * 2^(2*n-1) / sqrt(Pi*n), where c = A048651 = QPochhammer[1/2] = 0.28878809508660242127889972192923... . - Vaclav Kotesovec, Sep 07 2014

Extensions

Edited by Alois P. Heinz, Mar 05 2013

A129276 Triangle, read by rows, where T(n,k) is the coefficient of q^(nk-k) in the squared q-factorial of n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 8, 8, 1, 1, 42, 106, 42, 1, 1, 241, 1558, 1558, 241, 1, 1, 1444, 23589, 53612, 23589, 1444, 1, 1, 8867, 360499, 1747433, 1747433, 360499, 8867, 1, 1, 55320, 5530445, 54794622, 111482424, 54794622, 5530445, 55320, 1
Offset: 0

Views

Author

Paul D. Hanna, Apr 07 2007

Keywords

Comments

Dual triangle is A129274.
Central terms form a bisection of A127728.

Examples

			Definition of q-factorial of n:
faq(n,q) = Product_{k=1..n} (1-q^k)/(1-q) for n>0, with faq(0,q)=1.
Obtain row 4 from coefficients in the squared q-factorial of 4:
faq(4,q)^2 = 1*(1 + q)^2*(1 + q + q^2)^2*(1 + q + q^2 + q^3)^2
= (1 + 3*q + 5*q^2 + 6*q^3 + 5*q^4 + 3*q^5 + q^6)^2;
the resulting coefficients of q are:
[(1), 6, 19, (42), 71, 96, (106), 96, 71, (42), 19, 6, (1)],
where the terms enclosed in parenthesis form row 4.
Triangle begins:
1;
1, 1;
1, 2, 1;
1, 8, 8, 1;
1, 42, 106, 42, 1;
1, 241, 1558, 1558, 241, 1;
1, 1444, 23589, 53612, 23589, 1444, 1;
1, 8867, 360499, 1747433, 1747433, 360499, 8867, 1;
1, 55320, 5530445, 54794622, 111482424, 54794622, 5530445, 55320, 1; ...
		

Crossrefs

Cf. A129277 (column 1), A129278 (column 2); A127728 (central terms), related triangles: A129274, A128564, A008302 (Mahonian numbers).

Programs

  • Mathematica
    faq[n_, q_] := Product[(1-q^k)/(1-q), {k, 1, n}]; t[0, 0] = t[1, 0] = t[1, 1] = 1; t[n_, k_] := SeriesCoefficient[faq[n, q]^2, {q, 0, (n-1)*k}]; Table[t[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 26 2013 *)
  • PARI
    T(n,k)=if(n==0,1,polcoeff(prod(i=1,n,(1-x^i)/(1-x))^2,(n-1)*k))

Formula

T(n,k) = [q^(nk-k)] Product_{i=1..n} { (1-q^i)/(1-q) }^2 for n>0, with T(0,0)=1.
Row sums = (n!)^2/(n-1) for n>=2.

A129274 Triangle, read by rows, where T(n,k) is the coefficient of q^(nk+k) in the squared q-factorial of n+1.

Original entry on oeis.org

1, 1, 1, 1, 10, 1, 1, 71, 71, 1, 1, 474, 1930, 474, 1, 1, 3103, 40096, 40096, 3103, 1, 1, 20190, 739929, 2108560, 739929, 20190, 1, 1, 131204, 12836959, 88638236, 88638236, 12836959, 131204, 1, 1, 853176, 215022825, 3286786158, 7625997280
Offset: 0

Views

Author

Paul D. Hanna, Apr 07 2007

Keywords

Comments

Row sums equal A010790(n) = n!*(n+1)! for n>=0. Central terms form a bisection of A127728. Dual triangle is A129276.

Examples

			Definition of q-factorial of n:
faq(n,q) = Product_{k=1..n} (1-q^k)/(1-q) for n>0, with faq(0,q)=1.
Obtain row 3 from coefficients in the squared q-factorial of 4:
faq(4,q)^2 = 1*(1 + q)^2*(1 + q + q^2)^2*(1 + q + q^2 + q^3)^2
= (1 + 3*q + 5*q^2 + 6*q^3 + 5*q^4 + 3*q^5 + q^6)^2;
the resulting coefficients of q are:
[(1), 6, 19, 42, (71), 96, 106, 96, (71), 42, 19, 6, (1)],
where the terms enclosed in parenthesis form row 3.
Triangle begins:
1;
1, 1;
1, 10, 1;
1, 71, 71, 1;
1, 474, 1930, 474, 1;
1, 3103, 40096, 40096, 3103, 1;
1, 20190, 739929, 2108560, 739929, 20190, 1;
1, 131204, 12836959, 88638236, 88638236, 12836959, 131204, 1;
1, 853176, 215022825, 3286786158, 7625997280, 3286786158, 215022825, 853176, 1; ...
		

Crossrefs

Cf. A129275 (column 1); A127728 (central terms), A010790 (row sums); related triangles: A129276, A128564, A008302 (Mahonian numbers).

Programs

  • PARI
    T(n,k)=polcoeff(prod(i=1,n+1,(1-x^i)/(1-x))^2,(n+1)*k)

Formula

T(n,k) = [q^(nk+k)] Product_{i=1..n+1} { (1-q^i)/(1-q) }^2.
Showing 1-5 of 5 results.