# 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
Yes it is, but no where in my question did I ask for an answer to the problem, I asked specifically for integer solutions when given $n$ and $p$. My actual question is purely mathematical. – Khaled Aug 18 '12 at 12:02
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