0

Let's put $A=100!$

Find the highest power of 2 in A after the decomposition of A of prime numbers

I tried this :

$$ A=1\times2\times3\times4\times\ldots\times99\times100\\ =(2\times4\times6\ldots\times100)\times(1\times3\times5\times \ldots\times99)\\ =2(1+2+3+...+50)((2+1)(4+1)(6+1)...(98+1)) $$

Ant
  • 21,098
user233658
  • 1,254
  • 1
    If you are asking for the highest power of 2 in 100!,it can be got as sum of all [100/2^n] where n varies from 1 to 6 and [n] is the greatest integer function – user3615045 Jul 18 '16 at 16:16
  • @Ant: Makes sense, although it was such a charming use that I thought about just adjoining the usual term as a footnote. – Brian Tung Jul 18 '16 at 16:33
  • @BrianTung As I don't speak French, it was not charming, just confusing :-) – Ant Jul 18 '16 at 16:36
  • 1
    The last passage is nonsense to me. Why does the product become a sum? –  Jul 18 '16 at 17:18
  • 1
    Possible duplicate of Highest power of a prime $p$ dividing $N!$. While the Question above contains a fairly erroneous attempt to answer, I don't think that makes it worthwhile to keep open, given the numerous similar problems on the site since early days. – hardmath Jul 18 '16 at 18:15

3 Answers3

1

Sum up $trunc(\frac{100}{2^k})$ , $1\le k\le 6$. You get $$50+25+12+6+3+1=97$$

Note that $2^7>100$

Peter
  • 84,454
  • 1
    Peter's answer is correct. The result presented in his answer is an application of Legendre's formula (see: https://en.wikipedia.org/wiki/Legendre's_formula). – Xaver Jul 18 '16 at 16:30
  • @Xaver: Yeah, I was answering the wrong question (despite my comment that suggested the exact reverse!). – Brian Tung Jul 18 '16 at 16:36
1

Another approach: This is the same basic approach as in Peter's answer, but gets at the value in a different way. Let $m = $ the number of $1$'s in the binary expansion of $n$. Then the answer is $n-m$. Since the binary expansion of $100$ is $1100100$, the answer is $100-3 = 97$.

This can be seen as follows: As per Peter's answer, we are calculating $P_2$, the exponent of $2$, as

$$ P_2 = \sum_{k=1}^\infty \text{trunc} \left(\frac{n}{2^k}\right) $$

Peter has it as $k = 1$ to $6$, but since the truncations after $k = 6$ add nothing, this doesn't change the final result, and will make the explanation clearer (I hope). On the other hand, we can also write

$$ n = \sum_{k=1}^\infty \frac{n}{2^k} = \frac{n}{2} + \frac{n}{4} + \frac{n}{8} + \cdots $$

If we write $n$ out in binary, we find that the difference $n-P_2$ is accounted for exactly by the $1$'s in that binary expansion: As we successively halve $n$, we have an excess whenever a $1$ is encountered in the ones digit. At that point, halving produces an excess of $1/2$. In the next halving, it produces an additional excess of $1/4$, then $1/8$, etc. As a result, as $k$ runs from $1$ to $\infty$, each $1$ produces an excess of $1/2+1/4+1/8+\cdots = 1$. The total excess is therefore $m$, and since $n-P_2 = m$, it follows that $P_2 = n-m$.

Just for good measure, the exponent of $2$ in prime factorization of $(100!)!$ is $100! - 207$, since there are $207$ $1$'s in the binary expansion of $100!$ (which has $525$ digits in all, the last $97$ of which are $0$, as you would expect).

Brian Tung
  • 34,160
  • Never heard of this method. +1 It would be nice if you would prove that it works. – Peter Jul 18 '16 at 16:36
  • 1
    @Peter: Just a calculating trick. I've added an explanation, not quite a proof, but it could be turned into one. – Brian Tung Jul 18 '16 at 16:47
1

Your formula in the last row is incorrect, but if you fix it, it should put you on the right path.

$$100! = (2 \times 4 \times 6 \cdots \times 100) \times (\text{an odd number}) = 2^{50} \times 50! \times (\text{an odd number}),$$

so this gives you an exponent of $50$, plus whatever the exponent of $2$ in $50!$. You should be able to recognize a recurrence here: this is why the answer is $50 + 25 + \cdots$ as in Peter's answer.