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!)
A282691 a(n) = maximal number of real roots of any of the 2^(n+1) polynomials c_0 + c_1*x + c_2*x^2 + ... + c_n*x^n where the coefficients c_i are +1 or -1. 2
0, 1, 2, 3, 2, 3, 2, 5, 4, 5, 4, 5, 4, 5, 6, 7, 6, 5, 6, 7, 6, 7, 6, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The roots are counted with multiplicity.
Since (+/-)P((+/-)x) has the same number of real roots as P(x), we need consider only the cases where the x^0 and x^1 coefficients are +1. - Robert Israel, Feb 23 2017
LINKS
EXAMPLE
a(1) = 1 from 1 + x.
a(2) = 2 from 1 + x - x^2.
a(3) = 3 from 1 + x - x^2 - x^3 = (1+x)*(1-x^2).
a(5) = 3 from x^5 - x^4 + x^3 - x^2 - x + 1. - Robert Israel, Feb 26 2017
a(7) = 5 from x^7 + x^6 - x^5 - x^4 - x^3 - x^2 + x + 1 = (x - 1)^2*(x + 1)^3*(x^2 + 1). - Chai Wah Wu and W. Edwin Clark, Feb 23 2017
MAPLE
# Maple program using Robert Israel's suggestion (above) for the computation of a(n) using Sturm's Theorem and the squarefree factorization of the 1, -1 polynomials, from W. Edwin Clark, Feb 23 2017:
numroots:=proc(p, x)
local s:
sturm(sturmseq(p, x), x, -infinity, infinity):
end proc:
a:=proc(n)
local m, T, L, L1, p, P, s, k, q, u;
m:=0;
T:=combinat:-cartprod([seq([1, -1], i=1..n-1)]):
while not T[finished] do
L:=T[nextvalue]();
L1:=[1, 1, op(L)];
p:=add(L1[i]*x^(i-1), i=1..n+1);
q:=sqrfree(p, x);
k:=0;
for u in q[2] do k:=k+numroots(u[1], x)*u[2]; od;
if k > m then m:=k; fi;
end do:
return m;
end proc:
MATHEMATICA
Do[Print[Max[CountRoots[Internal`FromCoefficientList[#, x], x] & /@ Tuples[{1, -1}, n]]], {n, 1, 23}] (* Luca Petrone, Feb 23 2017 *)
CROSSREFS
Sequence in context: A064652 A077600 A120223 * A346744 A265577 A251103
KEYWORD
nonn,more
AUTHOR
Oanh Nguyen and N. J. A. Sloane, Feb 23 2017
EXTENSIONS
a(7) corrected and a(15)-a(16) added by Chai Wah Wu, Feb 23 2017; a(7) also corrected by W. Edwin Clark, Feb 23 2017
a(17)-a(22) added by Luca Petrone, Feb 23 2017
a(23) added by W. Edwin Clark, Feb 24 2017
STATUS
approved

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 July 30 12:41 EDT 2024. Contains 374743 sequences. (Running on oeis4.)