Problem

Source: Tournament of Towns Spring 2016 Junior A-Level

Tags: number theory



Let $p$ be a prime integer greater than $10^k$. Pete took some multiple of $p$ and inserted a $k-$digit integer $A$ between two of its neighbouring digits. The resulting integer C was again a multiple of $p$. Pete inserted a $k-$digit integer $B$ between two of neighbouring digits of $C$ belonging to the inserted integer $A$, and the result was again a multiple of $p$. Prove that the integer $B$ can be obtained from the integer $A$ by a permutation of its digits. (8 points) Ilya Bogdanov