When will discrete Hardy's inequality become equality? The classical discrete Hardy's inequality asserts that 

If $(a_n)_{n=1}^\infty$ is a sequence nonnegative real numbers not identically to zero, then 
  $$\sum_{n=1}^\infty \left( \frac{a_1+...+a_n}{n} \right)^p \leq \bigg( \frac{p}{p-1}\bigg)^p \sum_{n=1}^\infty a_n^p.$$

Here comes my question.

Question: When will the inequality becomes equality?

Most searches leads me to integral Hardy's inequality, and the inequality there becomes equality when $f$ vanishes almost everywhere. 
However, I could not obtain a single search that discusses my question here. 
 A: If you look, as Giuseppe Negro suggested, into Hardy-Littlewood-Polya, you will find this stated as 

Theorem 326. If $p > 1$ and $a_n \geq 0$, and let $A_n$ denote the partial sums $A_n = a_1 + \cdots + a_n$, then
  $$ \sum \left(\frac{A_n}{n}\right)^p < \left( \frac{p}{p-1}\right)^p \sum a_n^p $$
  unless all $a_n$ are zero. 

Let me sketch the proof here and indicate where the strict inequality arises. 


*

*A direct (elementary) computation gives
$$ \tag{1}\left(\frac{A_n}{n}\right)^p - \frac{p}{p-1} \left(\frac{A_n}{n}\right)^{p-1} \cdot a_n \leq \frac{1}{p-1}\left[ (n-1) \left( \frac{A_{n-1}}{n-1}\right)^p - n \left( \frac{A_n}{n}\right)^p \right] $$
with equality if and only if $a_n = 0$. (The only inequality used at this step is the arithmetic-mean-geometric-mean inequality for numbers.)

*Summing equation (1), we see that the right hand side is telescopic. And so we have
$$ \tag{2} \sum_{n = 1}^N \left(\frac{A_n}{n}\right)^p - \frac{p}{p-1} \left(\frac{A_n}{n}\right)^{p-1} \cdot a_n \leq 0 .$$
Since inequality (1) is only an equality when $a_n = 0$, the condition for this inequality to be an equality is then $a_n = 0$ for every $1 \leq n \leq N$.

*Rearranging (2), we can apply Holder's inequality for sums to get
$$ \tag{3} \sum_{n = 1}^N \left( \frac{A_n}{n}\right)^p \leq \frac{p}{p-1} \left[ \sum_{n = 1}^N \left( \frac{A_n}{n}\right)^p \right]^{\frac{p-1}{p}} \left[ \sum_{n = 1}^N (a_n)^p \right]^{\frac1p} $$
Holder's inequality has equality if and only if the two sequences being multiplied are proportional. In other words, a necessary (but not sufficient condition) for (3) to be an equality is that there exists some constant $C$ such that $a_n = C A_n / n$ for every $1 \leq n \leq N$. This means that $a_n$ has to be constant. Combined with the condition for equality of (2), this means that (3) is an equality if and only if $a_n = 0$ for every $1 \leq n \leq N$. 

*As the Hardy's inequality quoted is obtained from (3) by rearranging algebraically the terms and raising to a power, and then taking the limit $N\to \infty$, we see finally the conclusion that the equality case is only taken when $a_n \equiv 0$ for every $n$. 

