Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Junior Question

  1. Jun 21, 2011 #1
    Tell me how to figure this out:
    Let N0 denote a three digit number with not all digits identical. Arrange the digits in descending order and subtract from this number the number that is obtained by arranging the digits in ascending order. Let N1 denote the result, written as a three digit number (e.g., 42 is written as 042). Now perform the same operation on N1 that you performed on N0 and let N2 denote the result. Repeat to construct the sequence N3, N4,....

    (a) Show that there exists a number Nx such that if N0=Nx then N1=Nx

    (b) Show that N6=Nx for any initial number N0
    Last edited: Jun 21, 2011
  2. jcsd
  3. Jun 21, 2011 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Try using the buttons above the reply box that are marked X2 and X2 to get superscripts and subscripts respectively, or equivalently, you do it manually by surrounding text you want subscripted or superscripted in [noparse] [/noparse] tags and [noparse] [/noparse] tags respectively.

    You will find it very useful that, by definition, any three-digit decimal number is constructed as:

    a2102 + a1101 + a0100

    where the coefficients a2, a1, and a0 are the first, second, and third digits respectively. You'll have to decide on an arbitrary ordering for the coefficients (i.e. which one is the largest, middle, and smallest).
  4. Jun 21, 2011 #3
    Let z be the greatest digit, and let x be the smallest.
    Therefore, x<y<z
    Then if we subtract the largest number formed from the smallest number formed, we have

    Since x<z





    Hence we only need to check 9 possible numbers: 99,198,297,296,495,594,693,792 and 891 (10(99)=990 which is the same as 99)
    Last edited: Jun 21, 2011
  5. Jun 21, 2011 #4


    User Avatar

    Staff: Mentor

    Ndescend = 100*a + 10*b + c
    Nascend = 100*c + 10*b + a

    Nd - Na = 99*a - 99*c = 99 * (a - c) ..... this is your N(1)

    There, that's a start. :shy:

    Chucking in various values for a and c, remembering that a>c,
    we generate numbers such as 396, 495, 198, 099, 594, etc.

    These look like following a pattern, when rearranged in descending order:
    1st digit, call it a: always 9
    2nd digit, call it b: 5 or 6 or 7 or 8 or 9
    3rd digit, call it c: equal to (9-b)

    So the number with digits in descending order is: 100*9 + 10 * b + (9-b)
    which happens to simplify to: 900 + 9 b + 9 = 909 + 9 * b

    If b is 5, it comes to 954
    if b is 6, 963
    if b is 7, 972
    if b is 8, 981
    if b is 9, 990

    and if arranged in ascending order, these would each become: 459, 369, etc.

    Now, subtract the ascending form from the descending form,
    954 - 459 = 495
    963 - 369 = 594
    972 - 279 = 693
    981 - 189 = 792
    990 - 099 = 891

    When these numbers are arranged in descending order, we have 954, 954, 963, 972, 981
    and in descending order, 459, 459, 369, 279, 189. ..... these are your N(2)

    Subtracting the ascending form from the descending form, .....

    I'm not sure that I can see where this is heading, I'm just playing with numbers so I'll end here.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook