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-10 of 17 results. Next

A025591 Maximal coefficient of Product_{k<=n} (1 + x^k). Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = 0 or 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 5, 8, 14, 23, 40, 70, 124, 221, 397, 722, 1314, 2410, 4441, 8220, 15272, 28460, 53222, 99820, 187692, 353743, 668273, 1265204, 2399784, 4559828, 8679280, 16547220, 31592878, 60400688, 115633260, 221653776, 425363952, 817175698
Offset: 0

Views

Author

Keywords

Comments

If k is allowed to approach infinity, this gives the partition numbers A000009.
a(n) is the maximal number of subsets of {1,2,...,n} that share the same sum.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0,
          `if`(i=0, 1, b(n+i, i-1)+b(abs(n-i), i-1)))
        end:
    a:=n-> b(0, n)+b(1, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Mar 10 2014
  • Mathematica
    f[n_, s_] := f[n, s]=Which[n==0, If[s==0, 1, 0], Abs[s]>(n*(n+1))/2, 0, True, f[n-1, s-n]+f[n-1, s+n]]; Table[Which[Mod[n, 4]==0||Mod[n, 4]==3, f[n, 0], Mod[n, 4]==1||Mod[n, 4]==2, f[n, 1]], {n, 0, 40}]
    (* Second program: *)
    p = 1; Flatten[{1, Table[p = Expand[p*(1 + x^n)]; Max[CoefficientList[p, x]], {n, 1, 50}]}] (* Vaclav Kotesovec, May 04 2018 *)
    b[n_, i_] := b[n, i] = If[n > i(i+1)/2, 0, If[i == 0, 1, b[n+i, i-1] + b[Abs[n-i], i-1]]];
    a[n_] := b[0, n] + b[1, n]; a /@ Range[0, 40] (* Jean-François Alcover, Feb 17 2020, after Alois P. Heinz *)
  • PARI
    a(n)=if(n<0,0,polcoeff(prod(k=1,n,1+x^k),n*(n+1)\4))
    
  • Python
    from collections import Counter
    def A025591(n):
        c = {0:1,1:1}
        for i in range(2,n+1):
            d = Counter(c)
            for k in c:
                d[k+i] += c[k]
            c = d
        return max(c.values()) # Chai Wah Wu, Jan 31 2024

Formula

a(n) = A063865(n) + A063866(n).
a(n) ~ sqrt(6/Pi) * 2^n / n^(3/2) [conjectured by Andrica and Tomescu (2002) and proved by Sullivan (2013)]. - Vaclav Kotesovec, Mar 17 2020
More precise asymptotics: a(n) ~ sqrt(6/Pi) * 2^n / n^(3/2) * (1 - 6/(5*n) + 589/(560*n^2) - 39/(50*n^3) + ...). - Vaclav Kotesovec, Dec 30 2022
a(n) = max_{k>=0} A053632(n,k). - Alois P. Heinz, Jan 20 2023

A231599 T(n,k) is the coefficient of x^k in Product_{i=1..n} (1-x^i); triangle T(n,k), n >= 0, 0 <= k <= A000217(n), read by rows.

Original entry on oeis.org

1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 1, -1, -1, 0, 0, 2, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 1, 1, 1, -1, -1, -1, 0, 0, 1, 1, -1, 1, -1, -1, 0, 0, 1, 0, 2, 0, -1, -1, -1, -1, 0, 2, 0, 1, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 1, 0, 1, 1, 0, -1, -1, -2, 0
Offset: 0

Views

Author

Marc Bogaerts, Nov 11 2013

Keywords

Comments

From Tilman Piesk, Feb 21 2016: (Start)
The sum of each row is 0. The even rows are symmetric; in the odd rows numbers with the same absolute value and opposed signum are symmetric to each other.
The odd rows where n mod 4 = 3 have the central value 0.
The even rows where n mod 4 = 0 have positive central values. They form the sequence A269298 and are also the rows maximal values.
A086376 contains the maximal values of each row, A160089 the maximal absolute values, and A086394 the absolute parts of the minimal values.
Rows of this triangle can be used to efficiently calculate values of A026807.
(End)

Examples

			For n=2 the corresponding polynomial is (1-x)*(1-x^2) = 1 -x - x^2 + x^3.
Irregular triangle starts:
  k    0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
n
0      1
1      1  -1
2      1  -1  -1   1
3      1  -1  -1   0   1   1  -1
4      1  -1  -1   0   0   2   0   0  -1  -1   1
5      1  -1  -1   0   0   1   1   1  -1  -1  -1   0   0   1   1  -1
		

Crossrefs

Cf. A000217 (triangular numbers).
Cf. A086376, A160089, A086394 (maxima, etc.).
Cf. A269298 (central nonzero values).

Programs

  • Maple
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))
            (expand(mul(1-x^i, i=1..n))):
    seq(T(n), n=0..10);  # Alois P. Heinz, Dec 22 2013
  • Mathematica
    Table[If[k == 0, 1, Coefficient[Product[(1 - x^i), {i, n}], x^k]], {n, 0, 6}, {k, 0, (n^2 + n)/2}] // Flatten (* Michael De Vlieger, Mar 04 2018 *)
  • PARI
    row(n) = pol = prod(i=1, n, 1 - x^i); for (i=0, poldegree(pol), print1(polcoeff(pol, i), ", ")); \\ Michel Marcus, Dec 21 2013
    
  • Python
    from sympy import poly, symbols
    def a231599_row(n):
        if n == 0:
            return [1]
        x = symbols('x')
        p = 1
        for i in range(1, n+1):
            p *= poly(1-x**i)
        p = p.all_coeffs()
        return p[::-1]
    # Tilman Piesk, Feb 21 2016

