MathDB
min sum by composite / primes numbers by cards 1-9

Source: 2022 May Olympiad L2 p2

September 4, 2022
number theory

Problem Statement

There are nine cards that have the digits 1,2,3,4,5,6,7,81, 2, 3, 4, 5, 6, 7, 8 and 99 written on them, with one digit on each card. Using all the cards, some numbers are formed (for example, the numbers 88, 213213, 9494, 6565 and 77). a) If all the numbers formed are prime, determine the smallest possible value of their sum. b) If all formed numbers are composite, determine the smallest possible value of their sum.
Note: A number pp is prime if its only divisors are 11 and pp. A number is composite if it has more than two dividers. The number 11 is neither prime nor composite.