User talk:Mannysardina

Manny, I have decided, after much deliberation, to revert almost exclusively to your text, with minor modifications. These will be clarified in the coming weeks but are already reflected in the article sections Generalized continued fraction and Nth root, and the article Twelfth root of two.

Square root
The square root of y can be expressed by writing y = α2 + ß and beginning with an initial value of -α + 2α, resulting in the continued fractions

$$ \sqrt{y} = \sqrt{\alpha^2+\beta} = -\alpha+2\alpha+\cfrac{\beta}{2\alpha+\cfrac{\beta}{2\alpha+\cfrac{\beta}{2\alpha+\ddots}}} $$

which folds to

$$ = -\alpha+\cfrac{2\alpha\beta}{\beta-\cfrac{\beta^2}{2(2y-\beta)-\cfrac{\beta^2}{2(2y-\beta)-\cfrac{\beta^2}{2(2y-\beta)-\ddots}}}} $$

and

$$ = -\alpha+\cfrac{2\alpha}{1-\cfrac{1}{2(2y/\beta-1)-\cfrac{1}{2(2y/\beta-1)-\cfrac{1}{2(2y/\beta-1)-\ddots}}}}. $$

Why the negative first term works

By starting with the negative of the first term, what remains is converted into a purely periodic continued fraction, as 1+√2 and 1+√3 are:

√2, whose simple continued fraction is [1;2,2,2,2,2,2,...] can be rewritten as -1 + (1+√2), which is equivalent to -1 + [2;2,2,2,2,2,2,...].

√3, whose simple continued fraction is [1;1,2,1,2,1,2,...] can be rewritten as -1 + (1+√3), which is equivalent to -1 + [2;1,2,1,2,1,2,...].

When folding each pair of fractions into a single fraction, keeping the first two terms (-α and +2α) separate from the folding process preserves the purely periodic nature of the resulting continued fraction. As the rest of this article illustrates, the principle also applies to roots beyond the square root.

Cube root
The following generalized continued fraction can compute cube roots with rapid convergence, especially when |α3| > |ß|:

$$ \sqrt[3]{y}=\sqrt[3]{\alpha^3+\beta}=-\alpha+2\alpha+\cfrac{1\beta}{3\alpha^2+\cfrac{2\beta}{2\alpha+\cfrac{4\beta}{9\alpha^2+\cfrac{5\beta}{2\alpha+\cfrac{7\beta}{15\alpha^2+\cfrac{8\beta}{2\alpha+\cfrac{10\beta}{21\alpha^2+\cfrac{11\beta}{2\alpha+\ddots}}}}}}}} $$ $$ =-\alpha+2\alpha+\cfrac{1\beta}{3\alpha^2+\cfrac{\frac{2}{2}\beta}{\frac{2}{2}\alpha+\cfrac{\frac{4}{2}\beta}{9\alpha^2+\cfrac{5\beta}{2\alpha+\cfrac{7\beta}{15\alpha^2+\cfrac{\frac{8}{2}\beta}{\frac{2}{2}\alpha+\cfrac{\frac{10}{2}\beta}{21\alpha^2+\cfrac{11\beta}{2\alpha+\ddots}}}}}}}} $$

which folds to:

$$ -\alpha+\cfrac{2\alpha\beta}{\beta-\cfrac{1 \times 1\beta^2}{3(2y-\beta)-\cfrac{2 \times 4\beta^2}{9(2y-\beta)-\cfrac{5 \times 7\beta^2}{15(2y-\beta)-\cfrac{8 \times 10\beta^2}{21(2y-\beta)-\ddots}}}}}. $$ $$ =-\alpha+\cfrac{2\alpha}{1-\cfrac{\beta}{3(2y-\beta)-\cfrac{2 \times 4\beta^2}{9(2y-\beta)-\cfrac{\frac{5}{5} \times 7\beta^2}{\frac{15}{5}(2y-\beta)-\cfrac{8 \times \frac{10}{5}\beta^2}{21(2y-\beta)-\ddots}}}}}. $$

Further simplification is possible by selectively dividing out 3's and ß's:

