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 A346151 #23 Aug 08 2021 01:52:18 %S A346151 1,2,3,4,5,7,8,9,10,11,12,14,15,16,17,18,19,20,22,23,24,25,26,27,28, %T A346151 30,31,32,33,34,35,37,38,39,40,41,42,43,45,46,47,48,49,50,52,53,54,55, %U A346151 56,57,58,60,61,62,63,64,65,66,68,69,70,71,72,73,75,76,77 %N A346151 a(n) is the smallest integer k > 0 such that 1 - tanh(k) < 10^(-n). %C A346151 As k increases, 1 - tanh(k) rapidly approaches 2*exp(-2*k), and the smallest integer k such that 2*exp(-2*k) < 10^(-n), i.e., such that k > (n*log(10) + log(2))/2, is simply ceiling((1/2)*(n*log(10) + log(2))). It seems very likely that this expression gives a(n) for all n >= 0. - _Jon E. Schoenfield_, Jul 08 2021 %e A346151 For n = 3, a(3) = 4 because 4 is the smallest positive integer k such that 1 - tanh(k) < 10^(-3): 1 - tanh(4) = 0.00067.... %t A346151 a[0] = 1; a[n_] := Ceiling @ ArcTanh[1 - 10^(-n)]; Array[a, 100, 0] (* _Amiram Eldar_, Jul 12 2021 *) %o A346151 (C++) %o A346151 /* Only suitable for computing a(0) to a(14) due to double precision limits. */ %o A346151 #include <iostream> %o A346151 #include <cmath> %o A346151 using namespace std; %o A346151 int main(int argc, char** argv) { %o A346151 int control = 1; %o A346151 for (int n=0; n<=14; n++) { %o A346151 for (int k=control; k<=100000000; k++){ %o A346151 double x = tanh(k); %o A346151 double val = abs(1-x); %o A346151 if (val < pow(10, -n)) { %o A346151 cout << k <<","; %o A346151 control=k; %o A346151 break; %o A346151 } %o A346151 } %o A346151 } %o A346151 } %Y A346151 Cf. A346033 (sin), A345670 (cos). %K A346151 nonn %O A346151 0,2 %A A346151 _Treanungkur Mal_, Jul 07 2021