How many functions $f(x)$, $f:N→N$ exist such that $LCM(f(n),n)-HCF(f(n),n)<5$?

374 Views Asked by At

How many functions $f(x)$, $f:N→N$ exist such that $LCM(f(n),n)-HCF(f(n),n)<5$?

After understanding the helpful comment by @player3236, I have realised that the reasoning I used to try and solve this question was wrong. However I have still added it below for reference.

Any method or hints on how to solve this question?

My flawed reasoning: I thought that since the domain and region of the functions are both $N$, the possible operations must include addition, multiplication and exponential functions (where power is a positive integer). Let us assume the function is $f(x)=x+c$ where $c$ is a natural number. In that case, there will always be some cases where the LCM is much greater than the HCF and the inequality will not be satisfied.Same goes for multiplication. Let us assume the function is some $f(x)=cx$ where $c$ is a natural number. The $LCM$ of $f(n),n$ will be $f(n)$ and $HCF$ will be $n$. In cases where $cn-n>5$, this inequality wont hold.I used similar reasoning for exponential functions. Thus the only case where this works out is $f(x)=x$, in which case $LCM(f(n),n)=HCF(f(n),n)=n$ and thus the inequality will hold. So only one function is possible.

Thanks in advance!

Regards

1

There are 1 best solutions below

2
On BEST ANSWER

Easily to check that the system \begin{cases} \text{LCM }(m,n) - \text{HCF }(m,n) < 5\\ m<n \end{cases} has exactly eight solutions $$\binom mn =\left\{\binom12 ,\binom 13,\binom14, \binom15,\binom24 ,\binom26 ,\binom36 ,\binom48\right\}.$$ Also, $m=n$ is the solution of the first equation.

Then there are $5$ alternatives for $f(1),$ $4$ alternatives for $f(2),$ $3$ alternatives for $f(3),$ $4$ alternatives for $f(4),$ $2$ alternatives for $f(5),$ $3$ alternatives for $f(6)$ and $2$ alternatives for $f(8).$

Thus, it can be built $$5\times4^2\times3^2\times2^2 = \color{brown}{\mathbf{2880}}$$ different variants of the function with the given properties.