We give an "examination of all cases" solution. Use the fact that $\varphi(n)$ is multiplicative. Let
$$n=2^a p_1^{e_1}p_2^{e_2}\cdots p_k^{e_k},$$
where the $p_i$ are distinct odd primes, the $e_i$ are $\ge 1$, and $a \ge 0$.
Then
$$\varphi(n)=\varphi(2^a)\varphi(p_1^{e_1})\varphi(p_2^{e_2})\cdots \varphi(p_k^{e_k}).$$
We find all $n$ such that $\varphi(n)=6$. If $k \ge 2$, then since $\varphi(p_i^{e_i})$ is even, $\varphi(n)$ is divisible by $4$, so cannot be equal to $6$.
If $k=0$, then $\varphi(n)=\varphi(2^a)$. But $\varphi(2^a)=1$ if $a=0$ and $\varphi(2^a)=2^{a-1}$ if $a \ge 1$. So if $k=0$ we cannot have $\varphi(n)=6$.
We conclude that $k=1$. Thus $n$ must have the shape $2^ap^e$, where $a \ge 0$ and $p$ is an odd prime.
But $\varphi(p^e)=p^{e-1}(p-1)$. It follows that $p \le 7$. If $p=7$, then $p-1=6$, so we must have $e=1$ and $\varphi(2^a)=1$. This gives the solutions $n=7$ and $n=14$.
We cannot have $p=5$, for $4$ divides $\varphi(5^e)$.
Let $p=3$. If $e \ge 3$, then $\varphi(3^e)\ge (3^2)(2)$. So we are left with the possibilities $e=1$ and $e=2$.
If $e=1$, then $\varphi(n)=\varphi(2^a)(2)$. This cannot be $6$.
Finally, we deal with the case $e=2$. Note that $\varphi(3^2)=6$. So to have $\varphi(2^a3^2)=6$, we need $\varphi(2^a)=1$, which gives $n=9$ and $n=18$.
By manual testing, $n=1$, $n=2$, $n=4$, $n=6$, $n=8$ have the desired property and are the only numbers $<9$ with it.
Let $n$ be a natural number that is divisible by all natural numbers $\le \sqrt n$. So if we let $a=\lfloor \sqrt n\rfloor$ then $a$ and $a-1$ (if $>0$) are by divisors of $n$. If we additionally assume $n\ge 9$ then $a\ge 3$.
Since $a$ and $a-1$ are relatively prime, $a^2-a=a(a-1)$ divides $n$. Thus $n=k(a^2-a)$ for some $k$. Clearly $k>1$ because $n\ge a^2$. Hence $(a+1)^2>n\ge 2a^2-2a$, i.e., $0\ge a^2-4a=(a-4)a$.
This implies $a\le 4$.
If $a=3$ we find $9\le n<16$ and $n$ must be a multiple of $2$ and $3$. We need only check $n=12$, which gives a solution.
If on the other hand $a=4$, then $16\le n<25$ and $n$ is a multiple of $3$ and $4$. We need only check $n=24$, which gives a solution.
Thus the positive integers with the property are precisely $$1, 2, 3, 4, 6, 8, 12, 24.$$
Best Answer
Hint. Note that $$\frac{n^2+1}{n+1}=\frac{n^2-1+2}{n+1}=n-1+\frac{2}{n+1}.$$