MathLabs

Problem 2

A positive integer is called fancy if it can be expressed in the form 2a1+2a2+⋯+2a1002^{a_1}+2^{a_2}+\cdots+2^{a_{100}}, where a1,a2,…,a100a_1,a_2,\ldots,a_{100} are non-negative integers that are not necessarily distinct. Find the smallest positive integer nn such that no multiple of nn is a fancy number.
Step 4 of 5: Large exponent case for a minimal counterexample
cn=2a1+⋯+2ar, r≤100, ar≥101⟹2ar=2ar−101n+2ar−101cn=2^{a_1}+\cdots+2^{a_r},\ r\le100,\ a_r\ge101\Longrightarrow 2^{a_r}=2^{a_r-101}n+2^{a_r-101}
Detailed analysis

Suppose for contradiction that some multiple cncn of n=2101−1n=2^{101}-1 is fancy. Replacing repeated powers by their binary carry operation, it has a representation with at most 100100 distinct powers; choose such a representation with cc minimal, and let ara_r be its largest exponent. If ar≥101a_r\ge101, then 2ar=2ar−101n+2ar−1012^{a_r}=2^{a_r-101}n+2^{a_r-101}, so replacing 2ar2^{a_r} by 2ar−1012^{a_r-101} decreases cncn by 2ar−101n2^{a_r-101}n, giving a smaller positive multiple of nn with at most 100100 binary powers, contradicting minimality of cc.