density of states for the periodic case