Suppose $N$ is an $n$-digit positive integer such that
$\bullet$ all the $n$-digits are distinct; and
$\bullet$ the sum of any three consecutive digits is divisible by $5$.
Prove that $n$ is at most $6$. Further, show that starting with any digit one can find a six-digit number with these properties.
It is my question .Let the first digit be '$a$' and the second be '$b$' then the third become '$5n-(a+b)$. Then I found the fourth digit is $a$ , which is not possible.I can't found any way. Somebody please help me.