Problem 2601 · Medium

Prime Subtraction Operation

Lower each value by the largest prime that keeps it above the previous value; the smallest valid result is always the safest choice.

Open the interactive visualisation