This is a variation of this question. I want to find the number of factors for a given large integer that I already know to be a power of 2.
Given that the number is a power of 2, does that help by eliminating most scenarios e.g.
- factors cannot be odd.
- at least one number of a factor pair has to be a power of 2 itself.
Question:
- What other properties does the power series of 2 have that I can use to find factors more efficiently?
- How can I represent the same in the form of an equation or function?
If you already know the number is a power of 2, then all the factors are also powers of 2. So, if $n=2^k$, then the factors are $1, 2, 2^2, \dots 2^k$, and there are exactly $k+1$ of them.