Analytical and numerical procedures for a nonlocal elastic 1D problem