$$ \sqrt[3]{y}=\sqrt[3]{\alpha^3+\beta}=-\alpha+2\alpha+\cfrac{1}{3\alpha^2/\beta+\cfrac{{2 \over 2}\alpha+\cfrac{9\alpha^2/\beta+\cfrac{5}{2\alpha+\cfrac{7}{15\alpha^2/\beta+\cfrac{{2 \over 2}\alpha+\cfrac{21\alpha^2/\beta+\cfrac{11}{2\alpha+\ddots}}}}}}}} $$

which folds to:

$$ -\alpha+\cfrac{2\alpha}{1-\cfrac{\frac{1}{3}}{2y/\beta-1-\cfrac{(1^2-(\frac{1}{3})^2)}{3(2y/\beta-1)-\cfrac{\frac{1}{5}(2^2-(\frac{1}{3})^2)}{\frac{5}{5}(2y/\beta-1)-\cfrac{\frac{1}{5}(3^2-(\frac{1}{3})^2)}{7(2y/\beta-1)-\cfrac{(4^2-(\frac{1}{3})^2)}{9(2y/\beta-1)-\ddots}}}}}} $$ $$ \cfrac{(5^2-(\frac{1}{3})^2)}{11(2y/\beta-1)-\cfrac{(6^2-(\frac{1}{3})^2)}{13(2y/\beta-1)-\cfrac{\frac{1}{5}(7^2-(\frac{1}{3})^2)}{\frac{15}{5}(2y/\beta-1)-\cfrac{\frac{1}{5}(8^2-(\frac{1}{3})^2)}{17(2y/\beta-1)-\cfrac{(9^2-(\frac{1}{3})^2)}{19(2y/\beta-1)-\ddots}}}}} $$.

For y2/3, the procedure is similar. Notice the subtle differences, however:

$$ \sqrt[3]{y^2}=\sqrt[3]{(\alpha^3+\beta)^2}=-\alpha^2+2\alpha^2+\cfrac{2\beta}{3\alpha+\cfrac{1\beta}{2\alpha^2+\cfrac{5\beta}{9\alpha+\cfrac{4\beta}{2\alpha^2+\cfrac{8\beta}{15\alpha+\cfrac{7\beta}{2\alpha^2+\cfrac{11\beta}{21\alpha+\cfrac{10\beta}{2\alpha^2+\ddots}}}}}}}} $$ $$ =-\alpha^2+2\alpha^2+\cfrac{2\beta}{3\alpha+\cfrac{1\beta}{2\alpha^2+\cfrac{5\beta}{9\alpha+\cfrac{\frac{4}{2}\beta}{\frac{2}{2}\alpha^2+\cfrac{\frac{8}{2}\beta}{15\alpha+\cfrac{7\beta}{2\alpha^2+\cfrac{11\beta}{21\alpha+\cfrac{\frac{10}{2}\beta}{\frac{2}{2}\alpha^2+\cfrac{\frac{14}{2}\beta}{27\alpha+\cfrac{13\beta}{2\alpha^2+\ddots}}}}}}}}}} $$

which folds to

$$ -\alpha^2+\cfrac{4\alpha^2\beta}{2\beta-\cfrac{2 \times 2\beta^2}{3(2y-\beta)-\cfrac{1 \times 5\beta^2}{9(2y-\beta)-\cfrac{4 \times 8\beta^2}{15(2y-\beta)-\cfrac{7 \times 11\beta^2}{21(2y-\beta)-\cfrac{10 \times 14\beta^2}{27(2y-\beta)-\ddots}}}}}} $$ $$ =-\alpha^2+\cfrac{2\alpha^2}{1-\cfrac{2\beta}{3(2y-\beta)-\cfrac{1 \times 5\beta^2}{9(2y-\beta)-\cfrac{4 \times 8\beta^2}{15(2y-\beta)-\cfrac{\frac{7}{7} \times 11\beta^2}{\frac{21}{7}(2y-\beta)-\cfrac{10 \times \frac{14}{7}\beta^2}{27(2y-\beta)-\ddots}}}}}} $$

Further simplification is possible by selectively dividing out 3's and ß's:

$$ \sqrt[3]{y^2}=\sqrt[3]{(\alpha^3+\beta)^2}=-\alpha^2+2\alpha^2+\cfrac{2}{3\alpha/\beta+\cfrac{1}{2\alpha^2+\cfrac{5}{9\alpha/\beta+\cfrac{{2 \over 2}\alpha^2+\cfrac{15\alpha/\beta+\cfrac{7}{2\alpha^2+\cfrac{11}{21\alpha/\beta+\cfrac{{2 \over 2}\alpha^2+}}}}}}}} $$

