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 A345404 #24 Jul 31 2021 17:27:11 %S A345404 11,22,1120,355,14817,286602,5117932,144316263,167004362,8984683957 %N A345404 a(n) is the smallest positive integer k such that |tan(k) - round(tan(k))| is smaller than 10^(-n), but greater than 10^(-n-1). %C A345404 In other words, a(n) is the smallest positive integer k such that the distance between tan(k) and nearest integer to tan(k) is smaller than 10^(-n), but greater than 10^(-n-1). %e A345404 For n=3, a(n)=1120, because 1120 is the smallest positive integer such that |tan(1120) - round(tan(1120))| = 0.0008709... < 10^(-3) and 0.0008709... > 10^(-4). %p A345404 n := 1: for i from 2 to 10^10 do if 10^(-n - 1) < abs(evalf(tan(i)) - floor(evalf(tan(i)) + 1/2)) and abs(evalf(tan(i)) - floor(evalf(tan(i)) + 1/2)) < 10^(-n) then print(i); n := n + 1; i := 1; end if; end do; %t A345404 Transpose[Table[Catch[Table[Table[{i, j}; %t A345404 If[10^(-i - 1) < Abs[Tan[j] - Round[Tan[j]]] && %t A345404 Abs[Tan[j] - Round[Tan[j]]] < 10^(-i), %t A345404 Throw[{i, j}]], {i}], {j, 10^(i+1)}]], {i, 10}]][[-1]] (* _Bence BernĂ¡th_, Jul 07 2021 *) %o A345404 (C++) #include <iostream> %o A345404 #include <cmath> %o A345404 using namespace std; int main(int argc, char** argv) {long double n=1; int q=2; for(n=1; n<=10; n++){for(int i=q; i<=100000000000; i++){long double k=tan(i); if(abs(k-round(k))<pow(10, -n)&&abs(k-round(k))>pow(10, -n-1)){cout<<i<<", "; break; }}}} %o A345404 (PARI) a(n) = my(m); default(realprecision, 2*n); for(k=1, oo, if(10^-n > (m=abs(tan(k)-round(tan(k)))) && m > 10^(-n-1), return(k))); \\ _Jinyuan Wang_, Jun 18 2021 %Y A345404 Cf. A000209, A345328. %K A345404 nonn,more,hard %O A345404 1,1 %A A345404 _Andrzej Kukla_, Jun 18 2021