#its ok to post #TaerimKim,12/13/2020,Assignment 24 #1. use the functions for each cases #(i) nops(PnC(97, {1, 4, 7}, 7)); 10950 #(ii) nops(PnD(97,3)); 19990 ###################################################################### #2. combine pnkC + pnkD for pnkW and call from pnkDC #pnkW(n,k,C,m,d): pnkW:=proc(n,k,C,m,d) local k1,S: option remember: if k>n then RETURN(0): fi: #same for pnkC and pnkD if k=n then if member(k mod m, C) then RETURN(1): else RETURN(0): fi: fi: #must satisfy both so this condition remains if n=1 then if member(1,C) and k=1 then RETURN(1): else RETURN(0): fi: fi: #combined condition 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+ pnkW(n-k,k1,C,m,d): fi: od: S: end: pnDC:=proc(n,d,C,m) local k: add(pnkW(n,k,C,m,d),k=1..n): end: #(i) #lets check with n=10,C={1},m=2 pnDC(10,0,{1},2) 10 pnC(10,{1},2) 10 evalb(%=%%) true #lets check with n=10,d=1 pnDC(10,1,{0},1) 10 pnD(10,1) 10 evalb(%=%%) true #so its ok #(ii). when it is odd and distinct we can use d=1, C={1}, m=2 seq(pnDC(i,1,{1},2),i=1..40); 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,Expansion of Product_{k>=0} (1 + x^(2k+1)); number of partitions of n into distinct odd parts; #seems good #(iii). this condition asks for d=2, C={1,4}, m=5 seq(pnDC(i,2,{1,4},5),i=1..40); 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,Number of partitions of n into distinct parts 5k+1 or 5k+4. ################################################################################################# #3. For distinct partitions given that frequency notation is as 1^a1 2^a2 3^a3 so forth #we know that for each numbers in distinct case a1,a2,a3,...,ak are all 1 #meaning there is only {[].[1]} for 1,{[].[2]} for 2, ... ,{[].[k]} for k #SO for |PAR|_q = |PAR(1's) x Par(2's) x ... x Par(k's)|_q = | PAR(1's)|_q + |PAR(2's)|_q ... #=(1+q)*(1+q^2)*(1+q^3)*...*(1+q^k) #=Product(1+q^i,i=1..infinity) Q.E.D ############################################################################################## #4. For Odd partitions we know that numbers of 2n are not included #meaning there are no cases for a(2n) #So {[].[1],[11],...[1$k]} for 1,(no case for 2), {[].[3],[33],...[3$k]} for 3, ... ,{[].[k],[kk],...[k$k]}for k=2n+1 from n=0..infin #Then our |Par|_q = (1+q+q^2+q^3+....) * (1+q^3+q^6+...) * (1+q^5+q^10+...)* ... #= 1/(1-q) * 1/(1-q^3) * 1/(1-q^5) * .... #= Product(1/(1-q^(2*i+1),i=0..infinity) Q.E.D ############################################################################################# #5. We will utilize a weapon that shows (1+a^i) = (1-a^2i)/(1-a^i) #Then from distinct GF #(1+q)*(1+q^2)*(1+q^3)*...*(1+q^k) = (1-q^2)/(1-q) * (1-q^4)/(1-q^2) * (1-q^6)/(1-q^3) * .... * #here we can see that the (1-q^2n) from denom. and num. are cancelled out. leaving (1-q^2n-1) in the denom. #= 1/((1-q)*(1-q^3)*(1-q^5)*...) #=Product(1/(1-q^(2*i+1),i=0..infinity) = Odd partition GF Q.E.D