Recall exponential notation for partitions: $a^b$ signifies $b$ occurrences of $a$ in the partition. (Exponential notation can be useful for seeing the generating functions.) In exponential notation, every partition satisfying your constraints are of the form $m^k (m+1)^l$. In your $n = 4$ example, the partitions are $4^1 5^0$, $2^2 3^0$, $1^2 2^1$, and $1^4 2^0$. Notice that the smaller number, $a_1$, must have exponent at least $1$, while successor can have exponent $0$.
For a fixed $m$, the contributions from partitions of the form $m^k (m+1)^l$ are given by the following generating function:
$$(x^m + x^{2m} + x^{3m} + \cdots)(1 + x^{m+1} + x^{2(m+1)} + \cdots)$$
This simplifies to:
$$\frac{x^m}{1-x^m} \frac{1}{1-x^{m+1}}$$
Such contributions come from any $m \geq 1$, and of course, the contributions are disjoint. Thus the full generating function is:
$$\sum_{m \geq 1} \frac{x^m}{1-x^m} \frac{1}{1-x^{m+1}}$$
This might already be too great a nudge, but the point is that you now obtain something you can manipulate. After some obvious $1 - x$ factorings and some telescoping, I get $\frac{x}{(1 - x)^2}$, a generating function for $n$, as desired. Let me know if you get similar results or not.
The generating function for partitions where no odd number appears more than once is
$$\prod_{k\ge 1} \frac{1}{1-z^{2k}} \prod_{k\ge 0} (1+z^{2k+1}).$$
The number of partitions containing no element of $A$ is
$$\prod_{k\ge 1} \frac{1}{1-z^k} \prod_{k\ge 0} (1-z^{4k+2}).$$
Re-write this as
$$\prod_{k\ge 1} \frac{1}{1-z^{2k}} \prod_{k\ge 0} \frac{1}{1-z^{2k+1}}
\prod_{k\ge 0} (1-z^{4k+2}).$$
Finally observe that
$$\frac{1-z^{4k+2}}{1-z^{2k+1}} = 1 + z^{2k+1}$$
so this becomes
$$\prod_{k\ge 1} \frac{1}{1-z^{2k}} \prod_{k\ge 0} (1+z^{2k+1})$$
which is the same as the first generating function.
Best Answer
I think this was proved by Euler.
The number of partitions of $n$ as a sum of odd positive integers is the coefficient of the $x^n$ in the expansion of : $$\frac{1}{(1-x)(1-x^3)(1-x^5)(1-x^7)\dots} $$
and the number of ways of writing $n$ as a sum of distinct positive integers is the coefficient of $x^n$ in
$$(1+x)(1+x^2)(1+x^3)\dots$$
Trivially we have $\frac{1}{(1-x)(1-x^3)(1-x^5)(1-x^7)\dots} = \frac{1-x^2}{1-x} \cdot \frac{1-x^4}{1-x^2} \cdot \frac{1-x^6}{1-x^3} \cdot \frac{1-x^8}{1-x^4}\dots$ $$ = (1+x)(1+x^2)(1+x^3)\dots$$