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.

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