I have the task of finding 5 consecutive integers of the form {x, x+1, x+2, x+3, x+4, x+5} where each number in the sequence is divisible by a square k greater than 1..
I tried to write a simple JAVA program to find a sequence of that form by checking if each number in the sequence = 0 mod k
But that can't be possible, how would I go about finding these numbers?