Sum of all divisors of the number $2^kp$

138 Views Asked by At

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!

2

There are 2 best solutions below

2
On

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) $$

0
On

You can enumerate the factors of a number from its prime factorisation by looking at every combination of powers of those primes. So for $n = 2^k p$, its factors are:

$$\begin{array}[rrrrr] \ 2^0 p^0 = 1, & 2^1 p^0 = 2, & 2^2 p^0 = 4, & \ldots, & 2^k p^0 = 2^k, \\ 2^0 p^1 = p, & 2^1 p^1 = 2p, & 2^2 p^1 = 4p, & \ldots, & 2^k p^1 = 2^k p \end{array}$$

Notice that both lines form geometric sequences, with the terms of the second line being $p$ times those in the first, so when you add them all up you get some geometric series sum $S$ for the top row and $pS$ for the bottom, giving $(1+p)S$ for the sum of both.