  We study the electronic structure of finite armchair graphene nanoribbons
using density-functional theory and the Hubbard model, concentrating on the
states localized at the zigzag termini. We show that the energy gaps between
end-localized states are sensitive to doping, and that in doped systems, the
gap between the end-localized states decreases exponentially as a function of
the ribbon length. Doping also quenches the antiferromagnetic coupling between
the end-localized states leading to a spin-split gap in neutral ribbons. By
comparing dI/dV maps calculated using the many-body Hubbard model, its
mean-field approximation and density-functional theory, we show that the use of
a single-particle description is justified for graphene {\pi} states.
Furthermore, we study the effect of structural defects in the ribbons on their
electronic structure. Defects at one ribbon termini do not significantly modify
the electronic states localized at the intact end. This provides further
evidence for the interpretation of a multi-peaked structure in a recent
scanning tunneling spectroscopy (STS) experiment resulting from inelastic
tunneling processes [J. van der Lit et al., Nature Commun., in press (2013)].
Finally, we show that the hydrogen termination at the flake edges leaves
identifiable fingerprints on the positive bias side of STS measurements, thus
possibly aiding the experimental identification of graphene structures.
