Actually, y must be divisible by three by the following theorem: Let x be an integer and j be the sum of its digits in base 10. Then no matter what. Therefore 3|y=x-j, so 3|y-77778j and 7777777 does not.
Pf: Let x be an integer. Expressed in base 10, for some unique set of integers . Since , for all k, so . QED