Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Starting with the equation:


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:


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?

share|cite|improve this question
$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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.