Prove that can only take the values 0,1,6 by considering for . After this it follows at once that at least one of x,y or z must be divisible by 7.
Modulo is the rest after division so what I want you to show is that no matter what integer you have, if you take it to the power of three and after that divide by seven the rest must be either 0, 1 or 6. The main idea is that if you know what the rest is for say a=1 is then you know that it must be the same for a=8=7+1 since you can expand using the binomial theorem and all terms will contain a 7 except for 1^3 and so on. That means that you plug in 0,1,...,6 and check what the rest is after division with 7 and from the possible rests you can see that one of them has to be 0 and that proves the statement.
Yes, thats right, I missed that things. Whenever the number of cubes is n, and there exists an x, such that (0 <= x <= n), (n + 5x) mod 7 = 0, this does not work. I understand that this is a much more complex formalization of it. By the same argument, there exists such an x, for all (n >= 7). So, in fact, it works only for 1, 3, and 5 where it holds for 1 trivially.
Salahuddin
Maths online