MathsReadCompetitive mathematics
Algorithmic puzzle · integer answermedium50 min

Prime-sum divisor partners

Divisor Arithmetic

Count n in 2..75000 for which there exist two different positive divisors a<b of n with a*b=n and a+b prime. (The pair must multiply to n.)

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

Enumerate divisor pairs up to the square root. Require the two factors to be distinct, test the sum for primality, and count the integer at most once.

Worked example with different values

For 12, the pair 3 and 4 has prime sum 7, so 12 qualifies. It is counted once even if another divisor pair also works.

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

Learn the technique: Number theory: divisors, gcd and modular arithmetic

Report a question or explanation issue

Back to problems →