Perfect numbers, the pattern continues The well known formula for perfect numbers is 
$$
P_n=2^{n-1}(2^{n}-1).
$$
This formula is obtained by observing some patterns on the sum of the perfect number's divisors. Take for example $496$:
$$
496=1+2+4+8+16+31+62+124+248
$$
one can see that the first pattern is a sequence of powers of $2$ that stops at $16$, the second pattern starts with a prime number, in this case $31$, the rest of them are multiples of $31$, e.g. $2\cdot 31, 4\cdot 31$ and $8\cdot 31$.
But I found that the pattern proceeds after $31$, for example $31=2^5-2^0$, $62=2^6-2^1$, $124=2^7-2^2$ and finally $248=2^8-2^3$, so the perfect number can be written as
$$
496=1+2+4+8+16+(2^5-2^0)+(2^6-2^1)+(2^7-2^2)+(2^8-2^3)
$$
or 
$$
496=(1+2+4+8+16+32+64+128+256) -(1+2+4+8).
$$
So the formula follows very naturally from this.
I've searched but didn't find this formulation anywhere.
Well, is this something new? Has anyone seen this somewhere?

You've observed that $P_5 = 2^4(2^5-1) = 496$ can also be written as the sum of the first 9 powers of two minus the sum of the first four powers of two.
Sums of powers of two
Powers of two written in binary look like $1, 10, 100, 1000, \cdots$ but you can also write them like this $1, 1+1, 11+1, 111+1, \cdots$. This explains why (now in decimal notation) $1 + 2 + 4 + 8 = 15$ and the general sums of this form.
Nine and four
Well obvious $4 = 5-1$, and $9 = 2\cdot 5 - 1$, but where do these come from? Well just multiply out the formula! $2^{n-1}(2^n-1) = 2^{2n-1}-2^{n-1}$.
This explains why the form $(1 + 2 + 4 + 8 + \cdots) - (1 + 2 + \cdots)$ works.
