Step-by-step explanation: ok, there are two numbers provided, k and n.
you can think on n like a number of sockets.
_ _ _ _ .............. _
1 2 3 4 ............... n
in each socket goes a letter of A, only we cant have two consecutive letters.
So en the first socket we have K possibilities to chose, then in the second, we discard the one we put on the first socket. so we have K-1 possibilities. in the third one we discard the one we put in the second, so again we have K-1, and this goes on and on for the other sockets.
The total strings you can make with this will be the product of all the sockets, wich is:
.