Alice wants to stack plastic cups of different colors together. The plastic cups come in 4 colors - red,green,blue and white. Let a

n be the number of ways to stack n of these plastic cups so that there are no consecutive white plastic cups. Find a recurrence relation for a

n and solve the recurrence relation.

Model solution:

a

n = 3*a

n-1 + 3*a n-2

a1=4, a2=15

x^2 -3x -3 = 0

X

1 = (3+ √21)/2

X2 = (3- √21)/2

.

.

.

What i want to ask is where did he get this equation

3+ √21)/2 come from? i know it has something got to do with characteristic equation, but i cant figure out where did the 3 , √21 and /2 come from? Please help