112

Base10 is interesting.
Did you know that any number > 9 has this weird thing where if you sub it's digits from the number over and over, it'll eventually become 9?

For example: 35
35 - 3 - 5 = 27
27 - 2 - 7 = 18
27 - 1 - 8 = 9

Try it with any number you like.

Comments
  • 38
    I now feel an overwhelming urge to drop everything and search for a proof.
  • 12
    @Gophyr I want to script the fuck out of it and see what comes up.
  • 5
    Just here for comments
  • 22
    you have a bug in your program in the last line...

    should be:
    18 - 1 - 8 = 9

    SCNR
  • 9
    Hmm... it appears that the key to proving this is the first iteration. Let x be any arbitrary number. Let y be x minus all of its digits. My claim is that y | 9, ie 9 divides y. Once this claim is proven, the next step is to perhaps show that the sum of the digits that are divisible by 9 adds up to a multiple of 9. Once that’s done, the proof is complete.
  • 2
    @2erXre5 Good catch, I was wondering who will notice :P
  • 23
    Another Base 10 quirk:

    1*1=1
    11*11=121
    111*111=12321
    1111*1111=1234321
    This continues for a while.
  • 3
    It is pretty obvious to be honest. You realize every time you will go to values that are multiplicity of 9? Cause you know... 9*X == X*10 - X... i.e. 18==20-2, and you go down to that X*10 by removing unity (25-5==20).
  • 9
    @blem14 You aren't doing 25 - 5, you are doing 25 - 2 - 5.
    That's quite different to X*10-X

    "Vsauce Michael here" had a quite good explanation.

    In base10, number 25 is nothing else but:

    2+2+2+2+2+2+2+2+2+2+5

    Doing n - 2 - 5 is basically removing the first and the last number from the array, leaving it with:

    2+2+2+2+2+2+2+2+2

    And because of the fact we removed the last number which is considered to be 'excess', the only things we have left in our array is the multiplication of the highest number that we can store in a single digit number, in other words "9".
  • 1
    @HelloUglyWorld Hmm... That’s a nice idea. It’s hand-wavy, but I can see how to make it into a solid proof. And that solves the nitty-gritty parts of my idea of a proof too! Perfect!

    I’m gonna LaTeX this and put it in my personal stash.
  • 2
    Look it up on numberphile!
  • 0
    I will make this.
  • 1
    It's easy to show why, just sorry for your eye cancer. ☺
  • 6
  • 5
  • 6
  • 5
  • 1
    @HelloUglyWorld, please, read my comment again. I said that we got X*10 by substracting unit, as example 25-5. Also said that you substract X by substracting that 2 (for 10X=20, X=2). No mistake in there.

    Summary:
    25-2-5
    25-5-2
    (25-5)-2
    20-2
    10X-X
  • 1
    @beleg 👍 for your efforts
  • 1
    @blem14 I'm in pain, sorry for misreading.
  • 1
    It's because we are using base 10.
    You can do that with any system that has a particular base number reset.
  • 1
    A number >9 can always be written 10d+u (example : 73 = 10*7+3, or even 731 = 10*73+1)
    So 10d+u-d-u = 9d
    So the first substraction always returns a multiple of 9.
    That's it
  • 5
    Welcome to MathRant everybody.
  • 2
    @HelloUglyWorld Thanks for calling me ugly! 😅
  • 0
    Too much math.. brianfuck
  • 0
    @Ma30h👍به خودت

    شوخی کردم 😂 مخلصیم
  • 1
    @beleg 😉 قربونت
  • 2
    @World But atleast I said 'hello' first.
  • 2
    @HelloUglyWorld Every noob programmer says Hello to me first 😎
  • 0
    @2erXre5

    What most people here are trying is to substract the digits once , what you have to do is keep substracting the digits, they’ll eventually reach 9.
    In your case
    18 - 1 - 8 = 10
    10 - 1 - 0 = 9
  • 0
  • 0
    I know it's hard to read my handwriting (sorry I was tired) but I think I settled it. If you see any problems in my proof, i'll be happy to know.

    BTW 18-1-8=9
  • 0
    @2erXre5

    Sorry I misunderstood what you mean bro
  • 1
    Just saying, I also settled it.
  • 0
    Just wrote some code to test this.
    confirmed up to 12 digits.
  • 1
    @chzbgr It’s already proven that it works for any arbitrary natural number above or equal to 9, so it definitely works up to any large crazy whole number.
  • 0
    @Japorized Here's when somebody cames with a Mathematical induction to prove it.
  • 1
    @Pointer That’s another way to prove it for sure.
  • 2
    That's true in whatever base! By definition, using base b, the number xyz...t is decomposed as

    x*b^n + y*b^(n-1) +...

    The trick is now that the last digit is always strictly lower than b. This way, when you subtract all the digits, the result is a multiple of b, as can be seen here:

    x*b^n + y*b^(n-1) +... - x - y -...

    =

    x * (b^n - 1) + y * (b^(n - 1) - 1) +...

    Remember that in base b, b^n equals 1 followed by n zeroes. That's why when you subtract 1 you get a multiple of (b-1). Iterate this process and it's done :)
  • 1
    @7Raiden That’s very well thought out! Wish I can give you more ++ for this!
  • 0
    @Japorized Thanks mate :)
Add Comment