We present numerical calculations for the determination of localized m
odes in one-dimensional finite chains of atoms with free ends containi
ng harmonic and quartic anharmonic interactions. By adding step by ste
p the quartic term we can follow the formation of even and odd localiz
ed modes arising from the highest harmonic frequency mode. We have stu
died the role of crystal inhomogeneity by introducing a modification o
f the fourth-order force constant between neighboring atoms at the cen
ter of the chain, where the localized mode has its maximum displacemen
t. For large weakening of this force constant the localized mode devel
ops a double-peaked structure, as has been found in the continuum limi
t. In the case of asymmetrical local inhomogeneity the localized mode
remains stable and moves toward the atom with the inhomogeneity. We al
so show the existence of anharmonic surface modes localized at the end
of the chain.