# General solution of recurrence relation [closed]

I am supposed to solve for the general solution of $f(n+2)=2(f(n+2))^2 -f(n+2)f(n)-2012$. I tried the method of generating functions but I am stuck with the power $2$ on the RHS. any other methods or idea on how to proceed?

Edit: $f:\mathbb N \to \mathbb N$

## closed as unclear what you're asking by Did, Yagna Patel, yoknapatawpha, user228113, PragabhavaJan 28 '16 at 0:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Any other conditions on $f$? The equation itself gives two values for $f(n+2)$ for each $f(n)$ since $2x^2+ax-2012$ has always two distinct roots. – Mohsen Shahriari Jan 27 '16 at 18:34
• In your case, $a$ is $f(n)+1$. Just subtract $f(n+2)$ from both sides of the equation. – Mohsen Shahriari Jan 27 '16 at 18:42
• With your new condition added, the task is to find out when is the root of the quadratic polynomial a natural number. – Mohsen Shahriari Jan 27 '16 at 19:01
• Until you come with another version, don't vandalize the current one, out of respect for Mohsen Shahriari's work and mine. Otherwise, our answers will look out of context. – Alex M. Jan 27 '16 at 22:48

Let $f:\mathbb N\to\mathbb N$ satisfy $$2f(n+2)^2-(f(n)+1)f(n+2)-2012=0$$ for every natural number $n$. Since $f(n+2)$ can't be negative, we have: $$f(n+2)=\frac{f(n)+1+\sqrt{(f(n)+1)^2+16096}}4$$ Now, $f(n+2)$ must be a natural number, so $(f(n)+1)^2+16096$ must be a perfect square. Hence there is a natural number $k$ such that: $$(f(n)+1)^2+16096=k^2$$ $$\therefore\quad k^2-(f(n)+1)^2=16096$$ $$\therefore\quad (k-f(n)-1)(k+f(n)+1)=2^5\cdot503$$ Because $k-f(n)-1$ and $k+f(n)+1$ have the same parity and their product is even, therefore both of them have to be even. Also because $f(n+2)=\frac{f(n)+1+k}4$, therefore $k+f(n)+1$ must be divisible by $4$. Obviously $k+f(n)+1>k-f(n)-1$ so by the above factorization, $(k-f(n)-1,k+f(n)+1)\in\{(8,2012),(4,4024),(2,8048)\}$ which yields $(f(n),f(n+2))\in\{(1001,503),(2009,1006),(4022,2012)\}$. But this is impossible since $(f(n+2),f(n+4))$ must be an element of the same set and hence $f(n+2)\in\{1001,2009,4022\}\cap\{503,1006,2012\}=\varnothing$ which leads to a contradiction. So no such function exists.

As it is formulated now, your problem has no solution.

Note that the relation that you give (that does not specify the initial terms $f(0)$ and $f(1)$ - but this has no consequences over our reasoning) can be rewritten as

$$2012 = f(n+2) \Big( 2 f(n+2) - f(n) - 1 \Big) ,$$

which shows that $f(n+2) \mid 2012, \ \forall n \ge 0$. But $2012 = 4 \cdot 503$, which means that $f(n+2) \in \{ 1, 2, 4, 503, 1006, 2012 \} \ \forall n \ge 0$.

On the other hand, the given relation can be rearranged as a 2nd degree equation in $f(n+2)$ as

$$2 f(n+2) ^2 - \Big( f(n) + 1 \Big) f(n+2) - 2012 = 0 ,$$

which has for discriminant the quantity $\Big( f(n) + 1 \Big)^2 + 16096$. In order for the "solution" $f(n+2)$ to be a natural number, the discriminant must be a perfect square. If $n \ge 2$ then $f(n)$ must be one of the six divisors listed above, but none of them gives a perfect square when plugged in the expression of the discriminant, which shows that your problem has no solution. Are you sure that you have copied it correctly?

• I see no important difference between my answer and yours. – Mohsen Shahriari Jan 28 '16 at 15:23
• @MohsenShahriari: I was typing mine while yours was deleted. When I published it, I discovered that you had already undeleted yours too, without me knowing this (yours was edited 17 hours ago, mine was answered 17 hours ago - at the time of writing this comment - so we were working almost simultaneously). Given that I had spent some time thinking about it, I decided not delete it. I also feel it is less convoluted than yours. In any case, it seems like the OP has deleted his account, so we won't get any feedback on this anymore. – Alex M. Jan 28 '16 at 15:47