Find all integers such that $2 < x < 2014$ and $2015|(x^2-x)$ Find all integers, $x$, such that $2 < x < 2014$ and $2015|(x^2-x)$.
I factored it and now I know that $x > 45$ and I have found one solution so far: $(156)(155)= (2015)(12)$. It's just that I don't think I'm approaching it the right way.
I'm new to this kind of stuff and I'm just doing this for fun so any help please?

I think the following algorithm can be usefull:


*

*Observe that $x^2-x=x(x-1)$. Now $x$ and $x-1$ are coprime and then, if $2015=ab$, with $(a,b)=1$ you can suppose $a|x$ and $b|x-1$

*For every fixed couple $(a,b)$ of coprime divisors of 2015 solve by CRT the system af congruences:
$x \equiv 0 \mod a$     ^      $ x \equiv 1 \mod b$.
CRT gives a unique solution $\mod ab=2015$. We call its class $X$

*Now you have just to find the representant of the class of $X$ between $2$ and $2014$, if it exist, to find an $x$ that works.


So now you have just to apllie this algorithm to the 3 possible couple of coprime divisors of 2015, and for every couple there are only two cases to examinate...
