## Problem 049

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
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.

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 post any spoilers
petersc
Posts: 7
Joined: Fri Feb 24, 2012 2:55 pm

### 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.
devrelm
Posts: 3
Joined: Wed Apr 02, 2014 4:44 am

### Re: Problem 049

Figured it out. Turned out my permutation generator wasn't as solid as I thought it was.
p.m.
Posts: 2
Joined: Thu Jan 14, 2016 5:21 pm

### 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 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.
dawghaus4
Posts: 56
Joined: Fri Nov 29, 2013 2:22 am

### 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 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
Last edited by dawghaus4 on Thu Jan 14, 2016 10:26 pm, edited 1 time in total.
p.m.
Posts: 2
Joined: Thu Jan 14, 2016 5:21 pm

### 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 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.
Lawgrin
Posts: 2
Joined: Fri Dec 08, 2017 11:01 am

### 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.
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.
traxex
Posts: 66
Joined: Thu Oct 19, 2017 1:30 pm

### Re: Problem 049

You've understood all the rules correctly.
Technically, everyone is full of himself.
Lawgrin
Posts: 2
Joined: Fri Dec 08, 2017 11:01 am

### 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]
MuffinMichi93
Posts: 1
Joined: Wed Aug 07, 2019 9:33 am

### Re: Problem 049

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.
righi
Posts: 1
Joined: Wed Jun 24, 2020 12:15 am

### Re: Problem 049

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.
kenbrooker
Posts: 187
Joined: Mon Feb 19, 2018 3:05 am
Location: Northern California, USA

### Re: Problem 049

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.
"Good Judgment comes from Experience;