Let k be a positive integer and let p be a prime number that is greater than 2. The sum of all divisors of the number $2^kp$ is:
Answer: $(2^{k+1}-1)(1+p)$
As for the first parenthesis, I understand that the answer is $2^{k+1}$.
This is because when you take the prime facorization of a number, you then get how many times a factor shows up, then taking the factors of those, you get $n^0 ,n^n$ etc. This means that the sum for all factors is just geometrical summation with the exponent plus one.
However, where is the $(1+p)$ coming from? I don't see a place in my equation or in any other examples where this kind of a thing shows up.
All help is appreciated! Thank you!
We can use the Divisor function: $$ \sigma(n) = \sum_{1\le d\mid n} d $$ Which can be calculated using the fomula: $$ \sigma(n) = \prod_{i=1}^m \frac{p_i^{r_i+1}-1}{p_{i}-1} $$ Where $$n=\prod_{i=1}^m p_i^{r_i}$$ Such that $p_1,\dots,p_m$ are different prime numbers.
In our case $$n=2^kp \Longrightarrow \sigma(n)= \frac{2^{k+1}-1}{2-1}\cdot \frac{p^2-1}{p-1}=(2^{k+1}-1)(p+1) $$