Spectral theory of semibounded Sturm–Liouville operators with local interactions on a discrete set