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.

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

This page as a plain text file.
%I A350457 #22 Feb 26 2022 04:56:56
%S A350457 1,1,1,2,2,2,4,4,7,10,16,27,45,79,139,249,439,784,1419,2574,4703,8682,
%T A350457 16021,29720,55146,102170,190274,356804,671224,1269022,2404289,
%U A350457 4521836,8535117,16134474,30635869,58062404,110496946,210500898,401422210,767158570,1467402238
%N A350457 Maximal coefficient of (1 + x^2) * (1 + x^3) * (1 + x^5) * ... * (1 + x^prime(n)).
%H A350457 Alois P. Heinz, <a href="/A350457/b350457.txt">Table of n, a(n) for n = 0..700</a>
%p A350457 b:= proc(n) option remember; `if`(n=0, 1,
%p A350457       expand((1+x^ithprime(n))*b(n-1)))
%p A350457     end:
%p A350457 a:= n-> max(coeffs(b(n))):
%p A350457 seq(a(n), n=0..40);  # _Alois P. Heinz_, Jan 01 2022
%t A350457 b[n_] := b[n] = If[n == 0, 1, Expand[(1 + x^Prime[n])*b[n - 1]]];
%t A350457 a[n_] := Max[CoefficientList[b[n], x]];
%t A350457 Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Feb 26 2022, after _Alois P. Heinz_ *)
%o A350457 (PARI) a(n) = vecmax(Vec(prod(k=1, n, 1 + x^prime(k)))); \\ _Michel Marcus_, Jan 01 2022
%o A350457 (Python)
%o A350457 from sympy.abc import x
%o A350457 from sympy import prime, prod
%o A350457 def A350457(n): return 1 if n == 0 else max(prod(1+x**prime(i) for i in range(1,n+1)).as_poly().coeffs()) # _Chai Wah Wu_, Jan 03 2022
%Y A350457 Cf. A000040, A000586, A007504, A025591, A160235.
%K A350457 nonn
%O A350457 0,4
%A A350457 _Ilya Gutkovskiy_, Jan 01 2022