Let Z⩾0 be the set of all nonnegative integers. Find all the functions f:Z⩾0→Z⩾0 satisfying the relation f(f(f(n)))=f(n+1)+1 for all n∈Z⩾0.
This one wants a proof. Work it on paper, read the official solution, then mark
yourself honestly — the ladder only means something if the record is true.
Official solution
Answer. There are two such functions: f(n)=n+1 for all n∈Z⩾0, and f(n)=⎩⎨⎧n+1,n+5,n−3,n≡0(mod4) or n≡2(mod4),n≡1(mod4),n≡3(mod4) for all n∈Z⩾0 Throughout all the solutions, we write hk(x) to abbreviate the kth iteration of function h, so h0 is the identity function, and hk(x)=k timesh(…h(x)…)) for k⩾1.
Solution 1. To start, we get from (*) that f4(n)=f(f3(n))=f(f(n+1)+1) and f4(n+1)=f3(f(n+1))=f(f(n+1)+1)+1 thus f4(n)+1=f4(n+1)(2) I. Let us denote by Ri the range of fi; note that R0=Z⩾0 since f0 is the identity function. Obviously, R0⊇R1⊇…. Next, from (2) we get that if a∈R4 then also a+1∈R4. This implies that Z⩾0\R4 - and hence Z⩾0\R1 - is finite. In particular, R1 is unbounded. Assume that f(m)=f(n) for some distinct m and n. Then from (∗) we obtain f(m+1)=f(n+1); by an easy induction we then get that f(m+c)=f(n+c) for every c⩾0. So the function f(k) is periodic with period ∣m−n∣ for k⩾m, and thus R1 should be bounded, which is false. So, f is injective. II. Denote now Si=Ri−1\Ri; all these sets are finite for i⩽4. On the other hand, by the injectivity we have n∈Si⟺f(n)∈Si+1. By the injectivity again, f implements a bijection between Si and Si+1, thus ∣S1∣=∣S2∣=…; denote this common cardinality by k. If 0∈R3 then 0=f(f(f(n))) for some n, thus from (*) we get f(n+1)=−1 which is impossible. Therefore 0∈R0\R3=S1∪S2∪S3, thus k⩾1. Next, let us describe the elements b of R0\R3=S1∪S2∪S3. We claim that each such element satisfies at least one of three conditions (i) b=0, (ii) b=f(0)+1, and (iii) b−1∈S1. Otherwise b−1∈Z⩾0, and there exists some n>0 such that f(n)=b−1; but then f3(n−1)=f(n)+1=b, so b∈R3. This yields 3k=∣S1∪S2∪S3∣⩽1+1+∣S1∣=k+2 or k⩽1. Therefore k=1, and the inequality above comes to equality. So we have S1={a}, S2={f(a)}, and S3={f2(a)} for some a∈Z⩾0, and each one of the three options (i), (ii), and (iii) should be realized exactly once, which means that {a,f(a),f2(a)}={0,a+1,f(0)+1}(3) III. From (3), we get a+1∈{f(a),f2(a)} (the case a+1=a is impossible). If a+1=f2(a) then we have f(a+1)=f3(a)=f(a+1)+1 which is absurd. Therefore f(a)=a+1(4) Next, again from (3) we have 0∈{a,f2(a)}. Let us consider these two cases separately. Case 1. Assume that a=0, then f(0)=f(a)=a+1=1. Also from (3) we get f(1)=f2(a)=f(0)+1=2. Now, let us show that f(n)=n+1 by induction on n; the base cases n⩽1 are established. Next, if n⩾2 then the induction hypothesis implies n+1=f(n−1)+1=f3(n−2)=f2(n−1)=f(n) establishing the step. In this case we have obtained the first of two answers; checking that is satisfies (*) is straightforward. Case 2. Assume now that f2(a)=0; then by (3) we get a=f(0)+1. By (4) we get f(a+1)=f2(a)=0, then f(0)=f3(a)=f(a+1)+1=1, hence a=f(0)+1=2 and f(2)=3 by (4). To summarize, f(0)=1,f(2)=3,f(3)=0 Now let us prove by induction on m that (1) holds for all n=4k,4k+2,4k+3 with k⩽m and for all n=4k+1 with k<m. The base case m=0 is established above. For the step, assume that m⩾1. From ( ∗ ) we get f3(4m−3)=f(4m−2)+1=4m. Next, by (2) we have f(4m)=f4(4m−3)=f4(4m−4)+1=f3(4m−3)+1=4m+1 Then by the induction hypothesis together with (*) we successively obtain f(4m−3)=f3(4m−1)=f(4m)+1=4m+2f(4m+2)=f3(4m−4)=f(4m−3)+1=4m+3f(4m+3)=f3(4m−3)=f(4m−2)+1=4m thus finishing the induction step. Finally, it is straightforward to check that the constructed function works: f3(4k)f3(4k+2)=4k+7=f(4k+1)+1,=4k+1=f(4k+3)+1,f3(4k+1)=4k+4=f(4k+2)+1,f3(4k+3)=4k+6=f(4k+4)+1.
Solution 2. I. For convenience, let us introduce the function g(n)=f(n)+1. Substituting f(n) instead of n into (*) we obtain f4(n)=f(f(n)+1)+1, or f4(n)=g2(n)(5) Applying f to both parts of (*) and using (5) we get f4(n)+1=f(f(n+1)+1)+1=f4(n+1)(6) Thus, if g2(0)=f4(0)=c then an easy induction on n shows that g2(n)=f4(n)=n+c,n∈Z⩾0(7) This relation implies that both f and g are injective: if, say, f(m)=f(n) then m+c=f4(m)=f4(n)=n+c. Next, since g(n)⩾1 for every n, we have c=g2(0)⩾1. Thus from (7) again we obtain f(n)=n and g(n)=n for all n∈Z⩾0. II. Next, application of f and g to (7) yields f(n+c)=f5(n)=f4(f(n))=f(n)+c and g(n+c)=g3(n)=g(n)+c.(8) In particular, this means that if m≡n(modc) then f(m)≡f(n)(modc). Conversely, if f(m)≡f(n)(modc) then we get m+c=f4(m)≡f4(n)=n+c(modc). Thus, m≡n(modc)⟺f(m)≡f(n)(modc)⟺g(m)≡g(n)(modc).(9) Now, let us introduce the function δ(n)=f(n)−n=g(n)−n−1. Set S=n=0∑c−1δ(n) Using (8), we get that for every complete residue system n1,…,nc modulo c we also have S=i=1∑cδ(ni) By (9), we get that {fk(n):n=0,…,c−1} and {gk(n):n=0,…,c−1} are complete residue systems modulo c for all k. Thus we have c2=n=0∑c−1(f4(n)−n)=k=0∑3n=0∑c−1(fk+1(n)−fk(n))=k=0∑3n=0∑c−1δ(fk(n))=4S and similarly c2=n=0∑c−1(g2(n)−n)=k=0∑1n=0∑c−1(gk+1(n)−gk(n))=k=0∑1n=0∑c−1(δ(gk(n))+1)=2S+2c Therefore c2=4S=2⋅2S=2(c2−2c), or c2=4c. Since c=0, we get c=4. Thus, in view of (8) it is sufficient to determine the values of f on the numbers 0,1,2,3. III. Let d=g(0)⩾1. Then g(d)=g2(0)=0+c=4. Now, if d⩾4, then we would have g(d−4)=g(d)−4=0 which is impossible. Thus d∈{1,2,3}. If d=1 then we have f(0)=g(0)−1=0 which is impossible since f(n)=n for all n. If d=3 then g(3)=g2(0)=4 and hence f(3)=3 which is also impossible. Thus g(0)=2 and hence g(2)=g2(0)=4. Next, if g(1)=1+4k for some integer k, then 5=g2(1)=g(1+4k)=g(1)+4k=1+8k which is impossible. Thus, since {g(n):n=0,1,2,3} is a complete residue system modulo 4 , we get g(1)=3+4k and hence g(3)=g2(1)−4k=5−4k, leading to k=0 or k=1. So, we obtain iether f(0)=1,f(1)=2,f(2)=3,f(3)=4, or f(0)=1,f(1)=6,f(2)=3,f(3)=0 thus arriving to the two functions listed in the answer. Finally, one can check that these two function work as in Solution 1. One may simplify the checking by noticing that (8) allows us to reduce it to n=0,1,2,3.
Source: MathNet,
licensed CC-BY-4.0.
Statement and solution reproduced as published; topic, difficulty and ordering added
by this site.