Recurrence formula (wolfram alpha error?!)

96 Views Asked by At

I tried to identify the simplified reccurence formula for the following function:g(0) = x ; g(n) = g(n - 1) + 1/2 (1 - sqrt(8 g(n - 1) + 1))

But the answer given by wolfram alpha is g(n) = 1/2 n (n + sqrt(8 x + 1)) + x which is clearly wrong because for g(0)=10 we have g(10)=0 Thank you in advance,

https://www.wolframalpha.com/input/?i=g%280%29%3Dx%2C+g%28n%29%3Dg%28n-1%29-%28%28%288g%28n-1%29%2B1%29%5E%281%2F2%29%29-1%29%2F2

1

There are 1 best solutions below

0
On

I presume the problem with the program must be with the taking of the square root. This is perhaps illustrated by a neat 'by hand' solution is as follows.

Let $8g_n+1=y_n^2$. Then $y_{n+1}=|y_n-2|.$

Your series $10,6,3,1,0,0,0...$ then corresponds to $9,7,5,3,1,1,1,...$.

However, we could have taken $y_{n+1}=-|y_n-2|$ and obtained a different series.