2

I have the following recurrence given:

$$a_{0}=1$$ $$a_{1}=1$$ $$a_{n}=3a_{n-2}+3a_{n-1}$$

Why is that equal to something like this?:

$$a_{n}=3a_{n-2}+3a_{n-1}-2[n=1]+[n=0 ]$$

What are those brackets?

amWhy
  • 209,954
khernik
  • 1,369
  • 4
    If I recall correctly, these are also known as Iverson brackets, $[n=1]$ evaluates to $1$ if $n = 1$, and to $0$ if $n \neq 1$. Here, it could be simply done with the Kronecker delta, $a_n = 3a_{n-2} + 3a_{n-1} - 2\delta_{1n} + \delta_{0n}$ – Daniel Fischer Sep 18 '13 at 20:40
  • Argh. :) You beat my answer, @DanielFischer. :) – apnorton Sep 18 '13 at 20:41
  • @anorton I bet it was the link that held you up ;) – Daniel Fischer Sep 18 '13 at 20:43
  • So...these Iverson brackets don't do anything here? Because for any n>1 Kronecker delta gives 0. If so, then is something like $a_{n}=3a_{n-2}+3a_{n-1}+[n=0]+[n=1 ]$ also equal to this recurrence? – khernik Sep 18 '13 at 20:49
  • To use Iverson brackets you'll need to assume that $a_n=0$ for $n<0$. This is no clearer than the original formulation. – lhf Sep 18 '13 at 21:00

1 Answers1

4

These are most likely Iverson Brackets. If the Boolean expression inside the square bracket is true, then the bracket evaluates to $1$. Otherwise, the bracket evaluates to $0$.

apnorton
  • 17,706