Formula

T(n,k) = [x^k] Product_{i=1..n} (1-x^i).
T(n,k) = T(n-1, k) + (-1)^n*T(n-1, n*(n+1)/2-k), n > 1. - Gevorg Hmayakyan, Feb 09 2017 [corrected by Giuliano Cabrele, Mar 02 2018]

A160089 The maximum of the absolute value of the coefficients of Pn = (1-x)(1-x^2)(1-x^3)...(1-x^n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 3, 3, 4, 6, 5, 6, 7, 8, 8, 10, 11, 16, 16, 19, 21, 28, 29, 34, 41, 50, 56, 68, 80, 100, 114, 135, 158, 196, 225, 269, 320, 388, 455, 544, 644, 786, 921, 1111, 1321, 1600, 1891, 2274, 2711, 3280, 3895, 4694, 5591, 6780, 8051, 9729, 11624
Offset: 0

Views

Author

Theodore Kolokolnikov, May 01 2009

Keywords

Comments

If n is even then a(n) is the absolute value of the coefficient of z^(n(n+1)/4). If n is odd, it is an open question as to which coefficient is a(n).
For odd n values, the Berkovich/Uncu reference provides explicit conjectural formulas for a(n). - Ali Uncu, Jul 19 2020

Crossrefs

Programs

  • Maple
    A160089 := proc(n)
            g := expand(mul( 1-x^k,k=1..n) );
            convert(PolynomialTools[CoefficientVector](g, x), list):
            max(op(map(abs, %)));
    end proc:
  • Mathematica
    p = 1; Flatten[{1, Table[p = Expand[p*(1 - x^n)]; Max[Abs[CoefficientList[p, x]]], {n, 1, 100}]}] (* Vaclav Kotesovec, May 03 2018 *)

Formula

a(n) >= A086376(n). - R. J. Mathar, Jun 01 2011
From Vaclav Kotesovec, May 04 2018: (Start)
a(n)^(1/n) tends to 1.2197...
Conjecture: a(n)^(1/n) ~ sqrt(A133871(n)^(1/n)) ~ 1.21971547612163368901359933...
(End)

Extensions

a(0)=1 prepended by Alois P. Heinz, Apr 12 2017

A086781 a(n) is the number of nonzero terms in the expansion of (x-y) * (x^2-y^2) * (x^3-y^3) * ... * (x^n-y^n).

Original entry on oeis.org

1, 2, 4, 6, 7, 12, 14, 18, 25, 32, 36, 42, 53, 68, 64, 84, 97, 108, 126, 146, 161, 170, 192, 208, 229, 246, 274, 300, 333, 348, 372, 400, 427, 468, 492, 526, 561, 602, 626, 644, 691, 736, 772, 826, 869, 902, 930, 974, 1017, 1062, 1120, 1184, 1223, 1262, 1314, 1374, 1419, 1468, 1518, 1586, 1663, 1718, 1778, 1834, 1899, 1954, 2018
Offset: 0

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 03 2003

Keywords

Comments

In the definition one can take y=1. - Emeric Deutsch, Jan 01 2008

Crossrefs

Programs

  • Maple
    a:=proc(n) options operator, arrow: nops(expand(product(x^j-y^j,j=1..n))) end proc: seq(a(n),n=0..50); # Emeric Deutsch, Jan 01 2008
  • Mathematica
    Table[Length[Expand[Times@@(x^Range[n]-1)]],{n,50}] (* Harvey P. Dale, Mar 01 2012 *)
  • PARI
    a(n)=#select(w->w, Vec(prod(k=1,n,1-'x^k))); \\ Joerg Arndt, Apr 12 2017

Extensions

More terms from Emeric Deutsch, Jan 01 2008
a(0)=1 prepended by Alois P. Heinz, Apr 12 2017

A086394 (-1) times minimal coefficient of the polynomial (1-x)*(1-x^2)*...*(1-x^n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 7, 7, 8, 10, 11, 12, 16, 19, 21, 23, 29, 34, 41, 46, 56, 68, 80, 92, 114, 135, 158, 182, 225, 269, 320, 369, 455, 544, 644, 753, 921, 1111, 1321, 1543, 1891, 2274, 2711, 3183, 3895, 4694, 5591, 6592, 8051, 9729, 11624
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 08 2003

Keywords

Crossrefs

Cf. A086376.
Cf. A025591.

Programs

  • Maple
    p:= proc(n) option remember; expand(
          `if`(n=0, 1, (x^n-1)*p(n-1)))
        end:
    a:= n-> -min(coeffs(p(n))):
    seq(a(n), n=1..80);  # Alois P. Heinz, Apr 12 2017
  • Mathematica
    p[n_] := p[n] = Expand[If[n == 0, 1, (x^n - 1)*p[n - 1]]];
    a[n_] := -Min[CoefficientList[p[n], x]];
    Table[a[n], {n, 1, 80}]; (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)
  • PARI
    a(n)=-vecmin(vector(n*(n+1)/2,i,polcoeff(prod(k=1,n,1-x^k),i))) \\ Benoit Cloitre, Sep 12 2003

Extensions

More terms from Benoit Cloitre, Sep 12 2003
Further terms from Sascha Kurz, Sep 22 2003

A369711 Maximum coefficient of (1 - x)^3 * (1 - x^2)^3 * (1 - x^3)^3 * ... * (1 - x^n)^3.

Original entry on oeis.org

1, 3, 8, 15, 44, 50, 117, 186, 356, 561, 969, 1761, 3508, 5789, 10347, 19023, 35580, 62388, 111255, 205653, 376496, 674085, 1201809, 2211462, 4056220, 7287672, 13027698, 24005627, 43800562, 79033269, 141583272, 260061408, 473603594, 855436899, 1532383878, 2813222766
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[CoefficientList[Product[(1 - x^k)^3, {k, 1, n}], x]], {n, 0, 35}]
  • PARI
    a(n) = vecmax(Vec(prod(i=1, n, (1-x^i)^3))); \\ Michel Marcus, Jan 29 2024
    
  • Python
    from collections import Counter
    def A369711(n):
        c = {0:1}
        for k in range(1,n+1):
            d = Counter(c)
            for j in c:
                a = c[j]
                d[j+k] -= 3*a
                d[j+2*k] += 3*a
                d[j+3*k] -= a
            c = d
        return max(c.values()) # Chai Wah Wu, Feb 07 2024

A369728 Maximal coefficient of (1 - x) * (1 - x^4) * (1 - x^9) * ... * (1 - x^(n^2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 11, 14, 12, 12, 20, 20, 28, 40, 54, 59, 103, 100, 103, 129, 198, 225, 295, 363, 286, 433, 815, 629, 796, 1236, 1363, 1258, 1723, 2143, 3873, 4469, 6409, 6019, 9724, 12844, 18153, 20914, 23120, 28173, 49135, 46042, 78112
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 30 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[CoefficientList[Product[(1 - x^(k^2)), {k, 1, n}], x]], {n, 0, 55}]
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, (1-x^k^2)))); \\ Michel Marcus, Jan 30 2024

