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.

A358997 a(n) is the number of distinct positive real roots of the Maclaurin polynomial of degree 2*n for cos(x).

This page as a plain text file.
%I A358997 #14 Nov 12 2023 13:16:40
%S A358997 0,1,2,1,2,1,2,3,2,3,4,3,4,3,4,5,4,5,6,5,6,5,6,7,6,7,6,7,8,7,8,9,8,9,
%T A358997 8,9,10,9,10,11,10,11,10,11,12,11,12,11,12,13,12,13,14,13,14,13,14,15,
%U A358997 14,15,14,15,16,15,16,17,16,17,16,17,18,17,18,19,18,19,18,19,20,19,20,19,20,21
%N A358997 a(n) is the number of distinct positive real roots of the Maclaurin polynomial of degree 2*n for cos(x).
%C A358997 It appears that a(n) == n (mod 2) and a(n+2) - a(n) is always either 0 or 2.
%H A358997 Robert Israel, <a href="/A358997/b358997.txt">Table of n, a(n) for n = 0..250</a>
%e A358997 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)).
%p A358997 f:= proc(n) local p, k;
%p A358997   p:= add((-1)^k * x^k/(2*k)!, k=0..n);
%p A358997   sturm(sturmseq(p,x),x,0,infinity)
%p A358997 end proc:
%p A358997 map(f, [$0..100]);
%t A358997 a[n_] := CountRoots[Sum[(-1)^k*x^k/(2k)!, {k, 0, n}], {x, 0, Infinity}];
%t A358997 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Nov 12 2023 *)
%Y A358997 Cf. A012265, A332325.
%K A358997 nonn,look
%O A358997 0,3
%A A358997 _Robert Israel_, Dec 09 2022