Message Boards Message Boards

0
|
2312 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

What rule links infinite periodic continued fractions?

Posted 1 year ago

Subject: Infinite periodic continued fractions & their equivalent fractions of the format A/(B+√C).

The equations in question:

continuedfraction{0;{a}} = 2/(a+√(4+a2))

continuedfraction{0;{a,b}} = 2b/(ab+√(ab(4+ab)))

continuedfraction{0;{a,b,c}} = 2(1+bc))/(-b+c+a+(abc)+√((b−c−a−(abc))²–(4(1+(bc))(−1−ba))))

continuedfraction{0;{a,b,c,d}} = (2(d+bcd+b))/((cd)+(ad)+(bcad)-(bc)+(ab)+√((−(cd)−(ad)—(bcad)+(bc)−(ba))²−4(−c−a−(bac))(d+(bcd)+b)))

continuedfraction{0;{a,b,c,d,f}} = 2(df+bdcf+bf+1+bc)/(-d-bcd+dcf+adf+bcadf+f+baf-b+c+a+bac+√((d+bcd-dcf-adf-bcadf-f-baf+b-c-a-bca)²-4(-cd—ad—bcad—1—ba)(df+bdcf+bf+1+bc)))

https://www.desmos.com/calculator/ezxy7sfowu

What I'm doing: I am looking for an understanding of infinite continued fractions with repeating periodic blocks such as x=[0;a,b,a,b,a,b,...] and x=[0;a,b,c,a,b,c,a,b,c,...].

Why I am doing it: It may not be immediately obvious, but the equations above are of the format A/(B+√C), and that's what I was going for. If you search 0.26556443707 on WolframAlpha, it will tell you this number is equal to a truncation of ∞CF[0;{3,1,3}], and it will tell you this CF is equivalent to a calculation of 4/(7 + sqrt(65)) or 1/4 (sqrt(65) - 7). But what is that? Where did that 4 7 & 65 come from? What links this equivalence to ∞CF[0;{4,5,6}] being equal to a calculation of 62/(125 + sqrt(18229))? I wanted a look at the underlying mechanism.

How I started: Getting to that first equation was a slog through tables of curves, described here: https://twitter.com/hezooss/status/1556361128313344025 .
This was a horrible process, but it gave me the first two equations.

While attempting to start something similar with 3 variables, I came up with a shortcut: I couldn't ask Wolfram Alpha continuedfraction{0;{a,b}}, but I could ask it continuedfraction{0;{pi,e}}, and then swap pi and e out for a and b in the resulting equation. For more variables, I just had to use more transcendental constants and switch them out. That's how I got the rest of the equations.

So, is it useful? Well, I think so. I was having a look at that nice old problem “divide 10 into two parts, the product of which is 40”. While I haven't yet managed that problem as I was planning (without complex numbers), I came across a number, −3.26556443707. As mentioned above, 0.23844795843 is a truncation of ∞CF[0;{3,1,3}], so I made use of the relevant equation to get this number into Desmos: https://www.desmos.com/calculator/kzuo5c5tvf

I then used these equations to make a crude calculator.
https://www.desmos.com/calculator/txhbonn6kc

I say it's crude because the simplification process used is imperfect, as you can see if you change list a to [2,3], and note that the simplified fraction is not the same as when a=[2,3,2,3]. The simplification was never the point, but I'd be happy to be shown where I went wrong. I suspect the problem might be in the (mis)use of the gcd function. It is also probably crude that I made this file before having the rule.

I am looking for help in finding the rule linking the equations so that I can evaluate ∞CFs with more and more repeated variables. I could use Wolfram to work out the equation to use for 6 repeating variables, but I wasn't sure it would help, and I'd prefer to see and then use the rule. I did note that these equations appear to be related to the quadratic formula moved up a level as an extra variable is added.

Comments/assistance/collaboration most welcome.

POSTED BY: Marc Schofield
3 Replies

