Since the sequence is strictly increasing, it turns out that it's pretty easy. I believe it is also true if we allow non-strict inequalities, but I haven't been able to prove it.
First, it is easy to see that this sequence is determined by the values we assign to prime numbers. So if $n = p_1^{\alpha_1} \cdots p_k^{\alpha_k}$ then $$a_n = a_{p_1}^{\alpha_1} \cdots a_{p_k}^{\alpha_k}$$
From this it's clear that $a_{2^n} = 2^n$. It is also clear that $a_n = n$ is a sequence which works.
We want to show that is the only sequence.
The op already found that $a_1 = 1$ and $a_3 = 3$. Now suppose there exists (some) primes $p$ such that $a_p \neq p$. Let $q$ be the minimum of such numbers (ie, $a_n = n$ for all $n < p$).
Now since $a_{q-1} = q-1$, we have $a_q \ge q$. We want to show that $a_q > q$ is impossible.
And indeed, $a_{q+1}$ is not a prime and all of his prime factors are less than $q$. Since the prime-indexed numbers less than $q$ are just the primes themselves, it follows that $a_{q+1} = q+1$. But then $$q-1 < a_q < q+1$$
So the only possibility is that $a_q = q$ for all primes and this implies $a_n = n$ for all $n$