Let hn (n ≥ 0) denote the number of n-digit integers such that each digit is odd and each of the digits 1, 3, 5, 7, 9 occurs an odd number of times.

309 Views Asked by At

Let hn (n ≥ 0) denote the number of n-digit integers such that each digit is odd and each of the digits 1, 3, 5, 7, 9 occurs an odd number of times.

a) Find h0, h1, h2, h3, h4, & h5.

b) Find hn in closed form.

I couldn't figure out how to solve for part a, thus, I tried solving for part b first so that I might be able to get part a after I solve for the equation. For part b, after solving for the exponential generating function {which is (exp(x)-exp(-x)/32)^5}, I found that h_n = 5^n + 5*3^n + 10 - 10(-1)^n + 5(-3)^n - (-5)^n. However, when I plug in for n=0..5 to get the answers for part a, I get a zero for every n I plug into h_n. Now, I am confused and I don't know how to solve this.

Could you please show me how to solve this with an explanation so that I know what is going on? Thanks in advance!