how many words of length k can you create from {1,...,k} such that 1 appears even number of times?(adsbygoogle = window.adsbygoogle || []).push({});

well, for k=0 we have 1, for k=1 we have zero, and for k=2 we have one.

i thought to use here a recursion formula.

but not quite sure how to do so, i mean if k>=3, and a_k stands for the number of legitiamte words, then if no 1 appears in the word then we have (k-1)^k words, let's assume that in a_k-1 1 appears even number times then for the the last number we have (k-1) choices, so i think that the equation should be:

a_k=(k-1)*a_k-1+(k-1)^k

am i correct here?

now if this is correct then how find a suitable private answer for non homogenoues part?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# How many words

**Physics Forums | Science Articles, Homework Help, Discussion**