# Proper decimal fraction for $\frac{4n+1}{n(2n-1)}$

Assume I have a function $f(n) = \frac{4n+1}{n(2n-1)}$ with $n \in \mathbb{N} \setminus \left\{ 0 \right\}$. The objective is to find all $n$ for which $f(n)$ has a proper decimal fraction. I know that any given fractiononly has a proper decimal fraction whenever the denominator only has the prime factors $2$ and $5$.

I wrote a script in Mathematica that calculated that for $n < 100000$ this only applies to $n_1 = 2 \lor n_2 = 8$. However this doesn't give me any explanation as to why this is the case. Assuming the fraction is already completely reduced: For $n(2n-1)$ to have the prime factors $2$ and $5$ only, $2n-1$ needs to have these prime factors as well. From this and the assumption I was able to figure that $n = \frac{1}{2} \left(5^i + 1 \right)$, whose last digit always is a $3$, which in turn means it is uneven. Also $n$ needs to have the prime factors $2$ and $5$ only, but as it needs to be uneven as shown before it can only have the prime factors $5$, which would however mean the last digit would have to be a $5$. I conclude that for every $n$ for which $f(n)$ has a proper decimal fraction, $f(n)$ cannot be already completely reduced, which means there are additional prime factors in the denominator that are also in the numerator. This coincides with the results the Mathematica script gave me, but I have no idea how to go about finding these common prime factors and possibly eliminating them, etc.

I would greatly appreciate any help here!

Regards, bk1ng

• Does 'proper decimal fraction' mean the same as 'finite decimal expansion'? – Servaes Feb 26 '14 at 15:54
• Apperantly it does. My book uses 'proper decimal fraction', but the internet says it's the same. – Bk1ng Feb 26 '14 at 16:02
• Did you notice that $\,n\,$ and $\,2n-1\,$ are coprime? Ditto for $\,n,4n+1.$ And $(2n-1,4n+1) = (n+1,3).\$ – Bill Dubuque Feb 26 '14 at 16:04
• It is also worth noting that $n$ and $4n+1$ are coprime. – Servaes Feb 26 '14 at 16:06
• Honestly? No. I did not come up with that. But now that you pointed it out... I can see how it simplifies what I did to prove that the fraction cannot be completely reduced, but I don't see how it would ultimately solve my problem... – Bk1ng Feb 26 '14 at 16:08

Note that $\gcd(4n+1,n)=1$ and $\gcd(4n+1,2n-1)=\gcd(3,2n-1)\in\{1,3\}$. Thus $n$ must be of the form $n=2^a5^b$ and the odd number $2n-1$ must be of the form $2n-1=5^c$ or $2n-1=3\cdot 5^c$ with $a,b,c\in\mathbb N_0$. So from $1=2\cdot n-(2n-1)$ we find $$\tag1 1 = 2^{a+1}5^b-5^c\qquad \text{or}\qquad 1=2^{a+1}5^b-3\cdot 5^c.$$In both cases $(b\ge1\land c\ge1)$ leads to a contradiction as the right hansd side then is a multiple of $5$, hence $b=0$ or $c=0$. The case $c=0$ is easy: $1=2^{a+1}5^b-1$ leads to $a=b=0$, $\color{red}{n=1}$; and $1=2^{a+1}5^b-3$ leads to $a=1, b=0$, i.e. $\color{red}{n=2}$. Remains the case $b=0$ and $c>0$, i.e. $$\tag2 1=2^{a+1}-(1\text{ or }3)\cdot5^c.$$ Since $c>0$, by taking remainders modulo $5$ we find in both cases $$\tag3 1\equiv 2^{a+1}\pmod 5.$$ This implies that $a+1$ is a multiple of $4$, so $2^{a+1}=16^d$ for some $d$. Rearranging $(2)$ we find $$\tag4(1\text{ or }3)\cdot 5^c = 16^d-1=(4^d-1)(4^d+1).$$ At most one of the factor $4^d\pm1$ is a multiple of $5$, hence the other must be $\le3$. The only possibility is $d=1$, which leads to $a=3$, i.e. $\color{red}{n=8}$.

• How do you deduce that $gcd(4n+1,2n−1)=gcd(3,2n−1)$? – Bk1ng Feb 26 '14 at 16:52
• By noting that $\gcd(4n+1,2n-1)$ divides $(4n+1)+(2n-1)=6n$, and using the fact that $4n+1$ is odd and $\gcd(4n+1,n)=1$. – Servaes Feb 26 '14 at 17:11
• Alright, that makes sense :) – Bk1ng Feb 26 '14 at 17:13

$4n+1$ is relatively prime to $n$, and $\gcd(4n+1, 2n-1)$ is either $1$ or $3$. So $n$ must be a power of $2$ times a power of $5$, and $2n-1$ is either that or $3$ times that. If $n$ is divisible by $2$, $2n-1$ is not; if $n$ is divisible by $5$, $2n-1$ is not. So you have four possibilities to consider:

1) $n = 2^p$, $2n-1 = 3 \times 5^q$, thus $2^{p+1} - 3 \times 5^q = 1$

2) $n = 2^p$, $2n-1 = 5^q$, thus $2^{p+1} - 5^q = 1$.

3) $n = 5^p$, $2n-1 = 3 \times 2^q$, thus $2 \times 5^p - 3 \times 2^q = 1$

4) $n = 5^p$, $2n-1 = 2^q$, thus $2 \times 5^p - 2^q = 1$

(2) is ruled out by Catalan's conjecture (Mihailescu's theorem).

(4) is ruled out by congruence mod $2$.

I think the others can be looked at using Størmer's theorem.

• I'm currently trying to get my head around that... As soon as I understand why this is I will accept. – Bk1ng Feb 26 '14 at 16:26
• For cases $(3)$ and $(4)$: By congruence mod $2$ we have $q=0$ and hence $n=2$ (a contradiction) resp. $n=1$. – Servaes Feb 26 '14 at 16:29
• For case $(2)$ it is not necessary to use such heavy machinery: If $2n=5^q+1$ then $2n\equiv2\pmod4$ so $n=1$. – Servaes Feb 26 '14 at 16:32
• For case $(1)$: Note that $2$ divides $p+1$ by conruence mod $3$. But then $$3\times5^q=2n-1=2^{p+1}-1=(2^r-1)(2^r+1),$$ where $r=\tfrac{p+1}{2}$. These factors are coprime, so either $r=1$ or $r=2$, and hence $n=2$ or $n=8$, respectively. – Servaes Feb 26 '14 at 16:40