(This question is cross-posted on [math.stackexchange](https://math.stackexchange.com/q/1860105/44643))


I'm playing with p-adic valuations, and find that the odd harmonic sums, $\tilde{H}\_k=\sum\_{i=1}^{k}\frac{1}{2i-1}$, has 2-adic valuation $||k^2||\_2=2||k||\_2$. 


E.g.) $\tilde{H}\_4=\frac{176}{85}$ has $||\tilde{H}\_4||\_2=||176||\_2=4=2||4||\_2$.


$\tilde{H}\_6=\frac{6508}{3465}$ has $||\tilde{H}\_6||\_2=2$. $||\tilde{H}\_8||\_2=||\frac{91072}{45045}||\_2=6$. $\cdots$


How can I prove this?


(Some simple observation I have tried: As [$||H\_k||\_2 =-r$ for $2^r\leq k <2^{r+1}$](http://www.math.uconn.edu/~kconrad/blurbs/ugradnumthy/padicharmonicsum.pdf), $||H\_k||\_2=||H\_{2k}||\_2+1=||\frac{1}{2}H\_k||\_2$. Thus ultrametric ineq for $\tilde{H}\_k=H\_{2k}-\frac{1}{2}H\_k$ doesn't help at all, yielding trivial result $\tilde{H}\_k\in \mathbb{Z}\_2$.)


(That $||\tilde{H}\_k||\_2=2||k||\_2$ for odd $k$ is almost trivial, so the problem can be reduced to show $||\tilde{H}\_{2k}||\_2=||\tilde{H}\_k||\_2+2$, still have no idea)


(I've checked this holds up to $\sim 1000$ using Mathematica, and Mathematica spits the result almost immediately for $n\sim 1000$ and takes about a minute for $n\sim 10000$. ) 


For anyone interested : I've used the following Mathematica code, try it yourself


`a = Table[
 IntegerExponent[
 Numerator[HarmonicNumber[2 n] - HarmonicNumber[n]/2], 2]/2, {n, 
 10000}];
b = Table [IntegerExponent[n, 2], {n, 10000}];
NonNegative[Min[a - b]]`



2-adic valuation of odd harmonic sums
It is sufficient to prove this result for the sum where $i$ ranges from $m 2^n + 1$ to $(m+1)2^n$. That is because $\tilde{H}\_k$ is a sum of an odd number of terms of this form with $n= ||k||\_2$, so if they all have $2$-adic valuation $2||k||\_2$ then $\tilde{H}\_k$ does as well.


To that end, consider what happens to the sum if we decrease each $i$ by $2^{n-1}$. That is the same as decreasing the denominator $1/(2i-1)$ by $2^n$.


$1/x - 1/(x-2^n) = 2^n/( x^2)+2^{2n}/( x^3) + \dots$


The terms with a factor of $2^{3n}$ or more are irrelevant, as is the $2^{2n}$ term because the sum over all odd numbers in an interval of length $2^n$ of $1/x$ is clearly even. 


Now in $\sum\_{i=r}^{r+2^n-1} \frac{2^n}{ (2i-1)^2}$, $1/(2i-1)$ ranges over all odd residue classes modulo $2^{n+1}$, so its square ranges over all residue classes modulo $2^{n+2}$ that are congruent to $1$ mod $8$, hitting each one twice. The sum of all those residue classes is $2^n + 16 \binom{2^{n-1}}{2} \equiv 2^n$ mod $2^{n+1}$. So the sum is $2^{2n}$ mod $2^{2n+1}$.


After performing this decrease an odd number of times, we are left with $\sum\_{i=-2^{n-1}+1}^{i=2^{n-1}} \frac{1}{2i-1}=0$ because the positive and negative terms cancel.


Hence the original sum is $2^{2n}$ mod $2^{2n+1}$.


