# Representing every positive rational number in the form of $(a^n+b^n)/(c^n+d^n)$

About a month ago, I got the following :

For every positive rational number $r$, there exists a set of four positive integers $(a,b,c,d)$ such that $$r=\frac{a^\color{red}{3}+b^\color{red}{3}}{c^\color{red}{3}+d^\color{red}{3}}.$$

For $r=p/q$ where $p,q$ are positive integers, we can take $$(a,b,c,d)=(3ps^3t+9qt^4,\ 3ps^3t-9qt^4,\ 9qst^3+ps^4,\ 9qst^3-ps^4)$$ where $s,t$ are positive integers such that $3\lt r\cdot(s/t)^3\lt 9$.

For $r=2014/89$, for example, since we have $(2014/89)\cdot(2/3)^3\approx 6.7$, taking $(p,q,s,t)=(2014,89,2,3)$ gives us $$\frac{2014}{89}=\frac{209889^3+80127^3}{75478^3+11030^3}.$$

Then, I began to try to find every positive integer $n$ such that the following proposition is true :

Proposition : For every positive rational number $r$, there exists a set of four positive integers $(a,b,c,d)$ such that $$r=\frac{a^\color{red}{n}+b^\color{red}{n}}{c^\color{red}{n}+d^\color{red}{n}}.$$

The followings are what I've got. Let $r=p/q$ where $p,q$ are positive integers.

• For $n=1$, the proposition is true. We can take $(a,b,c,d)=(p,p,q,q)$.

• For $n=2$, the proposition is false. For example, no such sets exist for $r=7/3$.

• For even $n$, the proposition is false because the proposition is false for $n=2$.

However, I've been facing difficulty in the case of odd $n\ge 5$. I've tried to get a similar set of four positive integers $(a,b,c,d)$ as the set for $n=3$, but I have not been able to get any such set. So, here is my question.

Question : How can we find every odd number $n\color{red}{\ge 5}$ such that the following proposition is true?

Proposition : For every positive rational number $r$, there exists a set of four positive integers $(a,b,c,d)$ such that $$r=\frac{a^n+b^n}{c^n+d^n}.$$

Update : I posted this question on MO.

Added : Problem N2 of IMO 1999 Shortlist asks the case $n=3$.

• What a very good and difficult question! It might be easy, as you propose, to find a counter example for the odd cases. Always feel free to use modular arithmetic when you are faced with integers (the top and bottom of the expression). Commented Mar 20, 2015 at 21:05
• @William how so?
– MT_
Commented Mar 21, 2015 at 2:35
• @Soke, I rescind my comment. Fermat's Last Theorem applies somehow but not sure exactly how. Commented Mar 21, 2015 at 3:04

## 2 Answers

For the above problem there are four sets of solutions (this is intuitive: for a, b, c, & d). In the case of positive rational r and any odd number n we can eliminate all but one of the solutions:

$d^n = 5 \wedge c^n = 1 \wedge a^n + b^n = 30 \wedge r = 5 \wedge a^n \in Z$

In the case of any odd number n≥3 we refer to the generating function:

$a^{2 n + 1} + b^{2 n + 1} = 30 \wedge c^{2 n + 1} = 1 \wedge d^{2 n + 1} = 5 \wedge r = 5 \wedge a^{2 n + 1} \in Z$

As well as the case of every odd number n≥5 (et. al):

$a^{2 n + 3} + b^{2 n + 3} = 30 \wedge c^{2 n + 3} = 1 \wedge d^{2 n + 3} = 5 \wedge r = 5 \wedge a^{2 n + 3} \in Z$

Quickly we discover that it doesn't matter the value of n, as long as it's odd and positive, leading to the generalization:

$r = -c_5-1 \wedge a^{2n+1} + b^{2n+1} = (c_1+c_4+1)(c_5+1) \wedge c^{2n+1}+c_3 = c_1+c_2+1 \wedge c_2+d^{2n+1} = c_3+c_4 \wedge (c_5 | c_4 | c_3 | c_2 | c_1 | a^{2n+1}) \in Z$

For all n:

$r = -c_5-1 \wedge$

$a^n + b^n = (c_1+c_4+1)(c_5+1) \wedge$

$c^n+c_3 = c_1+c_2+1 \wedge$

$c_2+d^n = c_3+c_4 \wedge$

$(c_5 | c_4 | c_3 | c_2 | c_1 | a^n) \in Z$

Note: this isn't a complete answer so it might be more appropriate as a comment, but pending reputation I may as well take a naive crack at it. Excuse any abuse of notation or lack of comprehension--it's been over a decade since I've had any formal mathematics. Lastly, I welcome criticism, especially if it's informative and friendly!

• Also, see: en.wikipedia.org/wiki/Pell%27s_equation Commented Apr 15, 2015 at 8:36
• Could you explain where the 5 and 30 come from? Commented Apr 15, 2015 at 11:16
• Trial and error -- simply plugging in digits until finding an integer solution. I suspect it's the first integer solution but I'm not sure. I'll expand the post with the steps I took. Commented Apr 15, 2015 at 12:09

Your solution for n=3 includes an implicit change of variables: $$\left(a,b,c,d\right)=\left(x+y,x-y,u+v,u-v\right)$$ $$r = \left(2x/2u\right)\left(x^2+3y^2\right)/\left(u^2+3v^2\right)$$ at which point the substitution $$\left(x,y,u,v\right)=\left(3ps^3t,9qt^4,9qst^3,ps^4\right)$$ yields the desired result of $$r=p/q$$

A similar two-step substitution for $$n\ge 5$$ may simplify the search

for n=5, the substitution

$$\left(a,b,c,d\right)=\left(x+y,x-y,u+v,u-v\right)$$

yields

$$r = \left(2x/2u\right)\left(x^4+10x^2y^2+5y^4\right)/\left(u^4+10u^2v^2+5v^4\right)$$