# Calculate the number of times that $2$ appears in the prime-factorization of a given number?

Given a positive odd integer $K$ with a prime-factorization of $\prod\limits_{i=1}^{m}{P_i}^{N_i}$, is there a mathematical method for calculating the number of times that $2$ appears in the prime-factorization of $K+1$?

By mathematical method I mean, calculating the above using $P_i$ and $N_i$ for each $1 \leq i \leq m$.

For example, consider:

• $K=3^2 \times 5^1 \times 11^1 = 495$
• $K+1 = 496 = 2^4 \times 31$
• So the number of times that $2$ appears in the prime-factorization of $K+1$ is $4$