Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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
@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

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.