Questions tagged [continued-fractions]
30 questions
8
votes
5 answers
How can I write Mathematica code for this continued fraction with alternating terms?
$$\varphi+\cfrac{1}{\varphi^{-1}+\cfrac{1}{\varphi+\cfrac{1}{\varphi^{-1}+\cfrac{1}{\varphi+\cdots}}}}$$
I saw this continued fraction on Facebook. I need the Mathematica code for this using continued fraction or Nest or Fold. Normal continued…
Shivam K
- 301
- 2
- 8
5
votes
2 answers
How to calculate this function
Please, I would like to calculate this function which contains an infinite continued fraction
f[y_]=1/(1 + ContinuedFractionK[-(((n + 1) (n + 3))/((2 n + 3) (2 n + 5))) y^2 A, 1, {n, 0, Infinity}])
But no results, Mathematica returns the same…
Majorana
- 51
- 5
3
votes
1 answer
Can Mathematica evaluate a continued fraction using Gauss's $K$ operator?
I don't know a whole lot about Mathematica, and this is a fairly uncommon notation, so here goes:
How do I tell Mathematica to evaluate this? $$1+\underset{i=1}{\overset{\infty}{K}}\frac{(-1)^{i-1}}{i+1}$$
where…
Micah Windsor
- 133
- 6
3
votes
3 answers
Potential bug : missing terms in ContinuedFraction
If I use 0.23 instead of 23/100, the last continued fraction coefficient (7) is not given:
target = 23/100;
ContinuedFraction[target] (* {0,4,2,1,7} *)
ContinuedFraction[N[target]] (* {0,4,2,1} *)
FromContinuedFraction[%] (* 3/13…
mathheadinclouds
- 865
- 5
- 12
2
votes
2 answers
Representing a general continued fraction in a list for ContinuedFraction
The initial mathematical problem is to solve for $x$ in:
$$x = \sqrt{19} + \frac{91}{\sqrt{19} + \frac{91}{\sqrt{19} + \frac{91}{\sqrt{19} + \frac{91}{\sqrt{19} + \frac{91}{x}}}}}$$
(Notice the $x$ in the right-hand-side.)
The following direct…
David G. Stork
- 41,180
- 3
- 34
- 96
2
votes
1 answer
Deriving formulas for continued fraction expansions
A version of a continued fraction expansion of a rational number $r\in \mathbb Q$ is defined as
\begin{align}
r =[a_0,a_1,a_2,\ldots,a_k]= a_0 - \frac{1}{a_1 - \frac{1}{a_2 - \dots - \tfrac{1}{a_k}}}
\end{align}
for integers $a_i\leq-2$.
For some…
Marc Kegel
- 121
- 3
2
votes
3 answers
Truncate an infinite continued fraction at order 2000
I want to solve an equation which contains an infinite continued fraction $F(n)$. Then I must (obviously) truncate this continued fraction at $n=2000$.
The problem here is that Mathematica does not display the $2000$ terms of this fraction on the…
Betatron
- 31
- 2
1
vote
1 answer
Problem with "OverBar"
In my equation, I would like to add a bar to the second fraction, but the "OverBar" does not work.
I would appreciate it if you could tell me what the problem is.
This is my code:
HoldForm[
TraditionalForm[
D[Subscript[OverTilde[u], i],…
Ali Bizhanpour
- 11
- 2
1
vote
2 answers
Computing continued fraction
I want to build this infinite continued fraction
$$F_{n}(x)= \cfrac{1}{1-x\cfrac{(n+1)^2}{4(n+1)^2-1}F_{n+1}(x)} $$
which gives for $n=0$
$$F_{0}(x)=\cfrac{1}{1-\cfrac{(1/3)x}{1-\cfrac{(4/15)x}{1-\cfrac{(9/35)x}{1-\ddots}}}}$$
I took inspiration…
Gallagher
- 763
- 3
- 11
-1
votes
2 answers
How can we generate this more general form of the continued fraction?
How can I write Mathematica code for this continued fraction with alternating terms?
How can we generate this more general form of the above-continued…
Shivam K
- 301
- 2
- 8