What is the least positive integer \(n\) such that \(n^2-n\) is divisible by some but not all integer values of \(k\) when \(1\leq k \leq n\)?

By simple calculation, the smallest n that works is n = 6.

I originally went with n = 2 but I had overlooked the "but not all integer values" stipulation. So never mind.