Problem

Source: Romanian National Olympiad 2014, Grade X, Problem 3

Tags: function, algebra



Let $ n $ be a natural number, and $ A $ the set of the first $ n $ natural numbers. Find the number of nondecreasing functions $ f:A\longrightarrow A $ that have the property $$ x,y\in A\implies |f(x)-f(y)|\le |x-y|. $$