MathDB
similar integer, swapping 2 digits

Source: 2018 Saudi Arabia GMO TST II p2

July 31, 2020
number theoryDigitsdivisible

Problem Statement

Two positive integers mm and nn are called similar if one of them can be obtained from the other one by swapping two digits (note that a 00-digit cannot be swapped with the leading digit). Find the greatest integer NN such that N is divisible by 1313 and any number similar to NN is not divisible by 1313.