which is odd. For each 1 ≤ m ≤ q , the value of x$_{m}$ is at the edge of its range (either 0 or 1 ), and trying to vary its value will turn | ϕ 〉 to a superposition of | k 〉 and | k $^{′}$〉 which differ only on the m th bit. Since k ′ / ∈ S the overlap function will necessarily decrease, and as this is so for all m orthogonal directions, | k 〉 is a local maximum. The only question left then, for the descending branch, is whether | k 〉 is a global maximum as well. Another justification to the approximated formula can be presented in the form of an induction, using the following recursive decomposition of periodic states. Considering the basis states that make up a periodic state, we can divide them into two subsets, according to the value of the most significant bit. Looking at the q − 1 remaining bits, we see that each subset makes up a component periodic state with the same period: Here, l ′ = − 2 q − $^{1}$(mod r ) is the shift of the second component periodic state, A$_{0}$ and A$_{1}$ are the number of basis states in the component states | ψ q − 1 r,l 〉 and | ψ q − 1 r,l ′ 〉 respectively. Clearly, the condition A = A$_{0}$ + A$_{1}$ is satisfied. When A is even, A$_{1}$ = A$_{0}$ = A/ 2 . When A is odd A$_{1}$ = A$_{0}$ − 1 , namely A$_{0}$ = ( A + 1) / 2 and A$_{1}$ = ( A − 1) / 2 . Let us now assume that the approximated formula is correct for q − 1 qubits. If the states are in the ascending branch, then the complete ES state is the approximated nearest product state of the component states which make up the right-hand side of Eq. (30). Clearly this means that it is the nearest product state of the left-hand side as well, which is the periodic state of q qubits. On the other hand, if the states are in the descending branch, each of the component states has a (different) basis state as the approximated nearest product state. In this case, choosing one of these basis states gives the nearest product state to the state of q qubits. Finally, we present numerical evidence to support the approximated formula, described in Fig. 2. This figure shows the logarithmic Groverian entanglement of periodic states for some values of q , r , and l , computed numerically via the numerical scheme described in Sec. II. It also shows the entanglement according to the approximated formula: both the more accurate version given in Eq. (27) and the less accurate version given in Eq. (28). As shown in the figure, the more accurate version of the formula agrees with the numerical results to a good precision on both branches. The less accurate version, however, does not follow the step-function-like behavior in the descending branch. This is clearly due to the formula for A , which includes a ceiling function that is smoothed out in the approximation 14 | ψ q r,l 〉 = √ A$_{0}$ A | 0 〉 ⊗ | ψ q − 1 r,l 〉 + √ A$_{1}$ A | 1 〉 ⊗ | ψ q − 1 r,l ′ 〉 . (30)