Personally, I’d target them with an id property, as you know exactly what you’re getting - so long, of course, that you’re checking it is actually there.
Of the two methods above though, I’d see class as the more reliable of the two. The a:nth-of-type() seems horribly fragile to me, especially if you end up working with dynamically generated code at any point.
I’m sure there are ways of working reliably with nth-of-type() and perhaps someone with more experience will come along and outline the kind of patterns that need to be employed in order to do that.
I agree with Chris - using nth-of-type is a more fragile technique. However, investigating the purpose of why you are targeting that one particular link, will help to give further information from which better advice can be given.
I recommend using a grid system, where you tell the CSS that the items are all in a 5-item wide grid, which lets the browser easily take care of the details on how to lay it out for you.