#Please do not post homework #Sam Minkin, 12/13, Assignment 25 QUESTION #1: Ferrers Diagram of [9,6,5,3,1,1,1]: * * * * * * * * * * * * * * * * * * * * * * * * * * Conjugate Partition: [7, 4, 4, 3, 3, 2, 1, 1, 1] QUESTION #2: We know that the number of partitions of n with the largest part k equals the number of partitions of n into exactly k parts. Hence, there are pnk(151,10) = 79811865 partitions. QUESTION #3: The image of [[6,5,3,1,1,1,1,1],-1]: We have t = 8, L[1] = 6, j = -1. t + 3j = 5. Since t + 3j < L[1], we have, Phi(L) = [[6,4,2,2,2,2,2], 0] Running, BZ([[6,5,3,1,1,1,1,1],-1]) we get: [[6, 4, 2, 2, 2, 2, 2], 0] It is the same. QUESTION #4: The error due to running pnFast(10000); may be because of the number of recurrence levels required to run this operation exceeds the maximum allowed. However, since the code for the function uses dynamic programming through the option remember line, it will store the results calculated from pnFast(10000); when calculating [seq(PnFast(i),i=1..10000)][10000];. Therefore, it is able to complete execution when [seq(PnFast(i),i=1..10000)][10000] is run. For n = 20000, we get: 252114813812529697916619533230470452281328949601811593436850314108034284423801564956623970731689824369192324789351994903016411826230578166735959242113097 n = 50000, 3626186097141667844592140891595633728165383082527785049015872755414109904256712082718122747316610565824630881772910217544261659239432670671532413858378256188987333877121891586607957389750538447474712592979263719012461858719791627302489739548263 n = 100000, Get an error. QUESTION #5: pnFastMod:=proc(n,m) local j,su: option remember: if n<0 then RETURN(0): elif n=0 then RETURN(1): else su:=0: for j from 1 while j*(3*j+1)/2<=n do su:=su-(-1)^j*pnFast(n- j*(3*j+1)/2): od: for j from 1 while j*(3*j-1)/2<=n do su:=su-(-1)^j*pnFast(n- j*(3*j-1)/2): od: RETURN(su mod m): fi: end: Running, pnFastMod(10^5, 101) gives us: 89