which folds to:

$$ -\alpha^2+\cfrac{2\alpha^2}{1-\cfrac{\frac{2}{3}}{2y/\beta-1-\cfrac{(1^2-(\frac{2}{3})^2)}{3(2y/\beta-1)-\cfrac{(2^2-(\frac{2}{3})^2)}{5(2y/\beta-1)-\cfrac{\frac{1}{7}(3^2-(\frac{2}{3})^2)}{\frac{7}{7}(2y/\beta-1)-\cfrac{\frac{1}{7}(4^2-(\frac{2}{3})^2)}{9(2y/\beta-1)-\cfrac{(5^2-(\frac{2}{3})^2)}{11(2y/\beta-1)-}}}}}}} $$ $$ \cfrac{(6^2-(\frac{2}{3})^2)}{13(2y/\beta-1)-\cfrac{(7^2-(\frac{2}{3})^2)}{15(2y/\beta-1)-\cfrac{(8^2-(\frac{2}{3})^2)}{17(2y/\beta-1)-\cfrac{(9^2-(\frac{2}{3})^2)}{19(2y/\beta-1)-\cfrac{\frac{1}{7}(10^2-(\frac{2}{3})^2)}{\frac{21}{7}(2y/\beta-1)-\cfrac{\frac{1}{7}(11^2-(\frac{2}{3})^2)}{23(2y/\beta-1)-}}}}}} $$

Nth root
The generalized continued fraction for the nth root of y is similar to that for the cube root, with this periodic continued fraction pattern:

$$ \sqrt[n]{y}=\sqrt[n]{\alpha^n+\beta}=-\alpha+2\alpha+\cfrac{\beta}{n\alpha^{n-1}+\cfrac{(n-1)\beta}{2\alpha+\cfrac{(n+1)\beta}{3n\alpha^{n-1}+\cfrac{(2n-1)\beta}{2\alpha+\cfrac{(2n+1)\beta}{5n\alpha^{n-1}+\cfrac{(3n-1)\beta}{2\alpha+\cfrac{(3n+1)\beta}{7n\alpha^{n-1}+\cfrac{(4n-1)\beta}{2\alpha+\ddots}}}}}}}} $$

and

$$ -\alpha+2\alpha+\cfrac{1/n}{\alpha^{n-1}/\beta+\cfrac{1-1/n}{2\alpha+\cfrac{1+1/n}{3\alpha^{n-1}/\beta+\cfrac{2-1/n}{2\alpha+\cfrac{2+1/n}{5\alpha^{n-1}/\beta+\cfrac{3-1/n}{2\alpha+\cfrac{3+1/n}{7\alpha^{n-1}/\beta+\cfrac{4-1/n}{2\alpha+\ddots}}}}}}}} $$

which folds to

$$ -\alpha+\cfrac{2\alpha\beta}{\beta-\cfrac{1^2\beta^2}{n(2y-\beta)-\cfrac{(n-1)(n+1)\beta^2}{3n(2y-\beta)-\cfrac{(2n-1)(2n+1)\beta^2}{5n(2y-\beta)-\cfrac{(3n-1)(3n+1)\beta^2}{7n(2y-\beta)-\ddots}}}}} $$

and

$$ -\alpha+\cfrac{2\alpha}{1-\cfrac{(1/n)}{(2y/\beta-1)-\cfrac{1^2-(1/n)^2}{3(2y/\beta-1)-\cfrac{2^2-(1/n)^2}{5(2y/\beta-1)-\cfrac{3^2-(1/n)^2}{7(2y/\beta-1)-\ddots}}}}}. $$

This can be further extended to ym/n:

$$ \sqrt[n]{y^m}=\sqrt[n]{(\alpha^n+\beta)^m}=-\alpha^m+2\alpha^m+\cfrac{m\beta}{n\alpha^{n-m}+\cfrac{(n-m)\beta}{2\alpha^m+\cfrac{(n+m)\beta}{3n\alpha^{n-m}+\cfrac{(2n-m)\beta}{2\alpha^m+\cfrac{(2n+m)\beta}{5n\alpha^{n-m}+\cfrac{(3n-m)\beta}{2\alpha^m+\ddots}}}}}} $$

