How many prime numbers are there among the four-digit numbers whose digits are $1,2,3$ and $4$ in some order?

$^{1}$ Let's prove and use the fact that to determine the divisibility of a number, it is sufficient to test its divisibility only by prime numbers whose squares are not greater than the number in question.
Only those sequences are possible that end in 1 or 3, otherwise the number is divisible by 2 and thus not a prime number. For both types of endings, there are $3 \cdot 2=6$ possible sequences, and the first place of the remaining three digits can be filled in 3 ways. After each such start, the other 2 digits can be written in 2 different orders. The 12 numbers to be examined are:

$$
\begin{array}{rrrrrr}
\text { I. } 2341, & \text { II. } 2431, & \text { III. } 3241, & \text { IV. } 3421, & \text { V. } 4231, & \text { VI. } 4321 ; \\
\text { VII. } 1243, & \text { VIII. } 1423, & \text { IX. } 2143, & \text { X. } 2413, & \text { XI. } 4123, & \text { XII. } 4213 .
\end{array}
$$

We divide the numbers in sequence by consecutive prime numbers. Any number that gives a remainder of 0 in any division (and of course the quotient is greater than 1) is deleted because it is not a prime number.

The II., IV., VII., and XII. numbers are divisible by 11, because in the first, for example, $(1+4)-(3+2)=0$, which is divisible by 11. According to the test, the III. and XI. numbers are divisible by 7, the X. number by 19, and the VI. number by 29. Dividing 2341 by the following odd prime numbers:

$$
3,5,7,11,13,17,19,23,29,31,37,41,43,47
$$

a remainder always appears in every case, so 2341 is a prime number. It is unnecessary to try with larger prime numbers because if, for example, 53 were a divisor of $2341$, then the quotient $2341: 53=q$ would be an integer, and indeed less than 53, since $53 q=2341<2809=53^{2}$, which, when divided by 53, gives $q<53$. Thus, $q$ could not be a prime number due to the completed division tests, nor could it be a composite number because then it would have a prime divisor from the above list. Similarly, 2341 is not divisible by any prime number smaller than it and larger than 47. However, the test with 47 was still necessary because $47^{2}=2209<2341$.

In general, when looking for the prime factorization of a number, it is sufficient to try with primes whose square is not greater than the number. Indeed, if $n$ is a composite number: $n=a \cdot b$, and here $1<a \leq b$, then $n=a b \geq a^{2}, a \leq \sqrt{n}$, so either $a$ or a prime divisor of $a$ is also a prime divisor of $n$.

Based on this, after the division tests with primes up to 61 for 4231, up to 37 for 1423, and up to 43 for 2143, all of which end with a remainder, it can be stated that the respective number is a prime number.

According to all of this, there are 4 prime numbers among the given numbers.

Zsuzsa Fodor (Pápa, Türr I. g. I. o. t.)[^0]


[^0]:    ${ }^{1}$ A natural number is divisible by 11 if and only if the difference between the sum of the digits in the odd positions (counting from the right) and the sum of the digits in the even positions is divisible by 11.