0
$\begingroup$

How many functions f:N→N satisfy - $$lcm(f(n), n) - hcf(f(n), n)<5?$$

$Attempt$

At first I tried to use the property that

LCM*HCF=Product of the two numbers

Hence I got $$lcm.hcf=n.f(n)$$

And the other given relation in the question.

But, after this I was not able to proceed further.

Any hints/suggestions?

$\endgroup$

marked as duplicate by metamorphy, Community Jun 5 at 6:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0
$\begingroup$

Hint: Suppose $f(n)<n$. Then $\gcd(f(n),n)\leq n/2$ and $\operatorname{lcm}(f(n),n)\geq n$, so $\operatorname{lcm}(f(n),n)-\gcd(f(n),n)\geq n/2$. Similarly for $f(n)>n$. So you only need to check the possible $f(n)$ for a few values of $n$.

$\endgroup$
  • $\begingroup$ What is reason behind the statement about gcd being less than half of n? $\endgroup$ – jayant98 Jun 5 at 6:28
  • $\begingroup$ Because it has to be a divisor of $n$, and $n$ itself is ruled out because $f(n)<n$. The largest divisor possible of $n$ apart from $n$ itself is $n/2$. $\endgroup$ – user10354138 Jun 5 at 6:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.