#OK to post homework #Zhizhang Deng, 09/22/2020, Assignment 3 1. 2. NuFP:=proc(p) local i, res: res:=0: for i from 1 to nops(p) do if p[i]=i then res := res + 1: fi: od: RETURN (res): end; 3. Der:=proc(n) local perms, i, res: perms := MyPerms(n): res := {}: for i in perms do: if NuFP(i) = 0 then res := {op(res), i}: fi: od: RETURN(res): end: 4. It's a sequence of numbers that the permutations of this number of elements doesn't have any fixed points Yes I can find it on OEIS http://oeis.org/A000166 5. [seq(nops(Comps(i)),i=1..8)] = [1, 2, 4, 8, 16, 32, 64, 128] Should be 2^(n-1)