MathDB
Friendly numbers - Portuguese MO, Problem 3, 2008

Source:

August 31, 2010
number theory proposednumber theory

Problem Statement

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