|
挑战一下(好玩)!对于同一个“n”来说,下面的算法永远是成立的?举个反例??还有更好的吗???
\(\big(\frac{n+1}{n}\big)^n<\big(\frac{2n^3+n^2-2}{2n^3-n^2+2}\big)^n< e<\big(\frac{2n+1}{2n-1}\big)^n<\big(\frac{n}{n-1}\big)^n\)
“n”=4,5,6,7,8,9,......
(1), 大部分教科书的算法。Table[N[((n + 1)/n)^n, n/3], {n, 4, 19}]
2., 2.5, 2.5, 2.5, 2.57, 2.58, 2.59, 2.604, 2.613, 2.621, 2.6272, 2.6329, 2.6379, 2.64241,2.64643,2.65003
(2), 挑战算法。Table[N[((2 n^3 + n^2 - 2)/(2 n^3 - n^2 + 2))^n, n/3], {n, 4, 19}]
2., 2.5, 2.6, 2.6, 2.64, 2.65, 2.67, 2.675, 2.682, 2.688, 2.6918, 2.6952, 2.6980, 2.70030,2.70224,2.70388
(3), 标准答案: Table[N[E, n/3], {n, 4, 19}]
3., 2.7, 2.7, 2.7, 2.72, 2.72, 2.72, 2.718, 2.718, 2.718, 2.7183, 2.7183, 2.7183, 2.71828,2.71828,2.71828
(4), 挑战算法。Table[N[((2 n + 1)/(2 n - 1))^n, n/3], {n, 4, 19}]
3., 2.7, 2.7, 2.7, 2.72, 2.72, 2.72, 2.720, 2.720, 2.720, 2.7194, 2.7193, 2.7192, 2.71907,2.71898,2.71891
(5), 大部分教科书的算法。Table[N[(n/(n - 1))^n, n/3], {n, 4, 19}]
3., 3.1, 3.0, 2.9, 2.91, 2.89, 2.87, 2.853, 2.841, 2.831, 2.8222, 2.8148, 2.8084, 2.80280,2.79785,2.79345
“n”=10^n
(1), 大部分教科书的算法。Table[N[((10^n + 1)/10^n)^10^n, 2 n], {n, 1, 8}]
2.6,2.705,2.71692,2.7181459,2.718268237,2.71828046932,2.7182816925450,2.718281814867636,
(2), 挑战算法。Table[N[((2*10^(3 n)+10^(2n)-2)/(2*10^(3 n)-10^(2n)+2))^10^n, 2 n], {n, 1, 8}]
2.7,2.718,2.71828,2.7182818,2.718281828,2.71828182845,2.7182818284590,2.718281828459045,
(3), 标准答案: Table[N[E, 2 n], {n, 1, 8}]
2.7,2.718,2.71828,2.7182818,2.718281828,2.71828182846,2.7182818284590,2.718281828459045,
(4), 挑战算法。Table[N[((2*10^n + 1)/(2*10^n - 1))^10^n, 2 n], {n, 1, 8}]
2.7,2.718,2.71828,2.7182818,2.718281828,2.71828182846,2.7182818284590,2.718281828459045,
(5), 大部分教科书的算法。Table[N[(10^n/(10^n - 1))^10^n, 2 n], {n, 1, 8}]
2.9,2.732,2.71964,2.7184178,2.718295420,2.71828318760,2.7182819643731,2.718281842050455, |
|