We first note that if f is a semi-reciprocal function and f(1)=a∈S, then f(a)=f(f(1))=1. Hence, a=f(1)=f(f(a))=1/a, and so a2=1. Since S does not contain negative numbers, we must have a=1, i.e. f(1)=1 for each semi-reciprocal function f.
If a∈S and b=f(a), the condition f(f(x))=1/x implies
f(b)=f(f(a))=1/a,f(1/a)=f(f(b))=1/b,f(1/b)=f(f(1/a))=a,
i.e., the function f cyclically permutes the four numbers a,b,1/a,1/b:
a↦b↦a1↦b1↦a.(5)
To solve (a) we construct a semi-reciprocal function f by defining
f(1)f(2n1)=1=2n+11f(2n)f(2n+11)=2n+1=2n.f(2n+1)=2n1
for all integers n≥1. This settles part (a). More generally, such functions can be obtained from a partition of the positive integers greater than 1 into ordered pairs (a,b) by applying (5). In the example given above, the pairs (2n,2n+1) are used.
To finish part (b), we first note that we have seen above that f(p)=p has the solution p=1. We need to show that there is no other solution.
Suppose p∈S satisfies f(p)=p. Because f is semi-reciprocal, we obtain
p=f(p)=f(f(p))=1/p,
hence p2=1 and therefore p=1, since p∈S is positive.