Solution to Project Euler Problem 49: Prime permutations - The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another. There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting this property, but there is one other 4-digit increasing sequence. What 12-digit number do you form by concatenating the three terms in this sequence?


Updated: June 4, 2023 — Training Time: 3 minutes
Overseen by: Archangel Macsika
All Training Resources

Scroll for more menu list

Topic: Project Euler Problem 49: Prime permutations.

Difficulty: Advance.

Objective: The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another.
There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting this property, but there is one other 4-digit increasing sequence.
What 12-digit number do you form by concatenating the three terms in this sequence?

Input: None.

Expected Output: 296962999629.

Sikademy Solution in Java Programming Language

Sikademy Solution in Python Programming Language

Was this training resource helpful?