OFFSET
0,2
EXAMPLE
For n = 3, a(n) = 55 because 55 is the smallest positive integer k such that 10^(-4) < |sin(k) - round(sin(k))| < 10^(-3): |sin(55) - round(sin(55))| = 0.000244....
PROG
(C++)
/* Only suitable for computing a(0) to a(15) due to double precision limits. */
#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char** argv) {
for (int n=0; n<=15; n++) {
for (int k=1; k<=37362253; k++){
double x = sin(k);
double val = abs(x-round(x));
if (val < pow(10, -n) && val > pow(10, -n-1)) {
cout << k <<", ";
break;
}
}
}
}
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Treanungkur Mal, Jul 01 2021
EXTENSIONS
a(16)-a(18) from Jon E. Schoenfield and Sean A. Irvine, Jul 02 2021
STATUS
approved