Re: diophantine equation 1/x + 1/y = 1/n



On Aug 22, 2:40 pm, "Philippe 92" <nos...@xxxxxxxxxxxx> wrote:
mukesh tiwari wrote :





On Aug 22, 1:03 pm, Proginoskes <CCHeck...@xxxxxxxxx> wrote:
On Aug 22, 12:32 am, mukesh tiwari <mukeshtiwari.ii...@xxxxxxxxx>
wrote:

hello everybody i want to know how many distinct solution of
equation(1/x+1/y=1/n) for given value of n .

If you are allowing negative integers, the answer is the number of
factors of (n^2). If you want only positive solutions, take the number
of factors of n^2, add 1, and then divide the whole thing by 2.

for example if n=4 then
three distinct solution (5,20)(6,12) and (8,8).
plz tell me the algorithm to solve this problem .

Basically, you combine the terms of 1/n - 1/y and use the fact that
this fraction reduces to 1/x.

negative numbers are not allowed . actually initially i was also using
the same algorithm but i think it seems to be failed for n=1260
answer is 113 . chk out this link .
<http://projecteuler.net/index.php?section=problems&id=110>

Hi,

1260^2 = 2^4 * 3^4 * 5^2 * 7^2 has
5*5*3*3 = 225 divisors (including 1 and 1260^2)
(225+1)/2 = 113

This is not a too large number, and the brute force agrees and gives
the full list of the 113 solutions.

Where is the failure ?

(your direct link to your pb110 fails, so does the internal link
from pb110 to pb108. This allways goes back to your index page)

And this reformulates your problems as :
"find the smallest square whose number of divisors is ..."

See also my own version of this problemhttp://chephip.free.fr/pba_en/pb036.html

and the topic of last month
"A lost treasure (Series within Parallel resistor combinations.)"
by Quentin Grady on sci.math
Message-ID: <ghhr93lgbf8r1vboga40422v2aecl4q0ig@xxxxxxx>

Regards.

--
Philippe C., mail : chephip+n...@xxxxxxx
site :http://chephip.free.fr/ (recreational mathematics)

thnkx a lot may be i confused and i have calculated only primefactor
of 1260 . thnkx again ....

.



Relevant Pages

  • Re: no lcm in standard library?
    ... which are comparable to the AMD K6 architecture, branch misprediction ... mispredict penalties tilt the algorithm choice in favor of Euclid's ... This implements the binary GCD algorithm which removes the branch ... that it approximates the divide as a 1-bit accurate divide, ...
    (comp.lang.c)
  • Re: rules of fixed-point arithmetic
    ... divide to keep everything fast. ... or you could even use one of the old bit shift divide ... used a good old bit shift algorithm. ... rather than table lookup, perhaps with simple correction factors / ...
    (comp.arch)
  • Re: returning none when it should be returning a list?
    ... It divide next by the list of previous prime numbers if next ... is not bigger than lim, count up all the times where it's not evenly ... Your basic algorithm as described above sounds workable, ...
    (comp.lang.python)
  • Re: can multi-core improve single funciton?
    ... divide: fib, fib ... def fib: ... versus millions of years for the OP's algorithm. ...
    (comp.lang.python)
  • Re: returning none when it should be returning a list?
    ... It divide next by the list of previous ... Your basic algorithm as described above sounds workable, ... the Sieve of Eratosthenesis a relatively simple ... If you want to look further into the subject, see the Primality Test ...
    (comp.lang.python)