runtime_error's blog

By runtime_error, 11 years ago, In English

i know that is not programming task at all but if you help me i will happy.

  • Vote: I like it
  • +2
  • Vote: I do not like it

»
11 years ago, # |
  Vote: I like it +11 Vote: I do not like it

Actually, it can be solved as programming task.

Notice, that if both x, y > 2 * 2013, then 1/x + 1/y < 1/2013.

Say y<=2013, iterate now x = 1 / (1/2013 — 1/y). Check if it's natural.

»
11 years ago, # |
Rev. 2   Vote: I like it +13 Vote: I do not like it

f(n) — number of solutions of 1/n = 1/x + 1/y

f(n * m) = f(n) * f(m); n, m — coprime

f(p^k) = 2*k + 1; p — prime

»
11 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Not full solution.

Let's see this equation: (x+y)/(xy)=1/2013. If x+y=k & xy=2013*k it will be OK. Let's solve this system of equations.

x = k — y => (k-y)y=2013k <=> -1/k * y^2 + y — 2013 = 0, there's D = 1 — 4*2013/k.

y = ( 1+sqrt(D) ) * k / 2.

D>=0 <=> k>=4*2013. Let k = 4*2013*L, there's L>=1 — natural number.

From here we got D=1-1/L and y=k/2 + k*sqrt(D)/2 = 2*2013*L + 2*2013*sqrt(L^2-L).

L^2-L is natural => L*(L-1) = q^2 for natural q. For L=1 it's OK. If L>=2 then L and L-1 are co-prime and L(L-1)=k^2 <=> L=q^2 & L-1=t^2 for natural q and t. But such numbers doesn't exist.

If L=1 then y=2*2013 and x=2*2013.

»
11 years ago, # |
  Vote: I like it +11 Vote: I do not like it

1/x+1/y=1/2013 => 2013(x+y)=xy => (x-2013)*(y-2013)=2013*2013.

»
11 years ago, # |
  Vote: I like it +17 Vote: I do not like it

and then . That's mean x, y > 2013. Lets x = 2013 + a, y = 2013 + b.



2013(2013 + a + 2013 + b) = (2013 + a)(2013 + b)
20132 = ab

And now you must only calculate amount of ways to factorize 20132 — can you solve this problem?

  • »
    »
    11 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Well, let we want to factorize some number n. First we factorize it to prime numbers: assume that n = p1a1 × p2a2 × ... × pkak.

    Lets x in divisor of n. Since x — divisor of n, if x divides to some prime q, then n must divides to q. Therefore x can divides only to primes p1, p2, ..., pk. And, if x = p1b1 × p2b2 × ... × pkbk, we now that b1 ≤ a1, b2 ≤ a2, and so on.

    Then b1 = 0..a1 — it's (a1 + 1) variants. b2 = 0..a2 — it's (a2 + 1) variants, and so on. Finally we can calculate amount of different x, it is the same as that amount of sets of bi and it is equals to (a1 + 1) × (a2 + 1) × ... × (ak + 1).

»
11 years ago, # |
  Vote: I like it +1 Vote: I do not like it

This problem is present in e-olimp.com link