MathsReadCompetitive mathematics
Algorithmic puzzle · integer answerhard90 min

Four-factor digit target

Prime Search

Find the smallest integer n strictly greater than 100000 whose prime factorization contains exactly four DISTINCT prime factors and whose decimal digits sum to 19. Exponents do not count toward the number of distinct prime factors.

Solve using mathematics, algorithms, or your own code offline. Submit only the final integer here—no program, expression, graph, or written proof.

Check your answer without signing in. Sign in to save your progress.

Accepted format: a whole number such as 42 or 123456789. No commas, formulas, or source code.

How to approach this problem

Count distinct factors by removing every copy of a prime before trying the next factor. Test the digit sum separately; search candidates in ascending order so the first match is minimal.

Worked example with different values

72 = 2³ × 3² has two distinct prime factors, not five, and digit sum 9.

Apply the same reasoning to the challenge. This example is a separate practice problem.

Learn the technique: Prime numbers and reversible primes

Report a question or explanation issue

Back to problems →