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 A273580 #20 Mar 19 2017 19:33:52 %S A273580 2,5,2,9,5,4,3,3,2,6,2,2,0,3,9,8,4,3,0,3,1,0,3,7,9,1,2,8,8,5,9,7,5,3, %T A273580 3,3,5,1,9,3,5,3,7,1,2,4,4,5,9,3,8,3,4,1,7,8,6,5,7,1,8,7,1,1,3,9,6,7, %U A273580 3,0,9,4,6,5,4,0,4,8,7,4,8,2,5,3,1,0,3,3,5,4,4,6,0,7,2,1,5,0,0,2,3,8,9,3,3 %N A273580 Decimal expansion of the infinite nested radical sqrt(F_0 + sqrt(F_1 + sqrt(F_3 + ...))), where F_k are the Fermat numbers A000215. %C A273580 The convergence of this expression follows from Vijayaraghavan's theorem, for which it represents an extreme example. %C A273580 Two PARI programs to compute this constant are listed below. The first one is a brute-force implementation of the definition and allows the computation of only 13 digits before exceeding current PARI capabilities. The second one implements the following 'trick' inspired by a comment in A094885: Let us try to compute first x = a/sqrt(2). We have x = (1/sqrt(2))sqrt(3+ sqrt(5+ sqrt(17+ ... ))) = sqrt(3/2+ (1/2)sqrt(5+ sqrt(17+ ... ))) = sqrt(3/2+ sqrt(5/4+ (1/4)sqrt(17+ ... ))) = sqrt(3/2+ sqrt(5/4+ sqrt(17/16+ ... ))) = sqrt(c_0+sqrt(c_1+sqrt(c_3+...))), where c_n = (2^(2^n)+1)/2^(2^n) = 1+d_n, with d_n = 2^(-2^n). This nested radical is easy to manage to any precision. However, evaluating it up to N terms, its convergence with increasing N is no better than that of the original algorithm. To speed it up, one must notice that, since the c_n converge rapidly to 1, and since the nested radical sqrt(1+sqrt(1+...)) evaluates to the golden ratio phi (A001622), the latter is the natural best stand-in for the neglected part (terms from N+1 to infinity). With this modification, i.e., 'seeding' the iterations with phi instead of 0, the convergence becomes extremely fast (the number of valid digits more than doubles upon incrementing N by 1). %H A273580 Stanislav Sykora, <a href="/A273580/b273580.txt">Table of n, a(n) for n = 1..2000</a> %F A273580 Equals sqrt(2)*sqrt(1+1/2+sqrt(1+1/4+sqrt(1+1/16+sqrt(1+1/256+ ... )))). %e A273580 2.5295433262203984303103791288597533351935371244593834178657187113967... %o A273580 (PARI) /* This function crashes PARI beyond N=28: */ %o A273580 s(N)={my(r=0.0);for(k=1,N,r=sqrt(2^(2.0^(N-k))+1+r));return(r)} %o A273580 /* N is the number of terms to include in the evaluation. It turns out that the starting digits s(28) shares with s(27) are only 13 */ %o A273580 (PARI) /* This alternative can easily generate millions of digits: */ %o A273580 d=vector(30);d[1]=0.5;for(n=2,#d,d[n]=d[n-1]^2); %o A273580 S(N)={my(r=(1+sqrt(5))/2);for(k=1,N,r=sqrt(1+d[N-k+1]+r));return(r*sqrt(2))} %o A273580 /* S(12) exceeds 1200 stable digits, S(20) goes over 150000. For the b-file, the first 2000 digits of S(13) were used, computed with the realprecision of 2100 digits */ %Y A273580 Cf. A000215, A001622, A094885. %K A273580 nonn,cons %O A273580 1,1 %A A273580 _Stanislav Sykora_, May 25 2016