Robert Gerbicz wrote:
$ d(n)\leq \frac{n}{6}+5$ is true, because up to $ \frac{n}{6}$ there are at most $ \frac{n}{6}$ divisors of n, and if $ d>\frac{n}{6}$ is a divisor of n then we can write: $ n=k*d$ where $ 1\leq k <6$ so there can be at most 5 different $ d$ values.
From equation: $ \frac{n}{6}+5\geq d(n)=\frac{n}{3}$ from this inequality: $ \frac{n}{6}+5\geq \frac{n}{3}$ so $ n\leq 30$. Checking all positive integers up to 30 we get the solutions: \[ n=9,\; 18,\; 24\]