[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A369708 Maximal coefficient of (1 + x^3) * (1 + x^5) * (1 + x^7) * ... * (1 + x^prime(n)). 2

%I #12 Jan 31 2024 14:12:54

%S 1,1,1,1,1,1,2,2,4,5,8,14,23,40,70,126,221,394,711,1290,2354,4344,

%T 8015,14868,27585,51094,95160,178436,335645,634568,1202236,2261052,

%U 4267640,8067296,15318171,29031484,55248527,105251904,200711160,383580180,733704990

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

%p b:= proc(n) option remember; `if`(n<2, 1, expand(b(n-1)*(1+x^ithprime(n)))) end:

%p a:= n-> max(coeffs(b(n))):

%p seq(a(n), n=0..40); # _Alois P. Heinz_, Jan 29 2024

%t Table[Max[CoefficientList[Product[(1 + x^Prime[k]), {k, 2, n}], x]], {n, 0, 40}]

%o (PARI) a(n) = vecmax(Vec(prod(i=2, n, 1+x^prime(i)))); \\ _Michel Marcus_, Jan 29 2024

%o (Python)

%o from collections import Counter

%o from sympy import prime

%o def A369708(n):

%o c = {0:1}

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

%o p, d = prime(i), Counter(c)

%o for k in c:

%o d[k+p] += c[k]

%o c = d

%o return max(c.values()) # _Chai Wah Wu_, Jan 31 2024

%Y Cf. A024939, A025591, A350457.

%K nonn

%O 0,7

%A _Ilya Gutkovskiy_, Jan 29 2024

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 04:38 EDT 2024. Contains 375526 sequences. (Running on oeis4.)