How to store $n$ numbers with space $O(n)$ bits and access time $O(1)$?
A simple solution is to use a $n$-bit bitvector.  This is basically an array with $n$ entries, where each entry is either 0 or 1.  If the $i$th entry is 1, that means that $i$ was stored in the data structure; 0 means that $i$ was not stored in the data structure.  This takes $O(n)$ bits of space.  The insert and access operations can be done in $O(1)$ time.

The crucial requirement that makes this solution possible is that there will be no duplicates; each number is present at most once.  If you allowed duplicates, the problem would not be solvable within the space requirements you list: storing $n$ numbers from $1$ to $n$ requires at least $\Theta(n \log n)$ bits, based on information-theoretic concerns.