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

%I #13 Feb 01 2024 16:24:21

%S 1,1,2,5,16,65,293,1807,12946,106475,972260,9858553,109451903,

%T 1323071345,17398667717,247055196932,3753507625272,60680317203979,

%U 1043036844360792,18969267205680868,364107881070036688,7366172106829696356,156467911373737550264

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

%t Table[Max[CoefficientList[Product[(1 + Sum[x^Prime[j], {j, 1, i}]), {i, 1, n}], x]], {n, 0, 22}]

%o (PARI) a(n) = vecmax(Vec(prod(k=1, n, 1 + sum(i=1, k, x^prime(i))))); \\ _Michel Marcus_, Feb 01 2024

%o (Python)

%o from collections import Counter

%o from sympy import prime, primerange

%o def A369775(n):

%o if n == 0: return 1

%o c, p = {0:1}, list(primerange(prime(n)+1))

%o for k in range(1,n+1):

%o d = Counter(c)

%o for j in c:

%o a = c[j]

%o for i in p[:k]:

%o d[j+i] += a

%o c = d

%o return max(c.values()) # _Chai Wah Wu_, Feb 01 2024

%Y Cf. A000040, A000140, A039831, A350457, A359328.

%K nonn

%O 0,3

%A _Ilya Gutkovskiy_, Jan 31 2024