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-7 of 7 results.

A047653 Constant term in expansion of (1/2) * Product_{k=-n..n} (1 + x^k).

Original entry on oeis.org

1, 2, 4, 10, 26, 76, 236, 760, 2522, 8556, 29504, 103130, 364548, 1300820, 4679472, 16952162, 61790442, 226451036, 833918840, 3084255128, 11451630044, 42669225172, 159497648600, 597950875256, 2247724108772, 8470205600640, 31991616634296, 121086752349064
Offset: 0

Views

Author

Keywords

Comments

Or, constant term in expansion of Product_{k=1..n} (x^k + 1/x^k)^2. - N. J. A. Sloane, Jul 09 2008
Or, maximal coefficient of the polynomial (1+x)^2 * (1+x^2)^2 *...* (1+x^n)^2.
a(n) = A000302(n) - A181765(n).
From Gus Wiseman, Apr 18 2023: (Start)
Also the number of subsets of {1..2n} that are empty or have mean n. The a(0) = 1 through a(3) = 10 subsets are:
{} {} {} {}
{1} {2} {3}
{1,3} {1,5}
{1,2,3} {2,4}
{1,2,6}
{1,3,5}
{2,3,4}
{1,2,3,6}
{1,2,4,5}
{1,2,3,4,5}
Also the number of subsets of {-n..n} with no 0's but with sum 0. The a(0) = 1 through a(3) = 10 subsets are:
{} {} {} {}
{-1,1} {-1,1} {-1,1}
{-2,2} {-2,2}
{-2,-1,1,2} {-3,3}
{-3,1,2}
{-2,-1,3}
{-2,-1,1,2}
{-3,-1,1,3}
{-3,-2,2,3}
{-3,-2,-1,1,2,3}
(End)

Crossrefs

Cf. A025591.
Cf. A053632; variant: A127728.
For median instead of mean we have A079309(n) + 1.
Odd bisection of A133406.
A000980 counts nonempty subsets of {1..2n-1} with mean n.
A007318 counts subsets by length, A327481 by mean.

