Problem 603: (2019 AIME I, 9)
Let $\tau(n)$ denote the number of positive integer divisors of $n$. Find the sum of the six least positive integers $n$ that are solutions to $\tau (n) + \tau (n+1) = 7$.
- $\tau(n)+\tau(n+1)=7$ is odd, so one of $n,n+1$ has an odd number of divisors, i.e.\ is a perfect square.
- The square cannot be $1$ or have $\tau\ge7$ (the other would have $\le0$). So the pair is $(p^2,\text{a number with }4\text{ divisors})$ or $(p^4,\text{a prime})$, in either order.
- Checking: $8,9$ ($4+3$); $9,10$ ($3+4$); $16,17$ ($5+2$); $25,26$ ($3+4$); $121,122$ ($3+4$); $361,362$ ($3+4$); the squares $49,169,289$ fail ($48,50,168,170,288,290$ have more divisors). So $n=8,9,16,25,121,361$.
- Their sum is $540$. The answer is $\boxed{540}$.
Let $\tau(n)$ denote the number of positive integer divisors of $n$. Find the sum of the six least positive integers $n$ that are solutions to $\tau (n) + \tau (n+1) = 8$.