Every perfect number $\mathcal{P}$ is of the form $2^{n - 1}(2^n - 1)$ such that $n$ must be prime and $2^n - 1$ is also prime. Any prime of the form $2^n - 1$ is known as a Mersenne Prime, it's appropriate symbol being $M_n$ (in most cases $M_p$ where $n = p =$ prime).
When you do $1 + 2 + 4 + 8 = 15$, you are proposing that $2^{4 - 1}(2^4 - 1)$ is a perfect number since there are four terms on the $LHS$ (Left Hand Side of the equation). Here I will write it out in a clearer way:
$$\sum_{k = 0}^n2^k = x$$
This is read as:
"The sum that goes from $2^0$ to $2^n = x$." Here the variable $k$ is used to express how it starts from $0$ then goes to $1$, $2$, $3$, $\ldots$ $n$.
$$\sum_{k = 0}^n2^k = 2^0 + 2^1 + 2^2 + 2^3 + \cdots + 2^n = x$$
This $\longrightarrow \sum$ is known as a "Capital Sigma" (where the lower case sigma is $σ$.) "Sigma" along with other fancy symbols are mainly derived from the Greek alphabet.
To spare you the math, $$\sum_{k = 1}^n2^k = x = 2^n - 1$$ So when you do $$1 + 2 + 4 + 8 = 2^0 + 2^1 + 2^2 + 2^3 = \sum_{k = 0}^32^k = 15$$ and then multiply the furthest $RHS$ (Right Hand Side of the equation) by $2^3 = 8$, you will not get a perfect number since $15$ is not prime! $15 = 3\times 5$.
A nice trick is to know what $\sum_{k = 0}^n2^k$ is, is to just count how many numbers are there from $0$ to $n$ including $0$ and $n$ themselves. Let's call that number $d$. Then, $$\sum_{k = 0}^n2^k = 2^{d - 1}$$ And since $k$ is every number from $0$ to $n$ then all you need to do is count how many terms there are on the $LHS$.
Example:
$$\sum_{k = 0}^{64}2^k = 2^0 + 2^1 + 2^2 + 2^3 + \cdots + 2^{64} = 2^{65} - 1$$ Now there is no way in telling if $2^{65} - 1$ is prime just by looking at it... unless you know that if you want $2^n - 1$ to be prime, then $n$ must also be prime. And since $65$ is obviously divisible by $5$ (and $13$), then $2^{65} - 1$ is not prime, or at least a Mersenne Prime, so $$2^{65 - 1}(2^{65} - 1) = 2^{64}(2^{65} - 1) \neq \mathcal{P}$$ such that $\mathcal{P}$ is a perfect number. I hope now you can find a solution for $n$ in the following equation: $$\sum_{k = 0}^n2^k = \frac{496}{2^{n - 1}}$$ And perhaps by just making $496$ the subject (making it alone on the $RHS$) you can figure out why $\sum_{k = 0}^n2^k = 2^n - 1$ if you haven't already. Hope I helped! :)