Originally Posted by
desiresjab
As an intersting extension of the (2n)! problem, I have realized it is possible to determine the exact number of factors of 2 in the interval (1, 2n) without recourse to the floor function which is the the usual manner. I have derived by observation the piecemeal formula that works for all values of x≥1, and I would have no need of the floor function, then, to determine the number of 2's in virtually any factorial. If I do not lay it out in a list it will be harder to conceptualize. Near the end of the list I realize I need only include even values in the range (1, 2x) to get a formula.
(2·4)!=8·7·6·5║·4·3·2·1
...........3....1......2....1
(2·5)!=10·9·8·7·6·║5·4·3·2·1
............1.....3....1......2....1
(2·6)!=12·11·10·9·8·7║·6·5·4·3·2·1
............2.........1....3......1.....2...1
(2·7)!=14·13·12·11·10·9·8·║7·6·5·4·3·2·1
............1........2.........1....3......1....2. ...1
(2·8)!=16·15·14·13·12·11·10·9║·8·7·6·5·4·3·2·1
............4........1........2........1.......3.. ..1....2....1
(2·9)!=18·16·14·12·10║·8·6·4·2·1
............1...4....1...2...1...3.1.2.1
(2·10)!=20·18·16·14·12·║10·8·6·4·2·1
..............2...1...4....1...2....1..3.1.2.1
Certain patterns now appear.
1 for even x, the two partitions have the same number of elements
2 For odd x the upper partition gets a bonus factor of 2 among its elements.
3 Every number divisible by 2 in x≥(x/2) has a double in the upper partition with exactly one more factor of 2.
4 Where x is a power of 2, the lower partition has one less factor of 2 than the upper, so the count in this special case is easy. The general method below, however, still applies.
5 To determine y in the equation below, merely count how many even elements in x are≥(x/2), and add one to the value of y for each case. If x is odd, we add one additional bonus factor, and we are done.
2x+y+k, where y is the number of even elements in the interval (1, x) that are ≥(x/2), and k=0 when x is even, k=1 when x is odd: