There is a sequence whose elements have the following dependency
a[i] = (a[i-1] + 2 * a[i-1] * Sqrt(2)) / 2
a[i=1] = 10
I need to write a sequence equation and find a[i=5]
Simplifying the expression, I obtained a dependence equation of the following form
a[i] = a[i-1]*(1/2)*(1 + 2 * Sqrt(2)) = a[i-1] * some_constant
Therefore, this function is a geometric progression (Wiki), the general equation of which is
a[n] = a[1] * r^(n-1)
Using brute force, I calculated the a[i=5] element and, accordingly, knowing the general equation, I determined the value r = 1.91421356. For different a[i=1] the value of r remains the same.
But I still don’t understand how to get r value from 1/2 * (1 + 2 * Sqrt(2)).
So my question is as follows: How to convert 1/2, 1, 2 and Sqrt(2) to r = 1.91421356?
Thanks in advance to all participants!
PS: This problem arose when I was solving an issue with rotating squares and piling them on top of each other (in programming). I understand that the solution is simple, but I can't wrap my head around it. Initial values such as a[i=1]=10 and a[i=5] are given for convenience.
I don't know how to add a comment so that it can be easily read. Therefore, the answer to the comment was added to the question
@peterwhy Thanks for your response. This is how I calculated:
a[i = 1] = 10
a[i = 2] = 19.14213562373095
a[i = 3] = 36.64213562373095
a[i = 4] = 70.14087296526012
a[i = 5] = 134.26461030678928
a[n] = a[1]*r^(n-1)
r = (a[n] / a[1])^(1/(n-1))
For example, lets take i = 4
a[n]/a[1] = (70.14087296526012/10) = 7.014087...
then
r = 7.014087^(1/3) = 1.9142135353981375 (with rounding error)
Thanks to @peterwhy, the solution was much simpler. You just need to equate
rto the expressionr = (1 + 2 * sqrt(2)) / 2