I am a newbie in binary strings and generating series. I have a problem of enumeration which can be transformed to the following: find the number of binary strings of exactly $n$ ones which do not contain three consecutive ones or three consecutive zeros. The answer can be given as a coefficient of a generating series.

I don't know how to begin with. Thanks for any help!