Problem

Source: Bulgaria JBMO TST 2023, Day 2, Problem 3

Tags: combinatorics, invariant



There are infinitely many boxes - initially one of them contains $n$ balls and all others are empty. On a single move we take some balls from a non-empty box and put them into an empty box and on a sheet of paper we write down the product of the resulting amount of balls in the two boxes. After some moves, the sum of all numbers on the sheet of paper became $2023$. What is the smallest possible value of $n$?