MathDB
the function $f^{n-2}$ is constant, but $f^{n-3}$ is not

Source: Moldova TST 1996

August 8, 2023
function

Problem Statement

Let AA{} be a set with nn{} (n3)(n\geq3) elements. Iterations f2,f2,f^2,f^2,\ldots of the function f:AAf:A\rightarrow A are defined as f2(x)=f(f(x)),fi+1=f(fi(x)),i2f^2(x)=f(f(x)), f^{i+1}=f(f^i(x)), \forall i\geq2. Find the number of functions f:AAf:A\rightarrow A with the property: the function fn2f^{n-2} is constant, but fn3f^{n-3} is not.