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 A381781 #51 Mar 25 2025 19:49:39 %S A381781 0,0,1,1,1,3,2,2,5,3,3,74,4,4,2,5,5,4,6,6,6,7,7,7,8,8,8,10,9,9,13,10, %T A381781 10,30,11,11,9,12,12,11,13,13,13,14,14,14,15,15,15,25,16,16,14,17,17, %U A381781 32,18,18,16,19,19,18,20,20,17,21,21,21,22,22,22,25,23,23,26 %N A381781 a(n) = k where k*Pi is the solution to sin(x) = 0 obtained using Newton's method starting from x = n. %C A381781 Each step of Newton's method for this is x -> f(x) = x - tan(x). %C A381781 If |x - k*Pi| < A381473 = 1.16556... for some k then each step takes x closer to k*Pi (by absolute difference) and so converges on the multiple k*Pi. %C A381781 If n itself is within |n - k*Pi| < A381473 then that convergence to k*Pi begins with the initial x = n and in that case a(n) = round(n/Pi) = A082964(n). %C A381781 The width of this convergence region around each k*Pi is 2*A381473 = A257451 = 2.331... so contains at least 2 integers n and so every k >= 0 occurs at least twice in the sequence. %C A381781 When x (or n) is further from its nearest multiple of Pi, the slope of sin(x) sends a step off to possibly much bigger or smaller places on the real line and may converge on some k*Pi far from the initial n. %C A381781 Those steps can be large enough to reach negative k, as for example first at a(99) = -810 (see A381892 and A381893). %C A381781 Conjecture: Infinitely many negative integers appear. %H A381781 Simcha Z. Katzoff, <a href="/A381781/b381781.txt">Table of n, a(n) for n = 0..1000</a> %F A381781 a(n) = (1/Pi)*lim_{k->oo} f_k(n), where f_k(n) denotes the k-th iteration of the function f(x) = x - tan(x). %e A381781 a(11) = 74: applying Newton's method to f(x) = sin(x) with initial guess x_0 = 11 gives x_1 = 236.9508, x_2 = 232.8538, etc., eventually converging to x = 232.477856365644 with a(11) = x/Pi = 74. %t A381781 delta = 1.1655611852072113068339179779585606691; %t A381781 a[n_]:=(x=n;While[Abs[x-Round[x,Pi]]>delta,x=x-Tan[x]];Round[x,Pi]/Pi); %t A381781 Array[a,100] %Y A381781 Cf. A381892, A381893, A082964, A381473. %K A381781 sign,easy %O A381781 0,6 %A A381781 _Simcha Z. Katzoff_, Mar 07 2025