I regret my question came across as vague. Thank you very much for this reply, I am very glad to have your answer to study. When asking the same question, I was advised on Reddit that "Every infinite periodic continued fraction gives rise to a quadratic equation, one of whose roots is the value of the fraction" and that this positive root might "be expressed using a recurrence, in exactly the same way that you can get continued fraction convergents using a recurrence." I was aware of how CFs can be truncated and their convergents given an equation, but as you noted, I wanted to study the infinite values, before I consider such truncations. Your answer has made a lot of sense to me (phew!) and I'm sure it will continue to do so more as I study it. Thank you again.

POSTED BY: Marc Schofield

I don't really understand the question being asked. I can point to a couple of solving methods that one might use to resolve infinite CFs into quadratic algebraics (which is what they are).

I'll work with the provided example of repeating {3,1,3}. As stated, this value is (7+sqrt(16))/4.

In[352]:= FromContinuedFraction[{{3, 1, 3}}]

(* Out[352]= 1/4 (7 + Sqrt[65]) *)

So how might one come by this computationally? One way is to solve it as a recurrence, then extract the limiting value. I start at 15/4 since (per below) that's one of the early CF results.

1/(1/(3 + 1/(1 + 1/(3))))

(* Out[342]= 15/4 *)

nthterm = 
 RSolveValue[{r[n + 1] == 1/(1/(3 + 1/(1 + 1/(3 + 1/r[n])))),  r[0] == 15/4}, r[n], n]

(* Out[345]= (-121 (32 - 4 Sqrt[65])^n + 
   15 Sqrt[65] (32 - 4 Sqrt[65])^n + 121 (32 + 4 Sqrt[65])^n + 
   15 Sqrt[65] (32 + 4 Sqrt[65])^
    n)/(4 (-8 (32 - 4 Sqrt[65])^n + Sqrt[65] (32 - 4 Sqrt[65])^n + 
     8 (32 + 4 Sqrt[65])^n + Sqrt[65] (32 + 4 Sqrt[65])^n)) *)

Limit[nthterm, n -> Infinity]

(* Out[346]= 1/4 (7 + Sqrt[65]) *)

Another method is to compute the limiting value directly by solving an equation that says, in effect, that the new value equals the old value at infinity (more correctly, it's a fixed point of the iteration).

Select[
 rinf /. Solve[rinf == 1/(1/(3 + 1/(1 + 1/(3 + 1/rinf)))), rinf], # > 
   0 &]

(* Out[351]= {1/4 (7 + Sqrt[65])} *)

The process above might also suggest how it is that these resolve to quadratic irrationals. In particular, note that rinf - 1/(1/(3 + 1/(1 + 1/(3 + 1/rinf)))) in Together'd form will have a quadratic numerator.

POSTED BY: Daniel Lichtblau

In case it does help,

continuedfraction(0;{a,b,c,d,f,g}) = (2(gdf+bcgdf+bgf+g+bcg+d+bcd+b))/(cgdf+agdf+bcagdf+gf+bagf+cg+ag+bcag-df-bcdf-bf+cd+ad+bcad-bc+ba+sqrt((-cgdf-agdf-bcagdf-gf-bagf-cg-ag-bcag+df+bcdf+bf-cd-ad-bcad+bc-ba)^2-4(-cdf-adf-bcadf-f-baf-c-a-bca)(gdf+bcgdf+bgf+g+bcg+d+bcd+b)))

In this case, to see the above as A/(B+sqrt(C))

A=(2(gdf+bcgdf+bgf+g+bcg+d+bcd+b))

B=cgdf+agdf+bcagdf+gf+bagf+cg+ag+bcag-df-bcdf-bf+cd+ad+bcad-bc+ba

C=-cgdf-agdf-bcagdf-gf-bagf-cg-ag-bcag+df+bcdf+bf-cd-ad-bcad+bc-ba)^2-4(-cdf-adf-bcadf-f-baf-c-a-bca)(gdf+bcgdf+bgf+g+bcg+d+bcd+b)))
POSTED BY: Marc Schofield
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract