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

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

A350457 Maximal coefficient of (1 + x^2) * (1 + x^3) * (1 + x^5) * ... * (1 + x^prime(n)).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 4, 7, 10, 16, 27, 45, 79, 139, 249, 439, 784, 1419, 2574, 4703, 8682, 16021, 29720, 55146, 102170, 190274, 356804, 671224, 1269022, 2404289, 4521836, 8535117, 16134474, 30635869, 58062404, 110496946, 210500898, 401422210, 767158570, 1467402238
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 01 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..40);  # Alois P. Heinz, Jan 01 2022
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Expand[(1 + x^Prime[n])*b[n - 1]]];
    a[n_] := Max[CoefficientList[b[n], x]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 26 2022, after Alois P. Heinz *)
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, 1 + x^prime(k)))); \\ Michel Marcus, Jan 01 2022
    
  • Python
    from sympy.abc import x
    from sympy import prime, prod
    def A350457(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 03 2022

A359319 Maximal coefficient of (1 + x) * (1 + x^8) * (1 + x^27) * ... * (1 + x^(n^3)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 5, 7, 10, 14, 18, 27, 36, 62, 95, 140, 241, 370, 607, 1014, 1646, 2751, 4863, 8260, 13909, 24870, 41671, 73936, 131257, 228204, 411128, 737620, 1292651, 2324494, 4253857, 7487549, 13710736, 25291179, 44938191, 82814603
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 25 2022

Keywords

Comments

Conjecture: Maximal coefficient of Product_{k=1..n} (1 + x^(n^m)) ~ sqrt(4*m + 2) * 2^n / (sqrt(Pi) * n^(m + 1/2)), for m>=0. - Vaclav Kotesovec, Dec 30 2022

Crossrefs

Programs

  • Mathematica
    Table[Max[CoefficientList[Product[1+x^(k^3),{k,n}],x]],{n,0,44}] (* Stefano Spezia, Dec 25 2022 *)
    nmax = 100; poly = ConstantArray[0, nmax^2*(nmax + 1)^2/4 + 1]; poly[[1]] = 1; poly[[2]] = 1; Do[Do[poly[[j + 1]] += poly[[j - k^3 + 1]], {j, k^2*(k + 1)^2/4, k^3, -1}]; Print[k, " ", Max[poly]], {k, 2, nmax}]; (* Vaclav Kotesovec, Dec 29 2022 *)
  • PARI
    a(n) = vecmax(Vec(prod(i=1, n, (1+x^(i^3))))); \\ Michel Marcus, Dec 27 2022

Formula

Conjecture: a(n) ~ sqrt(14) * 2^n / (sqrt(Pi) * n^(7/2)). - Vaclav Kotesovec, Dec 30 2022

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

A359320 Maximal coefficient of (1 + x) * (1 + x^16) * (1 + x^81) * ... * (1 + x^(n^4)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 9, 13, 17, 24, 34, 53, 84, 130, 177, 290, 500, 797, 1300, 2066, 3591, 6090, 10298, 17330, 29888, 50811, 88358, 153369, 280208, 481289, 845090, 1474535, 2703811, 4808816, 8329214, 14806743, 27529781, 48859783, 87674040, 156471632
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 25 2022

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local i; max(coeffs(expand(mul(1+x^(i^4), i=1..n)))) end proc:
    map(f, [$1..50]); # Robert Israel, Dec 26 2022
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, 1+x^(k^4)))); \\ Michel Marcus, Dec 26 2022
    
  • Python
    from collections import Counter
    def A359320(n):
        c = {0:1,1:1}
        for i in range(2,n+1):
            j, d = i**4, Counter(c)
            for k in c:
                d[k+j] += c[k]
            c = d
        return max(c.values()) # Chai Wah Wu, Jan 31 2024

Extensions

a(38)-a(50) from Seiichi Manyama, Dec 26 2022

A359348 Maximal coefficient of (1 + x) * (1 + x^3) * (1 + x^6) * ... * (1 + x^(n*(n+1)/2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 4, 5, 7, 12, 18, 27, 44, 73, 122, 210, 362, 620, 1050, 1857, 3290, 5949, 10665, 19086, 34330, 62252, 113643, 209460, 383888, 706457, 1300198, 2407535, 4468367, 8331820, 15525814, 28987902, 54180854, 101560631, 190708871, 358969426
Offset: 0

Views

Author

Seiichi Manyama, Dec 27 2022

Keywords

Examples

			(1 + x) * (1 + x^3) * (1 + x^6) * (1 + x^10) = 1 + x + x^3 + x^4 + x^6 + x^7 + x^9 + 2 * x^10 + x^11 + x^13 + x^14 + x^16 + x^17 + x^19 + x^20. So a(4) = 2.
		

Crossrefs

Programs

  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, 1+x^(k*(k+1)/2))));

Formula

a(n) ~ sqrt(5) * 2^(n + 3/2) / (sqrt(Pi) * n^(5/2)). - Vaclav Kotesovec, Dec 29 2022

A350504 Maximal coefficient of (1 + x) * (1 + x^3) * (1 + x^5) * ... * (1 + x^(2*n-1)).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 5, 8, 13, 22, 38, 68, 118, 211, 380, 692, 1262, 2316, 4277, 7930, 14745, 27517, 51541, 96792, 182182, 343711, 650095, 1231932, 2338706, 4447510, 8472697, 16164914, 30884150, 59086618, 113189168, 217091832, 416839177, 801247614, 1541726967, 2969432270
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 28 2022

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          expand((1+x^(2*n-1))*b(n-1)))
        end:
    a:= n-> max(coeffs(b(n))):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jan 28 2022
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Expand[(1 + x^(2*n - 1))*b[n - 1]]];
    a[n_] := Max[CoefficientList[b[n], x]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, 1+x^(2*k-1)))); \\ Seiichi Manyama, Jan 28 2021

Formula

a(n) ~ sqrt(3) * 2^(n - 1/2) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Feb 04 2022

A359389 Maximal coefficient of Product_{k=1..n} (1 + 2*x^k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 72, 176, 384, 976, 2496, 6560, 17152, 45952, 123520, 336640, 920832, 2526976, 6979584, 19379712, 53966336, 150892544, 423132160, 1190260736, 3356964864, 9491228672, 26889519104, 76351971328, 217229369344, 619159953408, 1767696515072, 5054679908352
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 29 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[CoefficientList[Product[1 + 2*x^k, {k, 1, n}], x]], {n, 0, 40}]
    p = 1; Join[{1}, Table[p = Expand[p*(1 + 2*x^n)]; Max[CoefficientList[p, x]], {n, 1, 40}]]
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, 1 + 2*x^k))); \\ Michel Marcus, Dec 29 2022

Formula

a(n) ~ 3^(n + 3/2) / (2*sqrt(Pi)*n^(3/2)).

A369986 Maximum of the absolute value of the coefficients 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, 14, 20, 20, 28, 40, 54, 63, 103, 100, 103, 129, 198, 225, 295, 363, 286, 433, 815, 629, 796, 1236, 1363, 1258, 1723, 2791, 3873, 5244, 6409, 6236, 9724, 13800, 18153, 22993, 23120, 28173, 49135, 46042
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 07 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[Abs[CoefficientList[Product[(1 - x^(k^2)), {k, 1, n}], x]]], {n, 0, 54}]
  • PARI
    a(n) = vecmax(apply(abs, Vec(prod(i=1, n, (1-x^(i^2)))))); \\ Michel Marcus, Feb 07 2024
Showing 1-9 of 9 results.