%I #4 Oct 02 2024 14:29:34
%S 3,5,9,11,15,19,21,25,27,31,33,37,41,43,47,49,53,55,59,63,65,69,71,75,
%T 77,81,85,87,91,93,97,99,103,107,109,113,115,119,121,125,129,131,135,
%U 137,141,143,147,151,153,157,159,163,165,169,173,175,179,181,185
%N Let s(x) be the Maclaurin series for cos(x); then a(n) is the index k for which (k+1)-st partial sum of s(2*n*Pi) is least among all partial sums.
%F |a(n)-A376457(n)| = 1 for n>=1.
%e For n = 2 the partial sums (of which the 1st is for k=0) are approximately 1, -18.7, 46.2, -39.2, 20.9, -5.4, ..., where the least, -39.2..., is the 4th, so that a(2) = 3.
%t z = 200; r = Pi;
%t f[n_, m_] := f[n, m] = N[Sum[(-1)^k (2 n r)^(2 k)/(2 k)!, {k, 0, m}], 10]
%t t[n_] := Table[f[n, m], {m, 1, z}]
%t g[n_] := Select[Range[z], f[n, #] == Max[t[n]] &]
%t h[n_] := Select[Range[z], f[n, #] == Min[t[n]] &]
%t Flatten[Table[g[n], {n, 1, 60}]] (* A376456 *)
%t Flatten[Table[h[n], {n, 1, 60}]] (* this sequence *)
%Y Cf. A374987, A375057, A375053, A375054.
%K nonn
%O 1,1
%A _Clark Kimberling_, Oct 01 2024