Is there a function for $[1;x,x,...]$ (as an infinite continued fraction)? So I was experimenting with continued fractions and came up with an idea for a function $$f(x) =1+\cfrac{1}{x+\cfrac{1}{x+\cfrac{1}{x+\cfrac{1}{x+\cfrac{1}{x+\cfrac{1}{x+\dots}}}}}},$$ as an infinite continued fraction. I already know some of the values like $f(1)=\phi$ (the golden ratio), and $f(2)=\sqrt{2}$, so I know it would be bounded. And I made an approximation using Desmos:

But it can't be graphed exactly since it's infinite. But I was wondering, is there a function that exists for this? Does it even matter? What would the exact function look like?
 A: Though you've found the formula yourself, I feel like it's still worthwhile to understand where it comes from. Let your $f(x)=[1;x,x,x,x,\ldots]$ and let's define $\mathcal{F}(x)=[x;x,x,x,x,\ldots]$. Then obviously $f(x)=(1-x)+\mathcal{F}(x)$, since the only difference between them is the 'constant' term. But we also have $\mathcal{F}(x)=x+\dfrac1{\mathcal{F}(x)}$, and multiplying by $\mathcal{F}(x)$ on both sides we get $\mathcal{F}(x)^2-x\mathcal{F}(x)-1=0$. But this is just a quadratic equation in $\mathcal{F}$ that we can solve to get $\mathcal{F}(x)=\frac12(x\pm\sqrt{x^2+4})$; it's easy to see that the root here must be positive (and not too hard to see that the continued fraction $[x;x,x,x,x,\ldots]$ converges for all $x\gt 0$); plugging this into the equation for $f()$ gives $f(x)=1-x+\frac12(x+\sqrt{x^2+4})$, which matches the formula that you gave.
A: Actually, I managed to solve (and generalize) this myself! (In case anyone else ever looks back at this)
I was looking at various values of $x$ in $f(x)$, and I got values like $\frac{\sqrt{29}}{2}-\frac{3}{2}$ for $f(5)$, and didn't notice any recognizable pattern. Then I started thinking about what quadratic equations these would be solutions to -- and it turns out that $f(n)$ is the positive solution to the quadratic $x^2+(n-2)x-n$. Then, you can find the value of $f(n)$ for any $n$ by solving this quadratic, and you get a new equation $g(x)=\frac{2-x+\sqrt{(x-2)^2+4x}}{2}$, which is equal to $f(x)$ for all positive $x$. This means that the infinite continued fraction $[1;x,x,x,\dots]$ is exactly equal to $g(x)$ for ALL positive $x$, not just integers.
I'm not sure if this will really ever matter in the grand scheme of things, but I couldn't find most of the values of $f(n)$ on the OEIS, so I figured nobody had really looked into this before. Maybe someone can find a use for this interesting graph!
Also, here's the equation in action compared to the continued fraction: https://www.desmos.com/calculator/0qhfhq2g6l
