Subsets and Sets Question in New Zealand MO

For any positive integer $$n$$, let $$f(n)$$ be the number of subsets of $${1, 2, . . . , n}$$ whose sum is equal to $$n$$. Does there exist infinitely many positive integers $$m$$ such that $$f(m) = f(m + 1)$$? (Note that each element in a subset must be distinct.)

This is a New Zealand MO question and in their solution, they state that, by Michael Albert, that if we make $$S(n)$$ the set that fulfills what the question asks for, then $$S(n)→S(n+1)$$ is considered as a 'map', then this map would be an injection (needs proof but easy) and not a surjection provided that $$S(n + 1)$$ contains a set whose largest and second largest elements differ by one.

They state that a proof is needed and I would appreciate it if anybody could explain this to me, with the proof, as this will help me to understand the question better.

FYI: I have added my solution below.

Thank you very much!

• You neither define $S(n),$ nor tell us what the map is. $X\to Y$ doesn't define anything, it just means some map from$X$ to $Y.$ Any map. Commented Aug 11 at 1:35
• Let S(n) is the set of such subsets that fufills what the question states. Commented Aug 11 at 1:39
• Don't put it in comments, put it in the question. As written, your question is horribly incomplete. Commented Aug 11 at 3:48

Let $$S(n)$$ be the set of such subsets. Consider the $$S(n)$$ to $$S(n + 1)$$ that adds one to the largest element of each $$A ∈ S(n)$$.

For even $$n = 2k ⩾ 2$$ this is true since we can take $${k, k + 1} ∈ S(n + 1)$$ and for odd $$n = 2k + 1 ⩾ 5$$ this is true since we can take $${1, k, k + 1}$$. So for $$n ⩾ 5$$, we must have $$f(n) < f(n + 1)$$ and there do not exist infinitely many such pairs.

• Something seems to be missing here. What is true? Commented Aug 11 at 10:49
• If there exist infinitely many positive integers $m$ such that $f(m)=f(m+1)$. Commented Aug 11 at 22:01