0

If a string of length n has a prefix of length less than n that matches a suffix we call it bad. If not, we call it good. For example 01011 is good and 010101 is bad.
The task
Your code should output the number of good strings of length 1,2,3,..., with alphabet size 1,2,3,4,5 one per line, and...