2

I was doing a codechef question https://www.codechef.com/problems/LCMMANIA which asks us to find, three numbers $A, B, C$ such that given $N$:

$N = lcm(A, B) + lcm(B, C) + lcm(C, A)$

While solving the question i made an observation that if $N$ is a power of 2 there would be no valid $A, B, C$ satisfying the above equation (I tested it by writing brute force code)

I tried proving that myself but just couldn't get anywhere. I searched on google and even tried ChatGPT but nothing gave me a satisfying logical explanation.

My Question:so How do we prove that statement?

1 Answers1

2

W.L.O.G let $A=2^ka$, $B=2^lb$, $C=2^mc$ where $k\leq l\leq m$ and a,b,c are odd numbers

Then $$N=2^llcm(a,b)+2^mlcm(b,c)+2^mlcm(c,a)$$

Its obvious that N should be divisible by at least $2^l$ after cancelling we get an odd number on rhs which implies the largest power of 2 in N is $l$

But if N is a power of 2 we get $$1=lcm(a,b)+2^{m-l}lcm(b,c)+2^{m-l}lcm(c,a)\geq 3$$

Which is obviously false

RandomGuy
  • 1,349