login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Coefficient of x^a(n) in (x+1/2)*(x+2/2)*...*(x+n/2) is the largest one.
2

%I #13 Mar 07 2021 17:48:06

%S 1,1,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,

%T 5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,

%U 6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7

%N Coefficient of x^a(n) in (x+1/2)*(x+2/2)*...*(x+n/2) is the largest one.

%o (PARI) a(n) = my(p=prod(j=1, n, x+j/2), m=vecmax(Vec(p))); for (i=0, poldegree(p), if (polcoef(p, i)==m, return(i))); \\ _Michel Marcus_, Feb 19 2021

%o (Python)

%o from sympy import prod, Poly

%o from sympy.abc import x

%o def A076634(n):

%o y = Poly(prod(2*x+i for i in range(1,n+1))).all_coeffs()[::-1]

%o return y.index(max(y)) # _Chai Wah Wu_, Mar 07 2021

%Y Cf. A076620.

%K nonn

%O 1,3

%A _Benoit Cloitre_, Nov 10 2002