Page 2 of 2

Re: Problem 049

Posted: Wed Apr 02, 2014 2:35 pm
by petersc
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

Posted: Tue Apr 08, 2014 7:55 pm
by devrelm
Figured it out. Turned out my permutation generator wasn't as solid as I thought it was.

Re: Problem 049

Posted: Thu Jan 14, 2016 5:39 pm
by p.m.
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 3-digit primes, exhibiting this property..."? Obviously no 1-digit, 2-digit, or 3-digit 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 3330-difference 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

Posted: Thu Jan 14, 2016 7:37 pm
by dawghaus4
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 3-term arithmetic sequence (which implies some common difference) whose terms are made up of 4-digit prime numbers such that the 4-digit numbers are permutations of each other.

Tom

Re: Problem 049

Posted: Thu Jan 14, 2016 9:34 pm
by p.m.
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 3-digit 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

Posted: Fri Dec 08, 2017 1:51 pm
by Lawgrin
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.

Re: Problem 049

Posted: Fri Dec 08, 2017 2:04 pm
by traxex
You've understood all the rules correctly.

Re: Problem 049

Posted: Fri Dec 08, 2017 3:46 pm
by Lawgrin
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]

Re: Problem 049

Posted: Wed Aug 07, 2019 9:37 am
by MuffinMichi93
Lawgrin wrote:
Fri Dec 08, 2017 3:46 pm
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]
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

Posted: Sun Jun 28, 2020 5:05 pm
by righi
silent wrote:
Mon Aug 05, 2013 11:37 am
i can only finde the given example numbertriple 1487, 4817, 8147 with a distance of 3330. Up to a distance unter 5000 i cant find any other 4 digit number triple :? and i can finde any fold in my code
I'm also having the same problem. Can't find the other sequence. :(

Re: Problem 049

Posted: Mon Jun 29, 2020 12:35 am
by kenbrooker
Lawgrin wrote:
Fri Dec 08, 2017 1:51 pm
In my mind if I can find the example with code then the other should also pop out.