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.

A369708 Maximal coefficient of (1 + x^3) * (1 + x^5) * (1 + x^7) * ... * (1 + x^prime(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 4, 5, 8, 14, 23, 40, 70, 126, 221, 394, 711, 1290, 2354, 4344, 8015, 14868, 27585, 51094, 95160, 178436, 335645, 634568, 1202236, 2261052, 4267640, 8067296, 15318171, 29031484, 55248527, 105251904, 200711160, 383580180, 733704990
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2024

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, 1, expand(b(n-1)*(1+x^ithprime(n)))) end:
    a:= n-> max(coeffs(b(n))):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jan 29 2024
  • Mathematica
    Table[Max[CoefficientList[Product[(1 + x^Prime[k]), {k, 2, n}], x]], {n, 0, 40}]
  • PARI
    a(n) = vecmax(Vec(prod(i=2, n, 1+x^prime(i)))); \\ Michel Marcus, Jan 29 2024
    
  • Python
    from collections import Counter
    from sympy import prime
    def A369708(n):
        c = {0:1}
        for i in range(2,n+1):
            p, d = prime(i), Counter(c)
            for k in c:
                d[k+p] += c[k]
            c = d
        return max(c.values()) # Chai Wah Wu, Jan 31 2024