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.

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

Original entry on oeis.org

1, 1, 2, 5, 16, 65, 293, 1807, 12946, 106475, 972260, 9858553, 109451903, 1323071345, 17398667717, 247055196932, 3753507625272, 60680317203979, 1043036844360792, 18969267205680868, 364107881070036688, 7366172106829696356, 156467911373737550264
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 31 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[CoefficientList[Product[(1 + Sum[x^Prime[j], {j, 1, i}]), {i, 1, n}], x]], {n, 0, 22}]
  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, 1 + sum(i=1, k, x^prime(i))))); \\ Michel Marcus, Feb 01 2024
    
  • Python
    from collections import Counter
    from sympy import prime, primerange
    def A369775(n):
        if n == 0: return 1
        c, p = {0:1}, list(primerange(prime(n)+1))
        for k in range(1,n+1):
            d = Counter(c)
            for j in c:
                a = c[j]
                for i in p[:k]:
                    d[j+i] += a
            c = d
        return max(c.values()) # Chai Wah Wu, Feb 01 2024