the function $f^{n-2}$ is constant, but $f^{n-3}$ is not
Source: Moldova TST 1996
August 8, 2023
function
Problem Statement
Let A be a set with n(n≥3) elements. Iterations f2,f2,… of the function f:A→A are defined as f2(x)=f(f(x)),fi+1=f(fi(x)),∀i≥2. Find the number of functions f:A→A with the property: the function fn−2 is constant, but fn−3 is not.