%I #11 Jan 19 2021 21:28:47
%S 1,1,3,2,4,3,7,5,17,12,24,17,41,29,99,70,140,99,239,169,577,408,816,
%T 577,1393,985,3363,2378,4756,3363,8119,5741,19601,13860,27720,19601,
%U 47321,33461,114243,80782,161564,114243,275807,195025,665857,470832,941664,665857,1607521,1136689,3880899,2744210
%N The next smallest pair of numbers is taken so that a(2n-1)/a(2n) converges to sqrt(2).
%C "Next smallest" means that a(2n-1)+a(2n) is the smallest value that is greater than the previous pair.
%e abs(1/1-sqrt(2)) > abs(3/2-sqrt(2)) > abs(4/3-sqrt(2)) > abs(7/5-sqrt(2)) > abs(17/12-sqrt(2)) > ... > 0.
%t AproximaRaiz2Vector[it_] := (
%t error = 1;
%t itactual = 0;
%t d = 1;
%t Lista = {};
%t While[itactual < it,
%t n = Floor[Sqrt[2]*d];
%t erroract = Abs[n/d - Sqrt[2]];
%t If[erroract < error, error = erroract; itactual++;
%t Print[n, "/", d, " = ", n/d + .0, " - E: ",
%t Abs[n/d - Sqrt[2]] + .0]; Lista = Append[Lista, n];
%t Lista = Append[Lista, d]];
%t n++;
%t erroract = Abs[n/d - Sqrt[2]];
%t If[erroract < error, error = erroract; itactual++;
%t Print[n, "/", d, " = ", n/d + .0, " - E: ",
%t Abs[n/d - Sqrt[2]] + .0]; Lista = Append[Lista, n];
%t Lista = Append[Lista, d]];
%t d++;
%t ];
%t Lista
%t ); (* _Maximiliano Alba_, Jan 19 2021 *)
%K nonn
%O 1,3
%A _Bodo Zinser_, Nov 22 2001
%E Corrected and extended by _Maximiliano Alba_, Jan 19 2021
|