Problem 049
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Re: Problem 049
Okay, I see. I just approached it in a different manner. Thanks. And yes the difference for the correct sequence is indeed <4500.
Re: Problem 049
Figured it out. Turned out my permutation generator wasn't as solid as I thought it was.
Re: Problem 049
I think the description for this problem is poorly written.
First, the second sentence mentions "this property". Which property is that? In fact, there are THREE properties that must be satisfied:
1. The difference between the elements of the sequence must be 3330.
2. The elements of the sequence must be prime.
3. The elements of the sequence must be permutations of each other.
This should be made explicit, and the second sentence should refer to "these three properties", not "this property".
Second, assuming "this property" somehow implies all three properties above, one of which is the 3330 difference, what is the point in writing "There are no arithmetic sequences made up of three 1, 2, or 3digit primes, exhibiting this property..."? Obviously no 1digit, 2digit, or 3digit numbers, of any sort, can differ by 3330! So why mention it and confuse the reader? In fact, this red herring casts doubt on whether the 3330difference property is actually a requirement.
Maybe I've misunderstood why the description is written as it is  please let me know if you think so! I did solve the problem, but was puzzled (and not in the good way) about what was being asked. This is the only Project Euler problem I've worked so far whose description I haven't considered 100% clear and accurate.
First, the second sentence mentions "this property". Which property is that? In fact, there are THREE properties that must be satisfied:
1. The difference between the elements of the sequence must be 3330.
2. The elements of the sequence must be prime.
3. The elements of the sequence must be permutations of each other.
This should be made explicit, and the second sentence should refer to "these three properties", not "this property".
Second, assuming "this property" somehow implies all three properties above, one of which is the 3330 difference, what is the point in writing "There are no arithmetic sequences made up of three 1, 2, or 3digit primes, exhibiting this property..."? Obviously no 1digit, 2digit, or 3digit numbers, of any sort, can differ by 3330! So why mention it and confuse the reader? In fact, this red herring casts doubt on whether the 3330difference property is actually a requirement.
Maybe I've misunderstood why the description is written as it is  please let me know if you think so! I did solve the problem, but was puzzled (and not in the good way) about what was being asked. This is the only Project Euler problem I've worked so far whose description I haven't considered 100% clear and accurate.
Re: Problem 049
Whether it is true or not, I don't see anything in the problem that requires the terms to have a common difference of 3330. The problem requires a 3term arithmetic sequence (which implies some common difference) whose terms are made up of 4digit prime numbers such that the 4digit numbers are permutations of each other.
Tom
Tom
Last edited by dawghaus4 on Thu Jan 14, 2016 10:26 pm, edited 1 time in total.
Re: Problem 049
Aha, thank you! My mistake was not understanding what "arithmetic sequence" implied.
So, the description is better than I thought, and I withdraw my objection about 1, 2 and 3digit sequences. But looking through the posts thread for problem 049, I see that I'm not the only one who was confused about 3330: A number of solutions have hardcoded assumptions about this number. Funny how things work out.
For what it's worth, I think a sentence defining "arithmetic sequence" might help here since, unless I missed it, it wasn't defined in any previous problem, and I didn't recognize it as a technical term. This is surely a matter of opinion about what one ought to know (or recognize as something one needs to look up): Fibonacci numbers were defined in problem 002, but primes were not defined in problem 003. Are people less likely to be familiar with Fibonacci numbers than with arithmetic sequences?
Aside from that, I still think that the singular "this property" is weird.
But I learned a thing or two and had fun, and that's the point.
So, the description is better than I thought, and I withdraw my objection about 1, 2 and 3digit sequences. But looking through the posts thread for problem 049, I see that I'm not the only one who was confused about 3330: A number of solutions have hardcoded assumptions about this number. Funny how things work out.
For what it's worth, I think a sentence defining "arithmetic sequence" might help here since, unless I missed it, it wasn't defined in any previous problem, and I didn't recognize it as a technical term. This is surely a matter of opinion about what one ought to know (or recognize as something one needs to look up): Fibonacci numbers were defined in problem 002, but primes were not defined in problem 003. Are people less likely to be familiar with Fibonacci numbers than with arithmetic sequences?
Aside from that, I still think that the singular "this property" is weird.
But I learned a thing or two and had fun, and that's the point.
Re: Problem 049
Hi guys
Ive been looking at this for a while now and I have written 3 different ways to attempt to work this out and I can only find the example one.
I just want to clarify the rules.
1  Find 3 numbers that are > 1000 and < 10000. So containing only 4 digits each.
2  These numbers need to be prime numbers.
3  They cannot start with 0...that wouldn't break rule 1.
4  These numbers share the same digits. ie They are permutations of each other. [abc, acb, bac, bca, cab, cba]
5  The difference between the first and second number is the same as between second and third. ie 100, 200, 300 share a difference off 100
6  When concatenated, do it in ascending order. [100, 200, 300] > "100200300" not "300200100"
In my mind if I can find the example with code then the other should also pop out.
Ive been looking at this for a while now and I have written 3 different ways to attempt to work this out and I can only find the example one.
I just want to clarify the rules.
1  Find 3 numbers that are > 1000 and < 10000. So containing only 4 digits each.
2  These numbers need to be prime numbers.
3  They cannot start with 0...that wouldn't break rule 1.
4  These numbers share the same digits. ie They are permutations of each other. [abc, acb, bac, bca, cab, cba]
5  The difference between the first and second number is the same as between second and third. ie 100, 200, 300 share a difference off 100
6  When concatenated, do it in ascending order. [100, 200, 300] > "100200300" not "300200100"
In my mind if I can find the example with code then the other should also pop out.
Re: Problem 049
You've understood all the rules correctly.
Technically, everyone is full of himself.
Re: Problem 049
I managed to find my issue.
Firstly i assumed a rule because of Pandigital being similar.
The numbers are allowed to have the same digit twice;
ie [112,121,211]
Firstly i assumed a rule because of Pandigital being similar.
The numbers are allowed to have the same digit twice;
ie [112,121,211]

 Posts: 1
 Joined: Wed Aug 07, 2019 9:33 am
Re: Problem 049
Thank you for this comment. I absolutely had the same problem. Couldn't find the right solution because my code couldn't handle numbers that have the same digit multiple times.
Re: Problem 049
I'm also having the same problem. Can't find the other sequence.
 kenbrooker
 Posts: 187
 Joined: Mon Feb 19, 2018 3:05 am
 Location: Northern California, USA