The patterns you're after tell us nothing about the perfect(ness) of a number.
Since they hold even if the number is not perfect, for example, take n = 6. $2^5 (2^6-1) = 2016 = 2^{10} + 2^9 + ... + 2^5$. Which is valid for any n, since in binary, 2^6-1 is 6-1=5 1's from left, and multiplication by 2^5 is adding 5 zeros from right.
Moreover, the following also hold for any n,
$2^5 (2^6-1) = 2^0 + ... + 2^{6-1} + (2^6-2^0) + (2^{6+1} + 2^1) + ... + (2^{2*6-2} - 2^{6-2})$.
$= 1 + ... + 32 + (2^6 - 2^0) + ... + (2^10 - 2^4)$.
but 2016 is not perfect.
Here, $2^n-1$ must be prime so that $2^{n-1}(2^n-1)$ is the unique prime factorization of the number, and in which case, the terms in $\sum_{k=0}^{n-1} 2^k + \sum_{k=0}^{n-2} 2^k(2^n - 1)$ are precisely the divisors of $2^{n-1}(2^n-1)$.
Theorem: If P is an even perfect number, then P = $2^{k-1} (2^k - 1)$ for some k>1 with (2^k - 1) prime.
Proof:
Suppose P is even perfect. Then we can find k>1 such that $P = 2^{k-1}m$, for m odd.
Now, $2^{k-1} - 1 = 1 + ... + 2^{k-2}$ (as explained earlier, 2^{k-1} - 1 has k-2 ones).
i.e explaining why 31 = 1 + 2 + ... + 16.
Write $P = (2^{k-1}-1 + 1)m$. Then $P = (1 + ... + 2^{k-2})m + m$.
The case m is prime: The proper divisors of P are then $1,2, ..., 2^{k-1}, m, 2m, ..., 2^{k-2}m$.
Since P is assumed perfect, $P = 1 + 2 + ... + 2^{k-1} + m + 2m + ... + 2^{k-2}m$.
But $P = (1 + ... + 2^{k-2})m + m$ as shown above.
Therefore, $m = 1 + 2 + ... + 2^{k-1} = 2^{k}-1$
i.e $P = 2^{k-1} (2^k - 1)$ (note 2^{k}-1 prime).
The case for m is not prime: Assume without loss of generality $m = p_1 p_2$, neither a unit or even. Then the divisors (hopefully I didn't miss a divisor) of P are:
$1,2, ..., 2^{k-1}, p_1, 2p_1, ... 2^{k-1}p_1, p_2, 2p_2, ... 2^{k-1}p_2, 2m, ..., 2^{k-2}m$.
Taking the sum of the divisors and equating with $P = (1 + ... + 2^{k-2})m + m$. Then
$m = 1 + 2 + ... + 2^{k-1} + (1 + ... + 2^{k-1})p_1 + (1 + ... + 2^{k-1})p_2 = (2^{k} - 1) (1 + p_1 + p_2)$, but then $p_1 = (1 + p_1 + p_2)$, i.e p_2=-1 or $p_2 = (1 + p_1 + p_2)$, in either case a contradiction.