How to find the terminating value of the continued fractions S=3−2/(3−2/(3−2/(... by writing a recurrence relation in Python? (Start from any guess value other than 1.)
Asked
Active
Viewed 117 times
0
-
How did _you_ attempt to solve it and where exactly are you facing issues? – ForceBru Apr 02 '20 at 13:02
-
1You have `S=3-2/S` or `S^2-3*S+2=0` which can be solved as quadratic equation. And indeed the solutions are `S=1` and `S=2`. I'm not sure if you can prove convergence of these non-standard continued fractions, what would the partial fractions be? – Lutz Lehmann Apr 02 '20 at 13:03
-
@LutzLehmann but how to make it python code? – Lusypher Apr 02 '20 at 13:04
-
How do you get the infinite sequence encoded as python-suitable input? Do you only consider expressions of that pattern or generalized continued fraction with any period in the coefficients, or even irregular coefficient sequences? That should then also answer how to get a solution. – Lutz Lehmann Apr 02 '20 at 13:06
-
@LutzLehmann infinite sequence encoded as puthon-suitable input. – Lusypher Apr 02 '20 at 13:10
-
Yes. How do you do it. If there was a function `cont_frac_value(sequence)`, how do you imagine you would call it? – Lutz Lehmann Apr 02 '20 at 13:16