Primle

Primle is a number game inspired by the word game Wordle.

In Primle, you try to find a five-digit number (10,000 - 99,999) which is the product of five distinct prime numbers between 2 and 23 (inclusive). The target number changes every day.

Each turn, you will enter a five-digit number. Unlike Wordle, the game won't tell you if the digits match the target number. Instead, it will tell you whether the number you've entered shares prime factors with the target number.

Like Wordle, it will add colour to the digits of your guess. If it colours the first digit, that means that your guess divides by the target number's smallest prime factor. If it colours the second digit, it means that your guess divides by its second smallest factor, and so on.

If the game colours a digit green, that means that the two numbers divide by that prime factor to the same power. If it colours the digit yellow, then they divide by that prime factor to different powers.

For example, suppose your first guess is:

1 1 7 7 6

The game may respond with:

1 1 7 7 6

This tells us that our target number's smallest prime factor and its largest prime factor are both factors of 11,776; and that it divides by the largest factor to the same power as 11,776.

11,776 = 29 × 23, so we know that it divides by some power of 2 and that it divides by 23 exactly once.

Our next guess might be:

4 1 5 5 3

The game may respond with:

4 1 5 5 3

41,553 = 37 × 19. So we now know that the target number divides by either 3 or 19, and that whichever it divides by is its second factor in size order. Since the game only includes primes up to 23, it can't be 19, so the target number must divide by some power of 3.

Next, we might try:

5 3 1 2 5

...and get the response:

5 3 1 2 5

...which tells us that the number divides by some power of 5, and by 17 exactly once, and that these are their third and fourth factors in size order. So, next we try:

1 1 7 3 0

...and get the response:

1 1 7 3 0

...so now we know our answer up to a power of 2. From here it is an easy sequence of guesses until we find the target number:

9 3 8 4 0

Now, try it for yourself!