Programs

  • Maple
    f:=n->coeff( expand( mul((x^k+1/x^k)^2,k=1..n) ),x,0);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0,
          `if`(i=0, 1, 2*b(n, i-1)+b(n+i, i-1)+b(abs(n-i), i-1)))
        end:
    a:=n-> b(0, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Mar 10 2014
  • Mathematica
    b[n_, i_] := b[n, i] = If[n>i*(i+1)/2, 0, If[i == 0, 1, 2*b[n, i-1]+b[n+i, i-1]+b[Abs[n-i], i-1]]]; a[n_] := b[0, n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 10 2014, after Alois P. Heinz *)
    nmax = 26; d = {1}; a1 = {};
    Do[
      i = Ceiling[Length[d]/2];
      AppendTo[a1, If[i > Length[d], 0, d[[i]]]];
      d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n] +
        2 PadLeft[PadRight[d, Length[d] + n], Length[d] + 2 n];
    , {n, nmax}];
    a1 (* Ray Chandler, Mar 15 2014 *)
    Table[Length[Select[Subsets[Range[2n]],Length[#]==0||Mean[#]==n&]],{n,0,6}] (* Gus Wiseman, Apr 18 2023 *)
  • PARI
    a(n)=polcoeff(prod(k=-n,n,1+x^k),0)/2
    
  • PARI
    {a(n)=sum(k=0,n*(n+1)/2,polcoeff(prod(m=1,n,1+x^m+x*O(x^k)),k)^2)} \\ Paul D. Hanna, Nov 30 2010

Formula

Sum of squares of coefficients in Product_{k=1..n} (1+x^k):
a(n) = Sum_{k=0..n(n+1)/2} A053632(n,k)^2. - Paul D. Hanna, Nov 30 2010
a(n) = A000980(n)/2.
a(n) ~ sqrt(3) * 4^n / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Sep 11 2014
From Gus Wiseman, Apr 18 2023 (Start)
a(n) = A133406(2n+1).
a(n) = A212352(n) + 1.
a(n) = A362046(2n) + 1.
(End)

Extensions

More terms from Michael Somos, Jun 10 2000

A128083 Sum of squared coefficients of q in the q-analog of the odd double factorials.

Original entry on oeis.org

1, 1, 3, 37, 1159, 66953, 6158021, 825889193, 152147002939, 36866098462221, 11368538145120143, 4347671960639941039, 2019396728684584627337, 1119792551093682455434255, 730724550040451849614251167
Offset: 0

Views

Author

Paul D. Hanna, Feb 14 2007

Keywords

Crossrefs

Cf. A001147 ((2n-1)!!); A128080 (triangle), A128081 (central terms), A128082 (diagonal); A127728, A128087.

Programs

  • PARI
    {a(n)=if(n==0,1,sum(k=0,n^2,polcoeff(prod(j=1,n,(1-q^(2*j-1))/(1-q)),k,q)^2))}

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.

A128087 Sum of squared coefficients of q in the q-analog of the even double factorials.

Original entry on oeis.org

1, 2, 14, 296, 12938, 956720, 107245250, 16966970200, 3601980861720, 988252809411908, 340375635448973106, 143798619953044471444, 73123320014581106403732, 44060303354020797873285800
Offset: 0

Views

Author

Paul D. Hanna, Feb 14 2007

Keywords

Comments

See A128083 for sum of squared coefficients of q in the q-analog of the odd double factorials. Also, A127728 is the sum of squared coefficients of q in the q-factorials.

Crossrefs

Cf. A000165 ((2n)!!); A128084 (triangle), A128085 (central terms), A128086 (diagonal); A127728.

Programs

  • PARI
    {a(n)=if(n==0,1,sum(k=0,n^2,polcoeff(prod(j=1,n,(1-q^(2*j))/(1-q)),k,q)^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.

A380274 Sum of cubes of coefficients of q in the q-factorials.

Original entry on oeis.org

1, 1, 2, 18, 522, 34986, 4524240, 1003172616, 351349509504, 182985164256000, 135303274820730372, 136936922140937021688, 184146557651652262521738, 321051865325352021467189658, 710866983641078174204266934736, 1964068265459581480020247325821224
Offset: 0

Views

Author

Vaclav Kotesovec, Jan 18 2025

Keywords

Examples

			a(4) = 1^3 + 3^3 + 5^3 + 6^3 + 5^3 + 3^3 + 1^3 = 522.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[CoefficientList[Expand[Product[Sum[x^i, {i, 0, m}], {m, 1, n-1}]], x]^3], {n, 0, 15}]
  • PARI
    a(n) = my(v=Vec(prod(k=1, n, (1-q^k)/(1-q)))); sum(i=1, #v, v[i]^3); \\ Michel Marcus, Jan 18 2025

Formula

a(n) = Sum_{k>=0} A008302(n,k)^3.
Conjecture: a(n) ~ 6*sqrt(3) * n!^3 / (Pi * n^3).

A380275 Sum of the fourth powers of the coefficients of q in the q-factorials.

Original entry on oeis.org

1, 1, 2, 34, 2710, 669142, 403186412, 504370709488, 1170803949124848, 4644277674894466168, 29557755573424568318844, 287158619888775996039794756, 4090368591132420991019182924018, 82628355729998755756059701468470738, 2301817961412922763844330401786521588244
Offset: 0

Views

Author

Vaclav Kotesovec, Jan 18 2025

Keywords

Comments

Conjecture: In general, sum of the k-th powers of the coefficients of q in the q-factorials is asymptotic to 2^((k-1)/2) * 3^(k-1) * n!^k / (sqrt(k) * Pi^((k-1)/2) * n^(3*(k-1)/2)).

Examples

			a(4) = 1^4 + 3^4 + 5^4 + 6^4 + 5^4 + 3^4 + 1^4 = 2710.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[CoefficientList[Expand[Product[Sum[x^i, {i, 0, m}], {m, 1, n-1}]], x]^4], {n, 0, 15}]
  • PARI
    a(n) = my(v=Vec(prod(k=1, n, (1-q^k)/(1-q)))); sum(i=1, #v, v[i]^4); \\ Michel Marcus, Jan 18 2025

Formula

a(n) = Sum_{k>=0} A008302(n,k)^4.
Conjecture: a(n) ~ 27*sqrt(2) * n!^4 / (Pi^(3/2) * n^(9/2)).
Showing 1-7 of 7 results.