The single-item lot sizing problem under a periodic energy limitation is considered in this paper. Identical and parallel capacitated machines constitute the production system, each one consuming a certain amount of energy when being switched on, when reserved, and when producing. We consider a cost for starting-up the machines, a reservation cost to keep the machines ready for production, in addition to classical lot sizing costs, such as, joint setup cost, unit production cost and unit holding cost, all being time-dependent. Besides the classical lot sizing decisions of how much and in which periods to produce, we have to decide the number of machines to switch on and to switch off in each period. We show that this problem is NP-hard even under restricted conditions. In contrast, assuming stationary energy parameters, we propose two polynomial time dynamic programming algorithms to solve the problem to optimality. The first algorithm is proposed for the case with null setup cost, null reservation cost and null reservation energy consumption, and runs in O(M 5 T 4) time, with M being the number of machines and T the number of periods. We show that we can extend this algorithm to solve the generalized version of the problem in time complexity O(M 6 T 6).