A376457 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.
3, 5, 9, 11, 15, 19, 21, 25, 27, 31, 33, 37, 41, 43, 47, 49, 53, 55, 59, 63, 65, 69, 71, 75, 77, 81, 85, 87, 91, 93, 97, 99, 103, 107, 109, 113, 115, 119, 121, 125, 129, 131, 135, 137, 141, 143, 147, 151, 153, 157, 159, 163, 165, 169, 173, 175, 179, 181, 185
Offset: 1
Keywords
Examples
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.
Programs
-
Mathematica
z = 200; r = Pi; f[n_, m_] := f[n, m] = N[Sum[(-1)^k (2 n r)^(2 k)/(2 k)!, {k, 0, m}], 10] t[n_] := Table[f[n, m], {m, 1, z}] g[n_] := Select[Range[z], f[n, #] == Max[t[n]] &] h[n_] := Select[Range[z], f[n, #] == Min[t[n]] &] Flatten[Table[g[n], {n, 1, 60}]] (* A376456 *) Flatten[Table[h[n], {n, 1, 60}]] (* this sequence *)
Formula
|a(n)-A376457(n)| = 1 for n>=1.