> #Weiji Zheng, Homework 25, 12/11/2020 ; > #OK TO POST HOMEWORK ; > ; > #Q1 ; > #Draw the Ferrers diagram of the partition [9,6,5,3,1,1,1]. What is its conjugate partition? ; > ; > # * * * * * * * * * > # * * * * * * > # * * * * * > # * * * > # * > # * > # * ; > # | | | | | | | | | ; > # [7 4 4 3 3 2 1 1 1] ; > ; > #Q2 ; > #How many partitions of 151 are there with exactly 10 parts? ; > #pnk(151,10) > #79811865 ; > #Q3 ; > #Read and understand this gem. By hand, find the image of [[6,5,3,1,1,1,1,1],-1] > > #Check it against BZ([[6,5,3,1,1,1,1,1],-1]) ; > ; > # BZ([[6,5,3,1,1,1,1,1],-1]) ; > #[[6, 4, 2, 2, 2, 2, 2], 0] ; > ; > #Q4 ; > #If you want to find the number of partitions of 10000 using procedure pnFast in M24.txt and you type, > #pnFast(10000); > > #You would get an error message. Why? > > #But if you do > > #[seq(PnFast(i),i=1..10000)][10000]; > > #you would get the answer. Why? > > #Use this way to find the number of partitions of 20000. How far can you get? > > #pnFast(10000) > #36167251325636293988820471890953695495016030339315650422081868605887952568754066420592310556052906916435144 > #[seq(pnFast(i), i = 1 .. 10000)][10000] > #36167251325636293988820471890953695495016030339315650422081868605887952568754066420592310556052906916435144 > #[seq(pnFast(i), i = 1 .. 20000)][20000] > #252114813812529697916619533230470452281328949601811593436850314108034284423801564956623970731689824369192324789351994903016411826230578166735959242113097 ; > ; > #Q5 ; > #Part of the problem with pnFast(n) is that the numbers get very big. Write a procedure > #pnFastMod(n,m) > > #that outputs p(n) mod m. What is > > #pnFast(10^5,101)? ; > ; > pnFastMod := proc(n, m) local i: > pnFast(n) mod m: > end: > ; > #pnFastMod(10^5, 101) > #89 ;