Let the sum

$$ {1+ \frac12 + \frac13 + \frac 14+ \dots +\frac1{99} + \frac 1{100}}$$

be written as $\frac AB$, where $A$ and $B$ are positive integers with no common factors. Show that neither $A$ nor $B$ is divisible by $5$.


Using Mathematica, I found the sum is $$\frac AB=\frac {14466636279520351160221518043104131447711}{278881500918849908658135235741249214‌2272}$$


Firstly $\frac{1}{25} + \frac{1}{50} + \frac{1}{75} + \frac{1}{100} = \frac{1}{25} \left( \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} \right) = \frac{1}{12}$.

Also $\frac{1}{25k+5} + \frac{1}{25k+10} + \frac{1}{25k+15} + \frac{1}{25k+20} = \frac{1}{5} \left( \frac{(5k+4)+(5k+1)}{(5k+1)(5k+4)} + \frac{(5k+3)+(5k+2)}{(5k+2)(5k+3)} \right)$

  $\ \ = \frac{2k+1}{(5k+1)(5k+4)} + \frac{2k+1}{(5k+2)(5k+3)}$ for any integer $k$.

Therefore $\sum_{k=1}^{100} \frac{1}{k}$ has no factor of $5$ in the reduced fraction form.


I have found a solution for this question.

Firstly, split the numbers $\{1,2,\dots,100\}$ into three sets upon their divisibility by $5$.For $k=0,1,2$ $S_k$ be the set numbers $n$ between $1$ and $100$ (both inclusive) such that $k$ is the highest power of $5$ that divides $n$. Then, $$S_0=\{1,2,3,4,6,7,8,9,11,\dots,96,97,98,99\}$$ $$S_1=\{5,10,15,20,30,\dots,70,80,85,90,95\}$$ $$S_2=\{25,50,75,100\}$$

Now, let $A_k$ for $k=0,1,2$ be defined as $$A_0=100!\left(1+\frac 12+\frac 13+\frac 14+\frac 17+\dots+\frac 1{96}+\frac 1{97}+\frac 1{98}+\frac 1{99}\right)$$ $$A_1=100!\left(\frac 15+\frac 1{10}+\frac 1{15}+\frac 1{20}+\frac 1{30}+\dots+\frac 1{85}+\frac1{90}+\frac 1{95}\right)$$ $$A_2=100!\left(\frac 1{25}+\frac 1{50}+\frac 1{75}+\frac 1{100}\right)$$

Then, $A_0,A_1,A_2$ are all integers, and $$\frac AB=\frac {A_0+A_1+A_2}{100!}\tag1$$

Now, $$A_2=\frac {100!}{25}\left(1+\frac 12+\frac 13+\frac 14\right)=\frac {100!}{25}\times\frac {25}{12}=\frac {100!}{12}.$$

Let, $power(a,b)$ denotes the highest power of $a$ that divides $b$. Then, $$\color{blue}{power(5,A_2)=20+4=24}$$(one can easily verify, since $\gcd(5,12)=1$, $power(5,A_2)=power(5,100!)$).

Now, let $$N=\frac 1{5n+1}+\frac 1{5n+2}+\frac 1{5n+3}+\frac 1{5n+4}=\frac{50(2n+1)(5n^2+5n+1)}{(5n+1)(5n+2)(5n+3)(5n+4)}.$$

So, the denominator is indivisible by $5$, also $(5n^2+5n+1)$. Hence $power(5,N)\ge 2$, for the factor $50$ in the numerator (as there is no multiple of $5$ in the denominator, $50$ will never cancel out).

Now, $$A_1=\frac {100!}5\left[\left(1+\frac 12+\frac 13+\frac 14\right)+\dots+\left(\frac1{16}+\frac 1{17}+\frac 1{18}+\frac1{19}\right)\right]$$

So, we have $$\color{blue}{power(5,A_1)\ge24-1+2=25}$$

Similarly, $$A_0=100!\left[\left(1+\frac12+\frac13+\frac14\right)+\dots+\left(\frac 1{96}+\frac 1{97}+\frac 1{98}+\frac 1{99}\right)\right]$$

So, $$\color{blue}{power(5,A_0)\ge24+2=26}$$

From the three $\color{blue}{emphasized}$ consequences, we can say that $$\color{red}{power(5,A_0+A_1+A_2)=24}$$(one may feel confused here, but earlier I said $power(5,A_0)\ge24+2=26$ and $power(5,A_1)\ge24-1+2=25$, note that if greater power of $5$ than $24$ divides a quantity, then the power $24$ also divides that quantity).

Let, $\frac {A'}{B'}$ be the fraction before it's reduction to $\frac AB$ in $(1)$

So, from $(1)$, we can say that $$\color{red}{power(5,A')=24}$$

Also, from $(1)$, $$\color{red}{power(5,B')=power(5,100!)=24}$$

So, the numerator and denominator is divisible by the same power of $5$.

So, when the common factors, specially $5^{24}$ are cancelled away, then $A$ and $B$ both are indivisible by $5$.