The answers to these questions are presumably well known (and easy?).
Question 1: Given an alphabet of n letters (1,2,...n), how many distinct words of length r exists, considered up to cyclic permutation?
Question 2: How many such cyclic words exist if we do not allow the 2-letter subword "12"?.