Sets, Relations & Functions

Answer & solution
Official answer: 2.0 : 2.0
Our answer: 2
For even n halve n. For odd n>5, applying the odd rule and then halving sends n to(n+5)/2<n. Thus every value eventually reaches 1..5. The numbers 1, 2, 3, 4 are connected by the cycle 1→6→3→8→4→2→1, while 5→10→5 forms another component. Divisibility by 5 is invariant under both rule equalities, so these components never merge. A function constant 1 on nonmultiples of 5 and constant 2 on multiples satisfies both rules and realizes two values. Therefore the maximum range size is 2.
The equations force f to be constant on connected components generated by the permitted transformations. Descent shows there are at most two components, while the divisibility-by 5 invariant proves that they cannot merge. For an odd n,5 divides n+5 exactly when it divides n; for an even n, halving preserves divisibility by 5 because 2 is invertible modulo 5. Assigning two different positive values to these two classes supplies an explicit function attaining the upper bound, so this is a maximum rather than just an estimate.