Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I got this formula for the square root of 2 published in the OEIS:
- sqrt(2) = lim_{n->infinity}(1/(1-Sum_{k=1..n}(((-1)^(k-1)*binomial(n-1, k-1))/f(k/n+s-1/n))/Sum_{k=1..n}(((-1)^(k-1)*binomial(n-1, k-1))/f(k/n + s)))+s)
- where f(x)=x^2-2 and s=1.
- =1.41421356237309504880168872420969807857...
- (* Mathematica start *)
- Clear[f,s,n,k];
- f[x_] := x^2 - 2;
- s = 0;
- n = 1000;
- N[(1/(1 -
- Sum[((-1)^(k - 1)*Binomial[n - 1, k - 1])/f[k/n + s - 1/n], {k,
- 1, n}]/Sum[((-1)^(k - 1)*Binomial[n - 1, k - 1])/
- f[k/n + s], {k, 1, n}]) + s), 40]
- f[%]
- (* Mathematica end *)
- The convergence
- depends on the choice of the seed point "s=0" and the number of iterations "n=1000".
- f[x_] := x^2 - 2 is the function whose root is searched for.
- It would be interesting to know which functions are solvable
- by this convergent or nonconvergent ratio for the choice of seed point "s=0".
Add Comment
Please, Sign In to add comment