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 A081789 #21 Apr 23 2025 17:17:15 %S A081789 0,1,3,31,1896,4466398,51545652359935,7892797673015743066290382811, %T A081789 79208317703482281896053478218775642522933780224074809198, %U A081789 195824124605155340760338534459689354174423866004140103635128465652592661899008938733448659610261796713081609084855 %N A081789 Continued cotangent for cos(1). %D A081789 D. H. Lehmer, A cotangent analogue of continued fractions, Duke Math. J., 4 (1935), 323-340. %F A081789 cos(1) = cot(Sum_{n>=0} (-1)^n*acot(a(n))). %F A081789 Let b(0) = cos(1), b(n) = (b(n-1)*floor(b(n-1))+1)/(b(n-1)-floor(b(n-1))) then a(n) = floor(b(n)). %t A081789 Floor[NestList[(#*Floor[#]+1)/(#-Floor[#]) &, Cos[1], 9]] (* _Stefano Spezia_, Apr 23 2025 *) %o A081789 (PARI) bn=vector(100); %o A081789 bn[1]=cos(1); %o A081789 b(n)=if(n<0, 0, bn[n]); %o A081789 for(n=2, 10, bn[n]=(b(n-1)*floor(b(n-1))+1)/(b(n-1)-floor(b(n-1)))); %o A081789 a(n)=floor(b(n+1)); %Y A081789 Cf. A002666, A002667, A002668. %K A081789 nonn %O A081789 0,3 %A A081789 _Benoit Cloitre_, Apr 10 2003