# How many integer solutions to a diophantine equation

Starting with the equation:

$\frac{1}{a}+\frac{1}{b}=\frac{p}{10^n}$,

I reached the equation:

$10^{n-log(p)} = \frac{ab}{a+b}$.

Now given the positive integer $n$, for what integer values of $p$ would the value of:

$10^{n-log(p)}$,

be rational?

Also, given positive integers $n$ and $p$, how would we find positive integer solutions to $a$ and $b$ that satisfy the second equation, where:

$a ≤ b$,

And is it possible to determine, given $n$ and $p$, how many $a$ and $b$ solutions exist?

-
$10^{n - \log p} = \frac{10^n}{p}$ is always rational. – Qiaochu Yuan Aug 18 '12 at 7:00
This is Project Euler problem 157 – Mike Aug 18 '12 at 7:48
And we have been asked not to discuss Project Euler problems. (base-10 logarithms? really??) – Gerry Myerson Aug 18 '12 at 10:23
@GerryMyerson: I also read the part where he said a distinction was made between those who worked on the question and those who just repeat it. Also, why do we care what some modmin somewhere says? Should we track every homework back to the teacher and ask? – ex0du5 Aug 18 '12 at 13:12
We care because we are decent human beings. All I can do is point you to the discussions we've had. If they don't convince you, nothing I add is likely to convince you. Anyway, this isn't the place to discuss it. Open a thread on meta, if you want to pursue these questions. – Gerry Myerson Aug 18 '12 at 13:17