Moving the last digit of a number to the front

Algebra Level 2

A B C D E 9 × 4 9 A B C D E \begin{array} { l l l l l l l l } & A & B & C & D & E & 9 \\ \times & & & & & & 4 \\ \hline & 9 & A & B & C & D & E \\ \end{array}

I have a 6-digit positive integer with a last digit 9. If I move its last digit directly to the front without shifting the other digits, then this new 6-digit number is 4 times the original one.

What is the original 6-digit number?


The answer is 230769.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

8 solutions

H K
Apr 27, 2017

Easy solution: let x be the 5-digit number such that x9 (adding a 9 to it) gives the required number. Then x x satisfies
900000 + x = 4 × ( 10 x + 9 ) x = 23076 900000 + x = 4 \times (10x + 9) \implies x = 23076

I now have a greater appreciation for this problem, and HK's solution makes me happy. I only wish I had understood this from the start and had an actual attempt at it.

Lysander Snyder - 4 years, 1 month ago

... and the original 6 digit number (as requested) is therefore 230769.

Fred Camerer - 4 years, 1 month ago

Log in to reply

I like it, how it's a super elegant and easy solution, except it doesn't have the most important part: the actual solution :)

József Inczefi - 4 years, 1 month ago

It's really simple solution...

Da Vinci - 4 years, 1 month ago

Brilliant!

Larry Cunningham - 4 years, 1 month ago

Brilliant solution sir :) 🙏

anukool srivastava - 4 years, 1 month ago

"the wording of the problem does not clearly state the intent, which is that digits in the original integer be 6 unique digits between 0 and 9, and that the resultant integer be made up of those same digits in a different order......." Change the wording, then, otherwise 225009 is an equally valid answer!

Geoff Collinson - 4 years, 1 month ago

Log in to reply

What function does the word 'move' have, in a mathematical sense?

Jonathan Quarrie - 4 years, 1 month ago

Log in to reply

Hi. I'm not too sure what you're getting at.

Geoff Collinson - 4 years, 1 month ago

Log in to reply

@Geoff Collinson I should make sure that I understand your position before I continue with what I'm getting at. I'll suspend my questioning about the word 'move' for the time being.

You have used quotation marks in your comment, but I don't see any other comments on any solution that match your quote. Are you replying to a deleted comment?

Jonathan Quarrie - 4 years, 1 month ago

Log in to reply

@Jonathan Quarrie My apologies, the quotation mark section was from a comment further down the discussion and I seem to have replied incorrectly. Further apologies 'cos I have also incorrectly suggested 225009 in my reply which is an incorrect answer! I'll go into the corner with my dunce hat on...

Geoff Collinson - 4 years, 1 month ago

Log in to reply

@Geoff Collinson No problem. We collectively managed to avoid an issue. Well done us!

Jonathan Quarrie - 4 years, 1 month ago

This problem should have been presented as ABCDE9 x 4 = 9ABCDE for clarity. With the blanks used it was then necessary to have the somewhat vague verbiage that an end around shift was intended.

I see that it has been changed since I first encountered it, to the form suggested above.

This must be the quickest and cleanest possible solution cutting out recursive building steps etc. For example, once one determines that E = 6 is forced by 4x9 = 36, the rest is forced by recomputing partial results that force each digit in turn. But the above cuts right to it without all that.

It also raises a larger question about under what conditions a number, D1...Dn exists such that D1 ... Dn x M = Dn D1....Dn-1.

When does this work with M = 4 and Dn = 9 as in this example where n = 6?

H K 's solution simplifies this question to:

Is there a positive integer, X such that 9x10^n - 36 = 39X ? This can be restated as: When is 9x10^n - 36 divisible by 39?

This puzzle is the case n = 6, the least n for which the question actually works for M = 4 and Dn = 9.

864 = 39X no 8964 = 39X no 89964 = 39X no 899964 = 39X yes 230,376 n = 6 This puzzle. 8999964 = 39X no 89999964 = 39X no 899999964 = 39X no 8999999964 = 39X no 89999999964 = 39X no 899999999964 = 39X yes n = 12 23,076,923,076

This suggests a pattern, but I must leave off here for now without proving anything further.

Robert DeLisle - 4 years, 1 month ago

why can't you just take 9/4=2.25 to figure the original number to be 225009? doesn't that satisfy the restrictions... I am just so confused as to how such a problem could be so constrained to one solution

