Let this sequence be denoted $\left ( a_n \right )_{n = 1}^\infty$. It's easy to see that this sequence is predictably partitioned into "islands" of odd and even elements. These islands grow in size at a linear rate. Let each island be indexed by an integer $k$, such that, for instance, the island $\{ 1 \}$ is mapped to $k = 1$, the island $\{ 2, 4 \}$ is mapped to $k = 2$, and so on.
Given an integer $n$, we first have to find in which island $k$ the element $a_n$ is located. Due to the rate at which the islands grow, it is easy to see that the $k$th island starts at position:
$$n_k = 1 + \sum_{i = 1}^{k - 1} i = 1 + \frac{1}{2} (k - 1) k$$
That is, $a_{n_k}$ is the first element of the the $k$th island. And so $a_{n_k + k - 1}$ is the last element of the $k$th island, trivially.
Suppose that $a_n$ is located in the $k$th island. Now, there must exist an $a_m$ such that $a_m$ is in the $k$th island, but $a_{m - 1}$ is not. In other words, it is the first element of the island. Then it follows that $m = n_k$. That is:
$$m = 1 + \frac{1}{2} (k - 1) k ~ ~ \implies ~ ~ k = \frac{1}{2} \left ( \sqrt{8m - 7} + 1 \right )$$
Clearly $k$ is an integer, so $8m - 7$ must be an odd perfect square. Since $m \leq n$, we deduce that $8m - 7$ is simply the largest odd perfect square less than (or equal to) $8n - 7$. Thus, we get:
$$8m - 7 = \mathcal{Q}^2 = \text{Largest odd perfect square less than or equal to } ~ 8n - 7$$
And this gives us the island we are looking for:
$$k = \frac{1}{2} \left ( \sqrt{\mathcal{Q}^2} + 1 \right ) = \frac{\mathcal{Q} + 1}{2}$$
It turns out that $\mathcal{Q}$ can be expressed more naturally using the floor function, which yields:
$$k = \left \lfloor \frac{\lfloor \sqrt{8n - 7} \rfloor + 1}{2} \right \rfloor$$
Observe that this floor function manipulation ignores the parity of $\lfloor \sqrt{8n - 7} \rfloor$ and assumes it is odd (which is what we want).
Now that we have this island, we need to figure out the value of $a_n$. To do this, we work out the value of the last element of the island. We are smart, and we notice that this element must necessarily be a perfect square, due to the fact that the $n$th perfect square is the sum of the first $n$ odd numbers (look at the difference between terms within individual islands). In fact, the last element of the $k$th island is equal to $k^2$.
Using the result obtained a while ago, $a_{n_k + k - 1} = k^2$. Finally, within any island, the difference between each consecutive term is constant and equal to $2$. We already know the index of the term $a_n$ we are looking for, since it's, well, $n$. And we know that the last element of the island is at index $n_k + k - 1$.
Doing some simplifications:
$$n_k = 1 + \frac{1}{2} (k - 1) k ~ ~ \implies ~ ~ n_k + k - 1 = \frac{1}{2} (k - 1) k + k = \frac{k^2}{2} + \frac{k}{2}$$
Almost there! Now the difference between $n_k + k - 1$ and $n$ is thus:
$$\Delta = \frac{k^2}{2} + \frac{k}{2} - n$$
Notice that $\Delta$ is always nonnegative, since $a_n$ cannot be simultaneously inside the $k$th island and greater than the last element of the $k$th island. Using the fact that the difference between consecutive terms is $2$, we finally conclude that:
$$a_n = k^2 - 2 \Delta = k^2 - 2 \left ( \frac{k^2}{2} + \frac{k}{2} - n \right ) = 2n - k$$
Putting this all in terms of $n$ using the floor function trick above, this is equivalent to:
$$a_n = 2n - \left \lfloor \frac{\lfloor \sqrt{8n - 7} \rfloor + 1}{2} \right \rfloor$$
This can probably be simplified further, but I think it looks nice as it is :p
Enumerating the first few terms of this sequence, we obtain:
$$\left ( a_n \right )_{n = 1}^\infty = \{ 1, 2, 4, 5, 7, 9, 10, 12, 14, 16, 17, 19, 21, 23, 25, 26, 28, 30, 32, 34, 36, \cdots \}$$
$$\blacksquare$$
(Whew)