#OK to post homework #Tianyi Liu, Dec13, Assignment 24 1. i.108236 ii.19990 2. pnkDC:=proc(n,d,k,C,m) local k1,S: option remember: if k>n then RETURN(0): fi: if k=n then if member(k mod m, C) then RETURN(1): else RETURN(0): fi: fi: if n=1 then if member(1,C) then RETURN(1): else RETURN(0): fi: fi: if not member(k mod m, C) then RETURN(0): fi: S:=0: for k1 from 1 to k-d do if member(k1 mod m,C) then S:=S+ pnkDC(n-k,d,k1,C,m): fi: od: S: end: pnDC:=proc(n,d,C,m) local k: add(pnkDC(n,d,k,C,m),k=1..n): end: i. pnDC(10,0,[2,3],5) 4 pnC(10,[2,3],5) 4 pnDC(10,2,[0],1) 6 pnD(10,2) 6 ii. 1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 8, 8, 9, 11, 12, 12, 14, 16, 17, 18, 20, 23, 25, 26, 29, 33, 35, 37, 41, 46 A000700 iii. 1, 0, 0, 1, 1, 1, 1, 0, 1, 2, 2, 1, 1, 2, 3, 3, 2, 2, 3, 5, 5, 3, 3, 5, 7, 7, 6, 5, 7, 11, 11, 8, 8, 12, 15, 15, 13, 12, 16, 22 A203776 3. We use similar argument for the full partition. When we pick a random integer partition we make decisions that how many number to include. But since distinct partition must have all distinct parts in a partition, we can only decide to include a number or not. Then PAR=PAR(ONLY USING 1)*PAR(ONLY USING 2)*... {[],[1]}*{[],[2]}*... (1+q)*(1+q^2)*...=Product(1+q^i,i=1..infinity) 4. We use similar argument for the full partition. When we pick a random integer partition we make decisions that how many number to include. But since odd partition must have only odd parts in a partition, we can only decide to include an odd number or not. Then PAR=PAR(ONLY USING 1)*PAR(ONLY USING 3)*... {[],[1],[1,1]...}*{[],[3],[3,3]...}*... 1/((1-q)*(1-q^3)*(1-q^5)*....)=Product(1/(1-q^(2*i+1),i=0..infinity) 5. 1/((1-q)*(1-q^3)*(1-q^5)*....)=Product(1/(1-q^(2*i+1),i=0..infinity) =(1+q)/(1-q)(1+q)*(1+q^3)/(1-q^3)(1+q^3)*(1+q^5)/(1-q^5)(1+q^5)*.... =(1+q)(1+q^2)/(1-q^2)(1+q^2)... =(1+q)(1+q^2)/(1-q^4)*(1+q^3)/(1-q^3)(1+q^3)... =(1+q)(1+q^2)(1+q^3)/(1-q^4)(1-q^6)... =(1+q)(1+q^2)(1+q^3)(1+q^4)/(1-q^8)(1-q^6)... =(1+q)*(1+q^2)*...=Product(1+q^i,i=1..infinity)