Lysander Snyder - 4 years, 1 month ago

Log in to reply

If we move 9 to the front of the number, then we get 922500, but 922500 is not 4 × 225009 4 \times 225009 so this cannot be the original number.

Pranshu Gaba - 4 years, 1 month ago

I agree with you because while the math is solvable in the manner described, the wording of the problem does not clearly state the intent, which is that digits in the original integer be 6 unique digits between 0 and 9, and that the resultant integer be made up of those same digits in a different order... Once that is understood then you can set out to resolve the unique solution...

Alfonso Robinson - 4 years, 1 month ago

Can anybody explain it to me in simpler terms, I didn't understand it!

Samya Gupta - 4 years, 1 month ago

Log in to reply

I can't make H K's solution any simpler, but I can explain it.

In this problem, both the original number ( O O ) and the resulting number ( R R ) contain the same 5 unknown digits in the same order ( 23076 \color{#3D99F6}23076 ).

In O O , the 9 \color{#D61F06}9 represents the unit-digit ( 23076 9 \color{#3D99F6}23076\color{#D61F06}9 ).

  • So if we subtract 9 \color{#D61F06}9 from O O , we get 23076 0 \color{#3D99F6}23076\color{#333333}0 , which is 10 × 23076 10 \times \color{#3D99F6}23076 .
    • O = ( 10 × 23076 ) + 9 O = (10 \times \color{#3D99F6}23076) \color{#333333}+ \color{#D61F06}9

And in R R , the 9 \color{#D61F06}9 represents the 100,000-digit ( 9 23076 \color{#D61F06}9\color{#3D99F6}23076 ).

  • So if we subtract 23076 \color{#3D99F6}23076 from R R , we get 900000 900000 .
    • R = 900000 + 23076 R = 900000 + \color{#3D99F6}23076

In this solution, because we don't know what the digits actually are at the beginning, H K has represented the 5 unknown digits as x \color{#3D99F6}\text{x} .

So:

  • O = 10 x + 9 O = 10\color{#3D99F6}\text{x}\color{#333333}+\color{#D61F06}9
  • R = 900000 + x R = 900000 + \color{#3D99F6}\text{x}

And because R = 4 × O R = 4 \times O .

  • 900000 + x = 4 ( 10 x + 9 ) 900000 + \color{#3D99F6}\text{x} \color{#333333}= 4(10\color{#3D99F6}\text{x}\color{#333333}+\color{#D61F06}9\color{#333333})
  • 900000 + x = 40 x + 36 900000 + \color{#3D99F6}\text{x} \color{#333333}= 40\color{#3D99F6}\text{x}\color{#333333}+36
  • 900000 = 39 x + 36 900000 = 39\color{#3D99F6}\text{x}\color{#333333}+36
  • 899964 = 39 x 899964 = 39\color{#3D99F6}\text{x}
  • 23076 = x \color{#3D99F6}23076 \color{#333333}= \color{#3D99F6}\text{x}

Thus confirming O O :

  • O = ( 10 × 23076 ) + 9 O=(10 \times \color{#3D99F6}23076\color{#333333})+\color{#D61F06}9
  • O = 23076 9 O=\color{#3D99F6}23076\color{#D61F06}9

Jonathan Quarrie - 4 years, 1 month ago

Log in to reply

@Jonathan Quarrie Thanks a lot, I have completely understood it now :D !!

Samya Gupta - 4 years, 1 month ago

Wtf! The question asked for a 6-digit number, I submitted 230769 and it said it was wrong when I was correct! Stupid question, needs refrasing to make it answerable.

Sam Bebbington - 4 years, 1 month ago

Log in to reply

Wtf! The question asked for a 6-digit number, I submitted 230769 and it said I was right, when based on the previous comment, it shouldn't have been accepted. Stupid comment, needs a bit of self-check to realise that the site evaluates the answers based on it's programming, and it has no way of telling you that you answered wrong, unless you actually answered wrong. You made a typo. Deal with it.

József Inczefi - 4 years, 1 month ago

Log in to reply

Lol :)) Keep calm and keep doing Level 2 Algebra :)

Steven Jim - 4 years ago
Jonathan Quarrie
Apr 28, 2017

Just an alternative solution. (Personally, I prefer the elegance of the solution by @H K )

Multiply 4 by the unit-digit in the original number ( 9 \color{#D61F06}9 ).

9 × 4 = 36 9\times4=36

The last digit of 36 is 6.

Which becomes the 10-digit in the original number ( 6 \color{#D61F06}6 9).

69 × 4 = 276 69\times4=276

The 2nd last digit of 276 is 7.

Which becomes the 100-digit in the original number ( 7 \color{#D61F06}7 69).

769 × 4 = 3076 769\times4=3076

The 3rd last digit of 3076 is 0. When a 0 is the result, the preceding digit is also used (30).

Which becomes the 10,000-digit and 1,000-digit in the original number ( 30 \color{#D61F06}30 769).

30769 × 4 = 123076 30769\times4=123076

The 5th last digit of 123076 is 2.

Which becomes the 100,000-digit in the original number ( 2 \color{#D61F06}2 30769).

230769 × 4 = 923076 \large \boxed{230769} \times4=923076


[EDIT] For those having difficulty with the phrasing of this problem:

'Move' is not a mathematical function, it's a physical operation, so we should conceptualise this problem in the same vein.

When we are explicitly told to move one of a series of independent objects, it is implicit that the other objects do not move or change - We don't need to be told.

Move the 9 from the end to the front Move the 9 from the end to the front

The wording of the problem has since changed, but I still like my number blocks.

It depends on your situation. This one's easier to do in your head.

Gregory Lewis - 4 years, 1 month ago

I was so close to this solution myself, I stared at the number "123076" at the end, and I just turned blank after the curveball of having to deal with 0 in there.

Øyvind Brakstad - 4 years, 1 month ago

Log in to reply

Haha. I did a similar thing initially. I wasn't sure if the method for 0 was a legitimate thing to begin with. So I looked at other numbers like this (up to numbers with 12 digits), and they all do the same thing.

Jonathan Quarrie - 4 years, 1 month ago

This problem should have been presented as ABCDE9 x 4 = 9ABCDE for clarity. With the blanks used it was then necessary to have the somewhat vague verbiage that an end around shift was intended.

Robert DeLisle - 4 years, 1 month ago

I may have misinterpreted the question bit i game to 225009x4=900036 why is this incorrect?

Douwe Vanneste - 4 years, 1 month ago

Log in to reply

The problem asks us to move a digit from the end to the front. There is no function called 'move', so this implies a 'physical' movement of the character, while the other characters remain unmoved.

If you look at the answer that has been deemed correct, both the original number, and the resulting number contain the same characters 23076 \color{#3D99F6}23076 in the same order.

In the original number, the character 9 \color{#D61F06}9 is at the end: 23076 9 \color{#3D99F6}23076\color{#D61F06}9 .

And if the 9 \color{#D61F06}9 is moved to the front, it creates a number that is 4 times the value of the original number: 9 23076 \color{#D61F06}9\color{#3D99F6}23076 .

Jonathan Quarrie - 4 years, 1 month ago

Log in to reply

All the could have been avoided by presenting it as ABCDE9 x 4 = 9ABCDE instead of dashes and involved wording. It has been changed I see to that exact form which is not how it was first presented.

Robert DeLisle - 4 years, 1 month ago

Log in to reply

@Robert DeLisle When I solved this problem (when it was an unrated, new submission), there wasn't a visual conceptualisation of the problem at all. So, as it was first presented, I had to use only the wording to deduce the intent.

The Brilliant website (or its staff) have an obsession of adding images/LaTeX to problems that aren't submitted with an accompanying visual concept, but there's an automatic assumption that it's a failure on the author's behalf when whatever Brilliant adds then misrepresents the problem or makes the problem as a whole somewhat ambiguous or at odds with itself.

Jonathan Quarrie - 4 years, 1 month ago
Chew-Seong Cheong
Apr 27, 2017

Let the original number be n n . Then the LHS (left-hand side) of the equation below means moving the end 9 to the front and the RHS (right-hand side) is four times of the original number.

n 9 10 + 9 × 1 0 5 = 4 n n 9 + 9000000 = 40 n 39 n = 8999991 n = 8999991 39 = 230769 \begin{aligned} \frac {n-9}{10} + 9\times 10^5 & = 4n \\ n-9 + 9000000 & = 40n \\ 39n & = 8999991 \\ \implies n & = \frac {8999991}{39} \\ & = \boxed{230769} \end{aligned}

I can't understand lhs part....can explain

anniss tha - 4 years, 1 month ago

Log in to reply

LHS is short for left-hand side which is n 9 10 + 9 × 1 0 5 \dfrac {n-9}{10}+9\times 10^5 in this case.

Chew-Seong Cheong - 4 years, 1 month ago

The solutions of H K and Chew-Seong Cheong are the most straightforward. I thought I'd pitch in with an alternative approach, of increasingly improved approximations.

First, write zeroes on the blanks on the right side. ? ? ? ? ? ? × 4 = 900 000. ???\,???\times 4 = 900\,000. Divide by four to determine what the factor on the left would be: 225 000 × 4 = 900 000. 225\,000\times 4 = 900\,000. Copy the first five digits from the left onto the blanks. Divide by four again. ? ? ? ? ? ? × 4 = 922 500. ???\,???\times 4 = 922\,500. Again we divide by four: 230 625 × 4 = 922 500. 230\,625\times 4 = 922\,500. Again copy the digits. I round off so that we get a multiple of four. ? ? ? ? ? ? × 4 = 923 064. ???\,???\times 4 = 923\,064. Thus: 230 766 × 4 = 923 064. 230\,766\times 4 = 923\,064. And again: ? ? ? ? ? ? × 4 = 923 076. ???\,???\times 4 = 923\,076. It turns out that 230 769 × 4 = 923 076 , 230\,769\times 4 = 923\,076, so that we have the solution.

Can you summarize your algorithm, so that we understand how to iterate and improve on the approximations?

Agnishom Chattopadhyay - 4 years, 1 month ago

how can you do that

wander boy - 4 years, 1 month ago

x= 100,000a + 10,000b + 1000c + 100d + 10e + 9

{x}=900,000 + 10,000a + 1000b + 100c + 10d + e

Make 10e the subject of the top equation: 10e = x - 100,000a - 10,000b - 1000c - 100d - 9 Divide both sides by 10.

e= x 100 , 000 a 10 , 000 b 1000 c 100 d 9 10 \frac{x - 100,000a - 10,000b - 1000c - 100d - 9}{10}

e= x 10 \frac{x}{10} -10,000a - 1000b - 100c - 10d - 0.9

As you can see, plugging this value of e into the second equation above conveniently cancels out all the other variables.

{x}=900,000 + 10,000a + 1000b + 100c + 10d + x 10 \frac{x}{10} -10,000a - 1000b - 100c - 10d - 0.9

{x} = 899,999.1 + x 10 \frac{x}{10}

4x = 899,999.1 + x 10 \frac{x}{10}

39 10 \frac{39}{10} x = 899,999.1

x = 899,999.1 / 39 * 10

x = 230,769

Proof of correctness- 923,076 / 4 = 230,679

225,009 x 4 = 900,0036. 249,999 x 4 = 999,996. THE answer is that there are 24,990 answers.

Gene Cramer - 4 years, 1 month ago

Log in to reply

I totally agree. The wording of the question does not restrict the answer to just one solution, although it will only accept one.

Chad Giefer - 4 years, 1 month ago

Log in to reply

I disagree.

This problem clearly states its criteria:

  • A = The original number is a 6-digit positive integer, whose last digit is 9.
  • B = A new 6-digit integer must be formed, whose first digit is 9.
  • C = The new 6-digit integer must be formed by moving the last digit from the end to the front.
  • D = The original 6-digit integer quadrupled equals the new 6-digit integer.

When all of the above are true, the answer must be true. When following this logic, there is only one answer.

To conclude that there is more than one answer, either:

  • You are disregarding C.
  • Or you are defining a 'move' operation as 'multiply by 4'.

Jonathan Quarrie - 4 years, 1 month ago

This problem should be phrased more clearly.

Mike Jones - 4 years, 1 month ago

Let a b c d e 9 abcde9 be the first digit and 9 a b c d e 9abcde the second digit.

The number a b c d e 9 × 4 = ( 4 a ) ( 4 b ) ( 4 c ) ( 4 d ) ( 4 e ) ( 36 ) abcde9 \times 4 = (4a)(4b)(4c)(4d)(4e)(36)

We have to solve the equation identifying each rank : ( 4 a ) ( 4 b ) ( 4 c ) ( 4 d ) ( 4 e ) ( 36 ) (4a)(4b)(4c)(4d)(4e)(36) is equal to ( 9 ) ( a ) ( b ) ( c ) ( d ) ( e ) (9)(a)(b)(c)(d)(e)

( 4 a ) ( 4 b ) ( 4 c ) ( 4 d ) ( 4 e ) ( 36 ) = ( 9 ) ( a ) ( b ) ( c ) ( d ) ( e ) (4a)(4b)(4c)(4d)(4e)(36) =(9)(a)(b)(c)(d)(e)

Let's modify rank 1 0 1 10^1 :

( 4 e ) ( 36 ) = ( 4 e + 3 ) ( 6 ) = ( d ) ( e ) (4e)({\color{#D61F06}36}) = (4e+{\color{#D61F06}3})({\color{#D61F06}6}) = (d)(e) so e = 6 \boxed{e=6} but ( 4 e + 3 ) = d {\color{#3D99F6}(4e+3) = d} so ( d = 24 + 3 = 27 ) (d= 24 + 3 = 27)

Let's modify rank 1 0 2 10^2 :

( 4 d ) ( 27 ) ( 6 ) = ( 4 d + 2 ) ( 7 ) ( 6 ) (4d)({\color{#D61F06}27})(6) = (4d+{\color{#D61F06}2)}({\color{#D61F06}7})(6) but ( 4 d + 2 ) = 30 {\color{#3D99F6}(4d+2)=30} then d = 7 \boxed{d=7}

Let's modify rank 1 0 3 10^3 :

( 4 c ) ( 30 ) ( 7 ) ( 6 ) = ( 4 c + 3 ) ( 0 ) ( 7 ) ( 6 ) (4c)({\color{#D61F06}30})(7)(6) = (4c+{\color{#D61F06}3})({\color{#D61F06}0})(7)(6) but ( 4 c + 3 ) = b {\color{#3D99F6}(4c+3)=b} and c = 0 \boxed{c=0} then b = 3 \boxed{b=3}

Let's modify rank 1 0 4 10^4 :

( 4 a ) ( 12 ) ( 3 ) ( 0 ) ( 7 ) ( 6 ) = ( 4 a + 1 ) ( 2 ) ( 3 ) ( 0 ) ( 7 ) ( 6 ) (4a)({\color{#D61F06}12})(3)(0)(7)(6) = (4a+{\color{#D61F06}1})({\color{#D61F06}2})(3)(0)(7)(6) but 4 b = a {\color{#3D99F6}4b=a} so ( a = 12 ) (a=12)

Let's modify rank 1 0 5 10^5 :

( 4 a ) ( 12 ) = ( 4 a + 1 ) ( 2 ) = ( 9 ) ( a ) (4a)(12) = (4a+1)(2) = (9)(a) then we have ( 4 a + 1 ) = 9 {\color{#3D99F6}(4a+1)=9} and a = 2 {\color{#3D99F6}a=2} then a = 2 \boxed{a=2}

The original number required is 230769 \boxed{{\color{#D61F06}230769}} such as 230769 × 4 = 923076 230769 \times 4 = 923076

Ichigo Rdon
May 6, 2017

1|0|3|2|3| Remainder

2|3|0|7|6|9 Initial Figure

X|0|0|0|0|4 Multiplied by


9|2|3|0|7|6 Result

9x4=36, bring 6 down to the ones position in the result and 3 as the remainder, then bring the 6 up to the tens position in initial figure.

6x4=24+3=27, bring the 7 down to the tens position in the result and 2 as the remainder, then bring the 7 up to the hundreds position in initial figure.

7x4=28+2=30, bring the 0 down to the hundreds position in the result and 3 as the remainder, then bring the 0 up to the thousands position in the initial figure.

0x4=0+3=3, bring the 3 down to the thousands position in the result, then bring the 3 up to the ten thousands position in the initial figure.

3x4=12, bring the 2 down to the ten thousands position in the result and 1 as the remainder, then bring the 2 up to the hundred thousands position in the initial figure.

Nicely explained! We first find the last digit, and move leftwards digit by digit.

Pranshu Gaba - 4 years, 1 month ago

an iterative solution using a calculator: 900000/4=225000; 922500/4=230625; 923062/4=230766.25; 923076/4=230769; solved

Why does this method work? Why did we start with 900000 and not some other 6-digit number starting with 9?

Pranshu Gaba - 4 years, 1 month ago

Log in to reply

Interesting question. I don't immediately understand why this works either, but I would love to know too.

Jonathan Quarrie - 4 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...