Braingle Lite

Rex and Ralph: Mystery Number

Submitted By:javaguru
Fun:*** (2.62)
Difficulty:**** (3.23)

Two mathematicians, Rex and Ralph, have an ongoing competition to stump each other. Ralph was impressed by the ingenuity of Rex's last attempt using clues involving prime numbers, but he thinks he's got an even better one for Rex. He tells Rex he's thinking of a 6-digit number.

"All of the digits are different. The digital sum matches the number formed by the last two digits in the number. The sum of the first two digits is the same as the sum of the last two digits."

"Take the sum of the number, the number rotated one to the left, the number rotated one to the right, the number with the first three and last three digits swapped, the number with the digit pairs rotated to the left, and the number with the digit pairs rotated to the right. The first and last digits of this sum match the last two digits of the number, in some order."

Ralph then asks, "If each of the three numbers formed by the digit pairs in the number is prime, then what is the number?"

Rex looks confused, and for a moment Ralph thinks he's finally gotten him. Then Rex smiles, scribbles a few things down on a pad of paper and then says, "Very nice, Ralph!"

Rex then tells Ralph his number.

What did Rex say?

(See the hint for an explanation of the terminology.)

Show Hint Show Answer

Comments on this teaser

Posted by HellCold02/05/09
Excellent one. Really great...

Posted by precious102602/07/09
:evil: Did your really think someone could follow that train of thought without a paycheck? I usually like all teasers, but this one was off the hook. But once I saw your train of thought and looked at the six digit number, which you led people to believe, the six digit number could have been any sic digits. I love Braingle. :evil: and you too. Good Teaser, boring but good, I hope you are truly good in math? You are not lying to us? :evil:

Posted by javaguru02/07/09
I think the train of thought in the teaser was easier to follow than your comment...did you have a point? :roll:

Posted by sfun302/08/09
loved this one as well! Excellent thinking!:D

Posted by ronhoward02/08/09
Wow. :o The train of thought ran right over me! This seemed to be impossible at first, at least impossible to have a unique solution. It was amazing how as I worked on it the choices kept narrowing down. I thought this one was actually quite a bit easier than your Polygonal House teaser, probably because I got the "aha!" quicker on this one. :D Another incredible teaser! Keep 'em coming! :D :D How do you come up with these? :o

Posted by javaguru02/08/09
Thank you ron for the comment and complement! :) When creating a teaser, first I try to find some interesting principle or quirk of math, probability or logic to exploit. Then I play around with different ideas using it until I find one I like. Then I try to (at least in the case of the Rex and Ralph teasers) determine what the minimum set of information will allow the solution to be determined. After I've worked out the math, at some point I get around to creating the teaser. I have about a dozen teasers right now where I've completed the math aspect, but just haven't had time to write a pleasing teaser around the math. In a few cases the teaser is written, but I haven't been able to simplify the explanation as much as I'd like. I guess the main other "secret" to writing a good teaser is to be your own harshest critic. I discard most of my ideas and keep some around for a quite a while because they just don't feel right. I know there's a large portion of the population on Braingle that won't ever appreciate my teasers because they require real effort, but I'm OK with that. I like them. :wink:

Posted by sfun302/09/09
Can't wait for the next one. :wink: I can only really deeply appreciate all the thought going into those puzzles. I can solve them, but it is sooo much harder to come up with a good puzzle and construct an interesting story around it. And don't worry about the community, there are enough of us loving these kind of puzzles. 8)

Posted by shooter80004/28/09
great work , but that suppose to have one solution i think it have more than one lets see 145823 that number is prime and all of your conditions approved

Posted by shooter80004/28/09
sorry u wrote "If each of the three numbers formed by the digit pairs in the number is prime, then what is the number?" but i read each ( any) great puzzle thank u

Posted by bigpat05/08/09
Great puzzle. I solved the puzzle slightly differnetly than the given solution. I assumed (and wrongly) that zero wasn't one of the answers. Turns out I still got the right answer and after a little thinking I figured out that my method would have still eliminated zero so its all good :)

Posted by Lightspeed05/08/09
I think this is the best puzzle where you have to figure out the number from clues about the digits. I love how at first it doesn't seem like there is enough information to arrive at a unique answer. I played around with the sum of the six numbers for a little bit before recognizing that each column in the sum contained the same set of digits. The Aha! moment was great! Brilliant puzzle! :D :D :D

Posted by rlc32707/19/10
I got 314113 (we'll call that number x) digital sum (aka sum of digits or SOD) = last 2 digits : 13 = 13 SOD 1st 2 = SOD last 2 : 4 = 4 x rotated "a lot : 1444443 1st and last of "x rotated a lot" = last 2 digits of x : 13 = 13 Prime number digit pairs : 31, 41, and 13.

Posted by rlc32707/19/10
continuation of above: but the teaser was GREAT. i'd love to see more of these!

Posted by javaguru07/19/10
ric: Your answer doesn't meet the criteria "all digits are different".

Posted by eighsse09/24/13
This was an excellent one! I seriously almost got it, but I came up with 430,217, and I thought I had it so I stopped looking. But I was overlooking that one little clue -- the sum of the first two digits is equal to the sum of the last two digits!

Posted by ScienceBlonde04/05/17
I got both 836129 and 416723

Posted by javaguru04/08/17
ScienceBlonde, 836129 doesn't satisfy the condition where the first and last digits of the sum of the six rotations matches the last two digits. The sum of the rotations is 32222219, and 39 is not the last two digits of 836129.

Posted by saska10/31/17
Thanks for your puzzle. I managed to solve it with scip (a linear, mixed integer and nonlinear programming solver). I uploaded the model file that I used to pastebin for anyone who might be interested to play with it.

Posted by saska10/31/17
Running the scip model revealed a few more solutions besides the given one (416723): 476123 596731 614723 674123 675931 In all six solutions the sum of the six numbers is the same: 2555553 !

Posted by saska11/08/17
Minor correction to my comment above: In only four of the six solutions (416723 476123 614723 674123) the sum of the six numbers is 2555553. In the other two solutions the sum of the six numbers is 3444441.

Posted by javaguru11/08/17
Saska, check your numbers against all the criteria. For example, the sum of the first two digits is equal to the sum of the last two digits. There is only one answer.

Posted by saska11/08/17
Of course, you are right. I somehow missed that criterion. The updated scip model file can be found at


Most Popular | Hardest | Easiest

Privacy | Terms
Copyright © 2003