# Solving recurrence with non constant coefficients

I am having a hard time to solve the following

$a_k=\left(\frac{d}{2}\right)^{k-2}a_{k-2}$ where $d$ is a parameter and $a_0=1$ $a_1=d$. Will appreciate your help.

Thanks!

$$\Large{a_k = \prod_{n=1}^m(\frac{d}{2})^{k - 2n}a_{k - 2m} = (\frac{d}{2})^{\sum_{n=1}^m(k) - 2\sum_{n=1}^m (n)}a_{k - 2m}}$$

For the even case, notice that you can set $m = k/2$. So that the recursion ends at $a_0$.

The sums are then $$\sum_{n=1}^{k/2}(k) = k^2/2$$ and $$\sum_{n=1}^{k/2} (n) =\frac{k}{4}(\frac{k}{2} + 1).$$

So we have

$$\frac{k^2}{2} - 2\frac{k}{4}(\frac{k}{2} + 1) = \frac{k}{2}(\frac{k}{2} - 1) = \frac{k^2}{4} - \frac{k}{2}.$$

Thus for even $k$,

$$\Large{a_k = (\frac{d}{2})^{\frac{k^2}{4} - \frac{k}{2}}}.$$

Odd case is similar.

• @user186085 Let me know if you understand. Otherwise, indicate where you do not. – user109879 Oct 21 '14 at 7:59

$$a_{2k}=a_0\cdot\left(\frac{d}2\right)^{k^2-k}\qquad a_{2k+1}=a_1\cdot\left(\frac{d}2\right)^{k^2}$$

• How is that useful to the asker? – David Richerby Oct 21 '14 at 7:32
• Could you please specify the way in which you solved this? – user186085 Oct 21 '14 at 7:38
• @DavidRicherby First, when I posted this, there was a misleading comment (still there), that I find useful to debunk. Second, these formulas can be proved by induction. Third, the OP can fathom a proof by looking at these formulas. Fourth, if they cannot and explain what they tried, more explanations might come (unfortunately, at present the OP says nothing about their tries and, being no psychic, it is difficult to "tune" the answer to their knowledge, need, trouble, and the like). – Did Oct 21 '14 at 7:38
• @user186085 Sure, see last part of previous comment. – Did Oct 21 '14 at 7:39
• Rule of thumb confirmed: never ever ask for context to OPs when they just want solutions ready to be handed back. – Did Oct 21 '14 at 14:02