For even inputs n=2,4,6,…, we have f(n)=2n, which yields 4,8,12,16,…—all multiples of 4, i.e.\ {n∈N:n≡0(mod4)}. If n≡3(mod4) (so n=3,7,11,…), then f(n)=n−1 gives 2,6,10,14,…—the set {n∈N:n≡2(mod4)}. Finally, if n≡1(mod4) (so n=1,5,9,…), then f(n)=2n+1 produces 1,3,5,7,…—all odd natural numbers.
Thus the range of f is {1,3,5,7,…}∪{2,6,10,14,…}∪{4,8,12,16,…}={odd numbers}∪{numbers≡2(mod4)}∪{multiples of 4}=N, so f is onto.
The three output sets—odd numbers, numbers congruent to 2 mod 4, and multiples of 4—are mutually disjoint, and in each case the rule is strictly increasing (hence injective). Therefore f is one-one as well.
Therefore, the correct answer is Option A: One-one and onto.
Tagged One-one, onto functions and counting functions. Machine-assigned, so read it as a strong shortlist rather than a verdict.