OFFSET
0,3
COMMENTS
It appears that a(n) == n (mod 2) and a(n+2) - a(n) is always either 0 or 2.
LINKS
Robert Israel, Table of n, a(n) for n = 0..250
EXAMPLE
a(2) = 2 because the Maclaurin polynomial of degree 4, 1 - x^2/2! + x^4/4!, has two distinct nonnegative real roots, namely sqrt(6-2*sqrt(3)) and sqrt(6+2*sqrt(3)).
MAPLE
f:= proc(n) local p, k;
p:= add((-1)^k * x^k/(2*k)!, k=0..n);
sturm(sturmseq(p, x), x, 0, infinity)
end proc:
map(f, [$0..100]);
MATHEMATICA
a[n_] := CountRoots[Sum[(-1)^k*x^k/(2k)!, {k, 0, n}], {x, 0, Infinity}];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Nov 12 2023 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Robert Israel, Dec 09 2022
STATUS
approved