<p>Dear Max -</p><br>>You've got wrong impression.<br><br>I don't mind to be corrected but this time I just was quoting what the entry in the <br><a href="http://en.wikipedia.org/wiki/Continued_fraction">http://en.wikipedia.org/wiki/Continued_fraction
</a> wiki says.<br>Perhaps you have not looked yourself at it directly <br>(now I copied ant pasted it below for your viewing pleasure ).<br><br>Max -  if you feel that discussed wiki entry incorrect - please do go ahead and correct it.
<br><br>Regards,<br>Alex<br><br>PS Could you please show your PARI/GP results in generating last two variants (as shown /pasted below) using contfrac() with additional argument ?<br>----------------------------------------------------------------------------------
<br>....<br><br><p>This continued fraction is unpredictable and <span style=""></span><span style="background-color: rgb(204, 0, 0);"></span><span style="color: rgb(0, 0, 0); background-color: rgb(204, 0, 0);">irregu<span style="background-color: rgb(255, 0, 0);">
</span>lar:<span style="background-color: rgb(204, 0, 0);"></span></span></p>
<dl><dd><img class="tex" alt="\pi = 3 + \cfrac{1}{7 + \cfrac{1}{15 + \cfrac{1}{1 + \cfrac{1}{292 + \cfrac{1}{1 + \cfrac{1}{1 + \cfrac{1}{1 + \cfrac{1}{2 + \cfrac{1}{\ddots}}}}}}}}}" src="http://upload.wikimedia.org/math/8/0/5/805cbffdd561d9f567b02f3a7f8380e3.png">
</dd></dl>
<p>However, there are perfectly <span style="background-color: rgb(255, 0, 0);">regular</span> generalized continu<span style="background-color: rgb(255, 255, 255);"></span>ed fractions for ð, such as:</p>
<dl><dd><img class="tex" alt="\pi = \cfrac{4}{1 + \cfrac{1}{3 + \cfrac{4}{5 + \cfrac{9}{7 + \cfrac{16}{9 + \cfrac{25}{11 + \cfrac{36}{13 + \cfrac{49}{\ddots}}}}}}}}" src="http://upload.wikimedia.org/math/a/c/3/ac36499053d43d4ecd46a4624c0a05b2.png">
</dd></dl>
<dl><dd><img class="tex" alt="\pi=3 + \cfrac{1}{6 + \cfrac{9}{6 + \cfrac{25}{6 + \cfrac{49}{6 + \cfrac{81}{6 + \cfrac{121}{\ddots\,}}}}}}" src="http://upload.wikimedia.org/math/e/3/a/e3a7f034dc4b2272e35826fd4844228a.png">
</dd></dl>
<p>where each of the numerators is an <a href="http://en.wikipedia.org/wiki/Odd_number" title="Odd number">odd number</a> <a href="http://en.wikipedia.org/wiki/Squaring" title="Squaring">squared</a>.</p><br><br><div class="gmail_quote">
On Dec 28, 2007 12:41 PM, Max Alekseyev <<a href="mailto:maxale@gmail.com">maxale@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Dec 28, 2007 8:01 AM, Alexander Povolotsky <<a href="mailto:apovolot@gmail.com">apovolot@gmail.com</a>> wrote:<br><br>> <a href="http://en.wikipedia.org/wiki/Continued_fraction" target="_blank">
http://en.wikipedia.org/wiki/Continued_fraction</a><br>><br>> shows two variants of "regular" continuous (continued)  fraction expansion<br>> for Pi where numerators in fractions are squares (either all consecutive
<br>> squares in one variant or consecutive odd squares in another variant).<br><br></div>You've got wrong impression. Regular continued fractions have all<br>partial numerators equal 1. All other continued fractions are
<br>irregular.<br><div class="Ih2E3d"><br>> However executing contfrac(Pi) only shows "irregular" continuous (continued)<br>> fraction expansion for Pi.<br><br></div>That's not true. contfrac(x) returns regular continued fraction of
<br>given number x.<br>For Pi, it is shown on this figure:<br><a href="http://upload.wikimedia.org/math/8/0/5/805cbffdd561d9f567b02f3a7f8380e3.png" target="_blank">http://upload.wikimedia.org/math/8/0/5/805cbffdd561d9f567b02f3a7f8380e3.png
</a><br>You may have been misled by the word "irregular" in its description in<br>wikipedia but there this word characterizes not the form of continued<br>fraction but the sequence of partial denominators in it. There is not
<br>obvious rule or formula for them, hence, they appear to be rather<br>"irregular".<br><br>On the other hand, one of possible irregular continued fractions for Pi is:<br><a href="http://upload.wikimedia.org/math/a/c/3/ac36499053d43d4ecd46a4624c0a05b2.png" target="_blank">
http://upload.wikimedia.org/math/a/c/3/ac36499053d43d4ecd46a4624c0a05b2.png</a><br>where the sequence of partial denominators is simply all odd positive<br>integers, hence, *this sequence* (not the form of ontinued fractions)
<br>is somewhat regular.<br><div class="Ih2E3d"><br>> Is there a (desirably simple) PARI/GP way to generate desired (as mentioned<br>> above) "regular" continuous (continued)  fraction expansion for Pi ?<br>
<br></div>If you want to have a particular sequence of partial numerators,<br>simply provide it as a second argument to contfrac().<br><br>Regards,<br><font color="#888888">Max<br></font></blockquote></div><br>