a(1)=1. a(n) = number of earlier terms of the sequence which are coprime to (the number of positive integers which are <=n and missing from first (n-1) terms of sequence).
The positive integers which are <= 9 and are missing from the first 8 terms of the sequence are 3,7,8,9. There are 4 such integers, so a(9) is the number of earlier terms which are coprime to 4. Therefore a(9) = 3.