Skip to main content

Posts

Showing posts with the label problem49

Problem 49 Project Euler Solution with Python

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? An another question on primes and permutations. I will explain to you, the algorithm I have used in program, in this section , . As I have given some random names to the variables (I di dn 't knew what to name the variables in a m eaning ful way ). This issue might confuse you and I will explain to you the code in the program section.  As the question states that the number is prime, and it is 4 digit number it is better that we will sieve our prime numbers upto 10000. One more condit...