OFFSET
1,2
COMMENTS
May be computed found using convergents to the continued fraction for Pi. If cos(a(n)) is near -1, then a(n) is near an odd multiple of Pi. That is, a(n)/(2k+1) is a good rational approximation to Pi with an odd denominator (and continued fractions give good rational approximations).
If a convergent of the continued fraction for Pi has an odd denominator then the corresponding numerator is a term in this sequence. Otherwise add one to the last term in the convergent to get an approximation of Pi with an odd denominator. In this case, we may get a duplicate of the next convergent which we may just ignore.
To illustrate: [3] = 3/1 -> 3; [3,7] = 22/7 -> 22; [3,7,15] = 333/106; 106 is even -> [3,7,16] = 355/113 -> 355; [3,7,15,1] = 355/113 -> 355 (ignore); [3,7,15,1,292] = 103993/33102 -> [3,7,15,1,293] = 104348/33215 -> 104348
MATHEMATICA
z={}; current=1; Timing[ Do[ If[ Cos[ n ]<current, AppendTo[ z, current=Cos[ n ] ] ], {n, 105000} ] ]; z
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Michel ten Voorde
Terms a(13) and beyond and comments from Jonathan Cross (jcross(AT)wcox.com), Oct 16 2001
Offset changed to 1 by Alois P. Heinz, Apr 12 2019
STATUS
approved