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)).

This page as a plain text file.
%I A369708 #12 Jan 31 2024 14:12:54
%S A369708 1,1,1,1,1,1,2,2,4,5,8,14,23,40,70,126,221,394,711,1290,2354,4344,
%T A369708 8015,14868,27585,51094,95160,178436,335645,634568,1202236,2261052,
%U A369708 4267640,8067296,15318171,29031484,55248527,105251904,200711160,383580180,733704990
%N A369708 Maximal coefficient of (1 + x^3) * (1 + x^5) * (1 + x^7) * ... * (1 + x^prime(n)).
%p A369708 b:= proc(n) option remember; `if`(n<2, 1, expand(b(n-1)*(1+x^ithprime(n)))) end:
%p A369708 a:= n-> max(coeffs(b(n))):
%p A369708 seq(a(n), n=0..40);  # _Alois P. Heinz_, Jan 29 2024
%t A369708 Table[Max[CoefficientList[Product[(1 + x^Prime[k]), {k, 2, n}], x]], {n, 0, 40}]
%o A369708 (PARI) a(n) = vecmax(Vec(prod(i=2, n, 1+x^prime(i)))); \\ _Michel Marcus_, Jan 29 2024
%o A369708 (Python)
%o A369708 from collections import Counter
%o A369708 from sympy import prime
%o A369708 def A369708(n):
%o A369708     c = {0:1}
%o A369708     for i in range(2,n+1):
%o A369708         p, d = prime(i), Counter(c)
%o A369708         for k in c:
%o A369708             d[k+p] += c[k]
%o A369708         c = d
%o A369708     return max(c.values()) # _Chai Wah Wu_, Jan 31 2024
%Y A369708 Cf. A024939, A025591, A350457.
%K A369708 nonn
%O A369708 0,7
%A A369708 _Ilya Gutkovskiy_, Jan 29 2024