An = An-1
A1 = 2, A0 = 0.
As the question demands that no consecutive zeroes or ones to be present, we are left with only one possibility i.e. alternate bits in the string.
Now, either the string can start with 0 or 1 so the string can be either 0101.... or 10101....
Hence for n-length string only two strings are possible.
Hence the above recurrence relation.