codes have been generated odd number of odd digits. Let $ a_n $ be the number of valid n-digit activation codes. Find the recurrence relation.
I can't figure out and understand the question. Can you give me some hints ?
codes have been generated odd number of odd digits. Let $ a_n $ be the number of valid n-digit activation codes. Find the recurrence relation.
I can't figure out and understand the question. Can you give me some hints ?
Copyright © 2021 JogjaFile Inc.
How can we generate a valid $n$-digit code? We can either
In total, we get: $$ a_n = \underbrace{5 \cdot a_{n - 1}}_{\text{case 1}} + \underbrace{5 \cdot (10^{n - 1} - a_{n - 1})}_{\text{case 2}} = 5 \cdot 10^{n - 1} $$