and

$$ -\alpha^m+2\alpha^m+\cfrac{m/n}{\alpha^{n-m}/\beta+\cfrac{1-m/n}{2\alpha^m+\cfrac{1+m/n}{3\alpha^{n-m}/\beta+\cfrac{2-m/n}{2\alpha^m+\cfrac{2+m/n}{5\alpha^{n-m}/\beta+\cfrac{3-m/n}{2\alpha^m+\ddots}}}}}} $$

which folds to

$$ -\alpha^m+\cfrac{2\alpha^mm\beta}{m\beta-\cfrac{m^2\beta^2}{n(2y-\beta)-\cfrac{(n-m)(n+m)\beta^2}{3n(2y-\beta)-\cfrac{(2n-m)(2n+m)\beta^2}{5n(2y-\beta)-\cfrac{(3n-m)(3n+m)\beta^2}{7n(2y-\beta)-\ddots}}}}} $$

and

$$ -\alpha^m+\cfrac{2\alpha^m}{1-\cfrac{(m/n)}{(2y/\beta-1)-\cfrac{1^2-(m/n)^2}{3(2y/\beta-1)-\cfrac{2^2-(m/n)^2}{5(2y/\beta-1)-\cfrac{3^2-(m/n)^2}{7(2y/\beta-1)-\ddots}}}}}. $$

21/3
Known as the Delian constant:

Unfolded:

$$ \sqrt[3]2 = \sqrt[3]{1^3+1} = -1 + 2 + \cfrac{1}{3 + \cfrac{2}{2 + \cfrac{4}{9 + \cfrac{5}{2 + \cfrac{7}{15 + \cfrac{8}{2 + \cfrac{10}{21 + \cfrac{11}{2 + \ddots}}}}}}}} $$

$$ = -1 + 2 + \cfrac{1}{3 + \cfrac{1}{1 + \cfrac{2}{9 + \cfrac{5}{2 + \cfrac{7}{15 + \cfrac{4}{1 + \cfrac{5}{11 + \cfrac{11}{2 + \ddots}}}}}}}} $$

Folded:

$$ \sqrt[3]2 = -1 + \cfrac{2}{1 + \cfrac{0^2-1^2}{9 - \cfrac{3^2-1^2}{27 - \cfrac{6^2-1^2}{45 - \cfrac{9^2-1^2}{63 - \cfrac{12^2-1^2}{81 - \ddots}}}}}} $$

$$ = -1 + \cfrac{2}{1 - \cfrac{1}{9 - \cfrac{8}{27 - \cfrac{\frac{35}{5}}{\frac{45}{5} - \cfrac{\frac{80}{5}}{63 - \cfrac{143}{81 - \ddots}}}}}} $$

with convergents (reduced to lowest terms)

$$ \cfrac{-1}{1}; \cfrac{1}{1}; \cfrac{5}{4}; \cfrac{131}{104}; \cfrac{286}{227}; \cfrac{17,494}{13,885}; \cfrac{49,147}{39,008}; \cfrac{4,725,601}{3,750,712}; \dots $$

4 x 21/3:

Unfolded:

$$ \sqrt[3]{128} = \sqrt[3]{5^3+3} = -5 + 10 + \cfrac{3}{75 + \cfrac{6}{10 + \cfrac{12}{225 + \cfrac{15}{10 + \cfrac{21}{375 + \cfrac{24}{10 + \ddots}}}}}} $$

$$ = -5 + 10 + \cfrac{1}{25 + \cfrac{2}{10 + \cfrac{4}{75 + \cfrac{5}{10 + \cfrac{7}{125 + \cfrac{8}{10 + \cfrac{10}{175 + \cfrac{11}{10 + \ddots}}}}}}}} $$

$$ = -5 + 10 + \cfrac{1}{25 + \cfrac{1}{5 + \cfrac{2}{75 + \cfrac{5}{10 + \cfrac{7}{125 + \cfrac{4}{5 + \cfrac{5}{175 + \cfrac{11}{10 + \ddots}}}}}}}} $$

Folded:

$$ \sqrt[3]{128} = -5 + \cfrac{30}{3 + \cfrac{-9}{759 - \cfrac{72}{2277 - \cfrac{315}{3795 - \cfrac{720}{5313 - \cfrac{1287}{6831 - \ddots}}}}}} $$

