restart: k:= ; n:= ; f:=proc(n:nonnegint) option remember; f(0):=1; for i to k do f(i):=i od; f(n):=n*f(n-k); end: f(n);