Let d be a natural number. Given two natural numbers M and N with d digits, M is a friend of N if and only if the d numbers obtained substituting each one of the digits of M by the digit of N which is on the same position are all multiples of 7. Find all the values of d for which the following condition is valid:
For any two numbers M and N with d digits, M is a friend of N if and only if N is a friend of M. number theory proposednumber theory