$$ = -5 + \cfrac{10}{1 - \cfrac{1}{253 - \cfrac{8}{759 - \cfrac{35}{1265 - \cfrac{80}{1771 - \cfrac{143}{2277 - \ddots}}}}}} $$

$$ = -5 + \cfrac{10}{1 - \cfrac{1}{253 - \cfrac{8}{759 - \cfrac{\frac{35}{5}}{\frac{1265}{5} - \cfrac{\frac{80}{5}}{1771 - \cfrac{143}{2277 - \ddots}}}}}} $$

with convergents (reduced to lowest terms)

$$ \cfrac{-5}{1}; \cfrac{5}{1}; \cfrac{635}{126}; \cfrac{96,389}{19,126}; \cfrac{30,481,910}{6,048,377}; \cfrac{53,981,534,830}{10,711,293,147}; \cfrac{399,063,623,035}{79,184,251,876}; \dots $$

By dividing each by 4, we get this rapidly-converging continued fraction for 21/3:

$$ \sqrt[3]{2} = \frac{-5}{4} + \cfrac{\frac{5}{2}}{1 - \cfrac{1}{253 - \cfrac{8}{759 - \cfrac{\frac{35}{5}}{\frac{1265}{5} - \cfrac{\frac{80}{5}}{1771 - \cfrac{143}{2277 - \ddots}}}}}} $$

with convergents (reduced to lowest terms)

$$ \cfrac{-5}{4}; \cfrac{5}{4}; \cfrac{635}{504}; \cfrac{96,389}{76,504}; \cfrac{15,240,955}{12,096,754}; \cfrac{26,990,767,415}{21,422,586,294}; \cfrac{399,063,623,035}{316,737,007,504}; \dots $$

22/3
Unfolded:

$$ \sqrt[3]{2^2} = \sqrt[3]{(1^3+1)^2} = -1 + 2 + \cfrac{2}{3 + \cfrac{1}{2 + \cfrac{5}{9 + \cfrac{4}{2 + \cfrac{8}{15 + \cfrac{7}{2 + \cfrac{11}{21 + \cfrac{10}{2 + \cfrac{14}{27 + \cfrac{13}{2 + \ddots}}}}}}}}}} $$

$$ = -1 + 2 + \cfrac{2}{3 + \cfrac{1}{2 + \cfrac{5}{9 + \cfrac{2}{1 + \cfrac{4}{15 + \cfrac{7}{2 + \cfrac{11}{21 + \cfrac{5}{1 + \cfrac{7}{27 + \cfrac{13}{2 + \ddots}}}}}}}}}} $$

Folded:

$$ \sqrt[3]{2^2} = -1 + \cfrac{4}{2 + \cfrac{-4}{9 - \cfrac{5}{27 - \cfrac{32}{45 - \cfrac{77}{63 - \cfrac{140}{81 - \ddots}}}}}} $$

$$ = -1 + \cfrac{2}{1 - \cfrac{\frac{4}{2}}{9 - \cfrac{5}{27 - \cfrac{32}{45 - \cfrac{\frac{77}{7}}{\frac{63}{7} - \cfrac{\frac{140}{7}}{81 - \ddots}}}}}} $$

21/12
See the article Twelfth root of two for its significance.


 * $$\sqrt[12]2 = -1 + 2 + \cfrac{1}{12 + \cfrac{11}{2 + \cfrac{13}{36 + \cfrac{23}{2 + \cfrac{25}{60 +\cfrac{35}{2 + \cfrac{37}{84+ \cfrac{47}{2 + \ddots}}}}}}}} = -1 + \cfrac{2}{1 - \cfrac{1}{36 - \cfrac{12^2-1}{108 - \cfrac{24^2-1}{180 - \cfrac{36^2-1}{252 - }}}}}$$

1001/5
Also called "Pogson's Ratio" ≈ 2.511886.... See the article Norman Robert Pogson for its significance.

