MathDB
partial numbers are all prime

Source: Azerbaijan NMO 2023. Junior P1

August 24, 2023
number theoryAZE JUNIOR NATIONAL MO

Problem Statement

For any natural number, let's call the numbers formed from its digits and have the same "digit" arrangement with the initial number as the "partial numbers". For example, the partial numbers of 149149 are 1,4,9,14,19,49,149,{1, 4, 9, 14,19, 49, 149}, and the partial numbers of 313313 are 3,1,31,33,13,313.{3, 1, 31,33, 13, 313}. Find all natural numbers whose partial numbers are all prime. Justify your opinion.