Find the number of decimal strings of length n whose no two consecutive digits are prime. Do the
following,
2+2+8+2=14
(a) Find a recurrence relation a_(n) whose n-th term denotes the number of strings of length n as
described above.
(b) Find the initial conditions of the relation.
(c) Find the closed form of a_(n) using a generating function.
(d) Verify your answer by computing it for n=7.
[Hint] Read Example 3 on pg. 531 of the Rosen Textbook [8th Ed].
3. Find the number of decimal strings of length n whose no two consecutive digits are prime. Do the following, [2+2+8+2=14]
(a) Find a recurrence relation an whose n-th term denotes the number of strings of length n as described above.
(b) Find the initial conditions of the relation
(c) Find the closed form of an using a generating function
(d) Verify your answer by computing it for n = 7.
[Hint] Read Example 3 on pg. 531 of the Rosen Textbook [8th Ed].