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.
%I A198674 #5 Mar 30 2012 18:57:55 %S A198674 8,1,9,2,7,2,4,1,3,4,2,4,5,4,2,6,7,5,9,0,6,7,1,7,8,5,8,0,7,4,1,7,8,3, %T A198674 9,9,9,2,3,4,9,8,6,1,8,6,9,3,1,8,3,0,7,4,5,7,8,6,9,2,5,5,9,8,0,5,3,7, %U A198674 9,7,8,1,6,9,2,8,1,4,3,1,8,6,2,4,6,8,5,4,9,2,9,8,0,6,6,8,4,0,9 %N A198674 Decimal expansion of the least x>0 that gives the absolute minimum of cos(x)+cos(2x)+cos(3x)+cos(4x)+cos(5x). %C A198674 See A196361 for a guide to related sequences. %e A198674 x=0.8192724134245426759067178580741783999... %e A198674 min=-1.728768207393169918251228314555655767777... %t A198674 n = 5; f[t_] := Cos[t]; s[t_] := Sum[f[k*t], {k, 1, n}]; %t A198674 x = N[Minimize[s[t], t], 110]; u = Part[x, 1] %t A198674 v = 2 Pi - t /. Part[x, 2] %t A198674 RealDigits[u] (* A198673 *) %t A198674 RealDigits[v] (* A198674 *) %t A198674 Plot[s[t], {t, -3 Pi, 3 Pi}, PlotRange -> {-2, 6}] %Y A198674 Cf. A196361. %K A198674 nonn,cons %O A198674 0,1 %A A198674 _Clark Kimberling_, Oct 28 2011