Q1. Let f(n) = n^n^...^n, repeated n times, if n >0; and f(0) = 0. (For example, f(3) = 3^3^3 = 3^27.) Show f is primitive recursive.
Q2.
(a) Let f0(n) = n^n, f0(0) = 0. Let f1(n) = f0 f0 ...n... f0(n) where "...n..." means "n times" (i.e., f0 composed with itself n times). (Note: f0(f0(n)) equals (n^n)^(n^n), not n^n^n^n.) Prove f1 is primitive recursive.
(b) (Optional) Let f(j+1)(n) = fj fj ...n... fj(n), j >= 0. Let g(n) = fn(n). Do you think fj is primitive recursive? How about g?