recurrence relation number of bacteria Assume that growth in a bacterial population has the following properties:


*

*At the beginning of every hour, two new bacteria are formed for each bacteria that lived in the previous hour.


*During the hour, all bacteria that have lived for two hours die.

*At the beginning of the first hour, the population consists of 100
    bacteria. 


Derive a recurrence relation for the number of bacteria.
I know that if the bacteria wouldn't die $A_{n} = 2A_{n - 1}$, but now I have no idea what to do.

At time $n$:


*

*The bacteria that have been there at the previous time (time $n-1$) give rise to 2 bacteria each: $A_{n-1} \to 2A_{n-1}$

*The bacteria that were already there at time $n-2$ die: $A_{n-2} \to 0$
Put together, this means you get
$$
A_n = 2 A_{n-1} - A_{n-2}.
$$