A350514 Maximal coefficient of Product_{j=1..n} (1 - x^prime(j)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 6, 8, 12, 17, 30, 41, 70, 107, 186, 307, 531, 887, 1561, 2701, 4817, 8514, 15030, 26490, 47200, 84622, 151809, 273912, 496807, 900595, 1643185, 2999837, 5498916, 10111429, 18596096, 34306158, 63585519, 118215700
Offset: 0

Views

Author

Alois P. Heinz, Jan 02 2022

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          expand((1-x^ithprime(n))*b(n-1)))
        end:
    a:= n-> max(coeffs(b(n))):
    seq(a(n), n=0..60);
  • Mathematica
    a[n_] := Times@@(1-x^Prime[Range[n]])//Expand//CoefficientList[#, x]&//Max;
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jun 02 2022 *)
  • PARI
    a(n) = vecmax(Vec(prod(j=1, n, 1-'x^prime(j)))); \\ Michel Marcus, Jan 04 2022
  • Python
    from sympy.abc import x
    from sympy import prime, prod
    def A350514(n): return 1 if n == 0 else max(prod(1-x**prime(i) for i in range(1,n+1)).as_poly().coeffs()) # Chai Wah Wu, Jan 04 2022
    

A369710 Maximal coefficient of (1 - x)^2 * (1 - x^2)^2 * (1 - x^3)^2 * ... * (1 - x^n)^2.

Original entry on oeis.org

1, 1, 4, 3, 10, 6, 20, 12, 34, 24, 64, 52, 116, 103, 208, 223, 410, 470, 808, 992, 1620, 2120, 3352, 4494, 6980, 9584, 14680, 20400, 31128, 43774, 66288, 93968, 141654, 201766, 303716, 433746, 652612, 936334, 1404920, 2021344, 3029564, 4364300, 6541872, 9437054
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[CoefficientList[Product[(1 - x^k)^2, {k, 1, n}], x]], {n, 0, 43}]
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, (1-x^k)^2))); \\ Michel Marcus, Jan 30 2024

A269298 Central nonzero values of A231599.

Original entry on oeis.org

1, 2, 2, 4, 6, 8, 16, 28, 50, 100, 196, 388, 786, 1600, 3280, 6780, 14060, 29280, 61232, 128414, 270084, 569514, 1203564, 2548770, 5407754, 11493312, 24465960, 52157508, 111342192, 237985596, 509275390, 1091017632, 2339687834, 5022312654, 10790564790
Offset: 0

Views

Author

Tilman Piesk, Feb 21 2016

Keywords

Comments

Rows of A231599 whose row number is divisible by four have positive central values. a(n) is the central value of row 4n. They are also the maximal value of that row, so a(n) = A086376(4n).
a(1) = a(2) = 2. Apart from that the sequence is strictly increasing.

Examples

			For n = 5, A231599( 4n, A000217(4n)/2 ) = A231599(20, 105) = 8, so a(5)=8.
For n = 5, A086376(4n) = A086376(20) = 8, so a(5)=8.
		

Crossrefs

Formula

a(n) = A231599( 4n, A000217(4n)/2 ) = A086376(4n).
Showing 1-10 of 17 results. Next