To calculate it, it's easier to start with 2 x 1001/5 = 32001/5:


 * $$ \sqrt[5]{3200} = \sqrt[5]{5^5 + 75} = -5 + 10 + \cfrac{3}{125 + \cfrac{12}{10 + \cfrac{18}{375 + \cfrac{27}{10 + \cfrac{33}{625 + \cfrac{42}{10 + \cfrac{48}{875 + \cfrac{57}{10 + \cfrac{63}{1125 + \cfrac{72}{10 + \ddots}}}}}}}}}} $$
 * $$ = -5 + \cfrac{10}{1 - \cfrac{3}{1265 - \cfrac{15^2-3^2}{3795 - \cfrac{30^2-3^2}{6325 - \cfrac{45^2-3^2}{8855 - \cfrac{60^2-3^2}{11385 - \ddots}}}}}} $$

Now divide by two:


 * $$ \sqrt[5]{100} = \sqrt[5]{2.5^5 + 75/2^5} = -2.5 + 5 + \cfrac{3}{250 + \cfrac{24}{10 + \cfrac{18}{375 + \cfrac{27}{10 + \cfrac{33}{625 + \cfrac{42}{10 + \cfrac{48}{875 + \cfrac{57}{10 + \ddots}}}}}}}} $$
 * $$ = -2.5 + \cfrac{5}{1 - \cfrac{3}{1265 - \cfrac{15^2-3^2}{3795 - \cfrac{30^2-3^2}{6325 - \cfrac{45^2-3^2}{8855 - \cfrac{60^2-3^2}{11385 - \ddots}}}}}} $$

27/12
Equal temperament's perfect fifth ≈ 1.498307...:

(A) "Standard notation" with m=7:



\sqrt[12]{2^7} = 1+\cfrac{7} {12+\cfrac{5} {2+\cfrac{19} {36+\cfrac{17} {2+\cfrac{31} {60+\cfrac{29} {2+\cfrac{43} {84+\cfrac{41} {2+\ddots}}}}}}}} = 1+\cfrac{2 \cdot 7} {36-7 - \cfrac{5 \cdot 19} {108-\cfrac{17 \cdot 31} {180-\cfrac{29 \cdot 43} {252-\cfrac{41 \cdot 55} {324-\ddots}}}}}. $$

(B) More rapid convergence. To calculate it, it's easier to start with 2 x 27/12 = 5242881/12:


 * $$ \sqrt[12]{2^{19}} = \sqrt[12]{3^{12} - 7153} = 3 - \cfrac{7153}{4\cdot 3^{12} - \cfrac{11\cdot 7153}{6 - \cfrac{13\cdot 7153}{12\cdot 3^{12} - \cfrac{23\cdot 7153}{6 - \cfrac{25\cdot 7153}{20\cdot 3^{12} - \cfrac{35\cdot 7153}{6 - \cfrac{37\cdot 7153}{28\cdot 3^{12} - \cfrac{47\cdot 7153}{6 - \ddots}}}}}}}} $$
 * $$ = 3 - \cfrac{6\cdot 7153}{12(2^{20}+7153)+7153 - \cfrac{11\cdot13\cdot7153^2}{36(2^{20}+7153) - \cfrac{23\cdot25\cdot7153^2}{60(2^{20}+7153) - \cfrac{35\cdot37\cdot7153^2}{84(2^{20}+7153) - \ddots}}}}. $$

Now divide by two:


 * $$ \sqrt[12]{2^7} = \sqrt[12]{1.5^{12} - 7153/2^{12}} = \cfrac{3}{2} - \cfrac{7153}{8\cdot 3^{12} - \cfrac{22\cdot 7153}{6 - \cfrac{13\cdot 7153}{12\cdot 3^{12} - \cfrac{23\cdot 7153}{6 - \cfrac{25\cdot 7153}{20\cdot 3^{12} - \cfrac{35\cdot 7153}{6 - \cfrac{37\cdot 7153}{28\cdot 3^{12} - \cfrac{47\cdot 7153}{6 - \ddots}}}}}}}} $$
 * $$ = \cfrac{3}{2} - \cfrac{3\cdot 7153}{12(2^{20}+7153)+7153 - \cfrac{11\cdot13\cdot7153^2}{36(2^{20}+7153) - \cfrac{23\cdot25\cdot7153^2}{60(2^{20}+7153) - \cfrac{35\cdot37\cdot7153^2}{84(2^{20}+7153) - \ddots}}}}. $$

— Glenn L (talk) 09:50, 12 November 2010 (UTC)