Page 1 of 2

Problem 049

Posted: Wed Feb 27, 2008 12:32 pm
by Slock
I need some clarification on this problem, I must be missing some detail.
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?
Now as far as I can tell, the sequence they give us is 3 x 4-digit long numbers. Each number is prime. Each number is separated by the next by 3330. And each one is a permutation of the first term. They want the only other 4 digit prime sequence just like this. Now my problem is I found more then that.
Expand
Edit: Removed spoiler,hk
1487 4817 8147
2963 6293 9623
...
...
...
...
...
I high lighted the one they gave us. Now each row contains 3 x 4-digit long numbers. Each number is prime. Each number is seperated by the next by 3330. And each one is a permutation of the first. What am I misunderstanding?

Thank you,

Re: Problem 49

Posted: Wed Feb 27, 2008 1:00 pm
by hk
E.g. 6293=7*29*31. So there is something wrong with your primality checking.
Would you mind weeping out the numbers you posted here. It's too revealing to leave them out here.

Re: Problem 49

Posted: Wed Feb 27, 2008 2:33 pm
by Slock
I spoiler-ed the numbers.


And thanks, in one of the revisions of my code, I removed checking for the primality of the 2nd two numbers.

Problem 049

Posted: Tue Nov 17, 2009 1:37 pm
by Lazaruspl
I don't think I clearly understand problem 49. Because I found this number:
100005841487 which is pre
So I can increase it for example by number 3330 and:
100005841487+3330 = 10000584817 is also pre
Than I increase 10000584817 by 3330 so now I have:
10000588147 which also is pre.

Those numbers are permutations of one another, so they are concatenating the three terms in sequence, but my answer is bad. Did I understand something wrong ?

Re: Problem 049

Posted: Tue Nov 17, 2009 2:03 pm
by harryh
According to the Problem 49 (View Problem), you should be looking for three 4-digit numbers.
Then you concatenate them and submit the 12-digits as your answer.
E.g. if your three numbers were 1111, 2222 and 3333 you would submit 111122223333 as your answer.

Also, before starting a new topic for a problem, please make sure that no such topic exists.

Re: Problem 049

Posted: Tue Jul 05, 2011 11:17 pm
by slindeneau
Do numbers prefixed with a 0 count as a 4 digit number? I am assuming no, otherwise there would be more solutions perhaps?

Just to clarify, 0111 is NOT a 4 digit sequence right? It would be considered a 3 digit sequence?

Re: Problem 049

Posted: Wed Jul 06, 2011 3:52 am
by rayfil
0111 is NOT a 4 digit sequence
That is absolutely correct. Leading 0's are not allowed.

Re: Problem 049

Posted: Thu Sep 29, 2011 2:37 pm
by xe3tec
Must it be a difference of 3330 or is this just in the example?
Because I only can find 1 other, but the first number woudlnt be 4 digit...

Re: Problem 049

Posted: Thu Sep 29, 2011 3:19 pm
by hk
xe3tec wrote:Must it be a difference of 3330 or is this just in the example?
just in the example.

Re: Problem 049

Posted: Thu Sep 29, 2011 3:31 pm
by xe3tec
thought so...

makes it more difficult

but the diff between the primes has to been the same, correct?

Re: Problem 049

Posted: Thu Sep 29, 2011 5:29 pm
by thundre
xe3tec wrote:but the diff between the primes has to been the same, correct?
Yes, p3-p2 = p2-p1

Re: Problem 049

Posted: Wed Feb 20, 2013 4:15 pm
by glsetlif
[removed by euler] There are 26 different sequences of 4-digit prime permutations with various equal separation between the numbers (3000, 450, 300, etc.). The question is looking for the other sequence with the three numbers separated by the exact amount in the example.

Re: Problem 049

Posted: Wed Feb 20, 2013 6:34 pm
by euler
I edited your post to remove a major spoiler.

I think you missed one of the subtle "rules": each of the 4-digit primes are permutations of one another. In the example given you will notice that 1487, 4817, and 8147 all share the same four digits. There is only one other arithmetic sequence made up of 4-digit primes with this property and the problem is about finding that particular sequence.

Re: Problem 049

Posted: Mon May 06, 2013 5:33 am
by spaceninja
I've found 16 sets of three 4-digit primes that are all permutations of each other.
Unfortunately none of these exhibit the property that p3 - p2 = p2 - p1

I'm not sure what I'm missing here.

Re: Problem 049

Posted: Fri May 10, 2013 2:03 pm
by thundre
spaceninja wrote:I've found 16 sets of three 4-digit primes that are all permutations of each other.
Unfortunately none of these exhibit the property that p3 - p2 = p2 - p1

I'm not sure what I'm missing here.
You're missing a lot of sets. I see over 100.

Some sets contain more than 3 elements. There are some 10-number sets of 4-digit primes which are permutations of the same digits. There are 10C3 = 120 subsets of size 3 to check within each set of size 10, if that's the way you're doing the problem.

Re: Problem 049

Posted: Mon Aug 05, 2013 11:37 am
by silent
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

Re: Problem 049

Posted: Wed Aug 07, 2013 7:09 pm
by thundre
silent wrote: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 sent you a PM.

Re: Problem 049

Posted: Wed Apr 02, 2014 4:48 am
by devrelm
silent wrote: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 having the same problem. I've rewritten the code a half-dozen times, added perf improvements and changed the algo up a couple times. But every single time I get the given sequence (1487, 4817, 8147) with nothing else. I get the feeling that I'm going to feel really foolish if/when I figure this out...

Re: Problem 049

Posted: Wed Apr 02, 2014 1:18 pm
by petersc
Why under 5000 for 4-digit sequence?

Re: Problem 049

Posted: Wed Apr 02, 2014 1:36 pm
by devrelm
petersc wrote:Why under 5000 for 4-digit sequence?
The maximum distance between two 4-digit numbers is 9999-1000=8999, and so if you put a number half-way between those, you'd get a distance of 8999/2~=4500 between each number in the sequence. It's basically just a performance improvement, and I'm actually doing something a little smarter myself to prevent unnecessary checks. Ultimately, though, it doesn't matter if I check every diff from 1-10000; I still find the given sequence, but no second sequence.

My next job is to scrap the algo again and try something a bit less brute-force-ish.