Find all positive integers m such that m^2 + 2015 is a perfect square.
48^2 - 2015 = 289
sqrt(289) = 17, so:
M = 17. 17^2 + 2015 = 2,304 - which is a perfect square of 48^2 =2,304
m = 17 and m = 71 and m =199 and m =1,007
So, you have 4 values that give perfect squares.
P. S. I only checked numbers up to 1,000,000.