MathLabs

Problem 5

Determine all functions ff from the set of positive integers to the set of positive integers such that, for all positive integers aa and bb, there exists a non-degenerate triangle with sides of lengths aa, f(b)f(b) and f(b+f(a)−1)f(b+f(a)-1). (A triangle is non-degenerate if its vertices are not collinear.)
Step 1 of 4: f(1) = 1 and f is an involution
In plain words

The degenerate side of length 1 in the triangle inequality is the most restrictive, so testing a=1 pins down f(1), and testing b=1 afterward makes f its own inverse.

f(1)=1,f(f(n))=n  for every nf(1)=1,\qquad f(f(n))=n\ \text{ for every } n
Detailed analysis

Taking a=1a=1: the triangle with sides 1,f(b),f(b+f(1)−1)1,f(b),f(b+f(1)-1) has two sides differing by less than the third side 11; since f(b)f(b) and f(b+f(1)−1)f(b+f(1)-1) are integers, they must be equal, for every bb. If f(1)>1f(1)>1, set N=f(1)−1≥1N=f(1)-1\ge1; then f(b)=f(b+N)f(b)=f(b+N) for all bb makes ff periodic with period NN, hence bounded, say f≤Bf\le B always. But taking bb fixed and aa arbitrarily large in the original condition needs a<f(b)+f(b+f(a)−1)≤2Ba<f(b)+f(b+f(a)-1)\le 2B, impossible for large aa. So f(1)=1f(1)=1. Now take b=1b=1: the triangle with sides n,f(1)=1,f(1+f(n)−1)=f(f(n))n,f(1)=1,f(1+f(n)-1)=f(f(n)) again has two sides (nn and f(f(n))f(f(n))) differing by less than the third side 11, so being integers, f(f(n))=nf(f(n))=n for every nn.