It is not clear if the problem is to match the first and the third occurrences of the pattern in general or if 1st and 3rd are referred to this specific example (for example, the problem could be to match only the entire word and not the pattern as substring of another word). A real example would help to clarify.
Anyway, in the first case you can try something like:
Code:
grep aaaa file | sed -n '1p;3p'
whereas in the latter a simple
should do the trick.