One to One Million - Numberphile

Поделиться
HTML-код
  • Опубликовано: 14 июн 2024
  • Puzzles, classroom stories and the great Carl Gauss - oh, and adding every digit in the numbers between one and one million!
    More links & stuff in full description below ↓↓↓
    Featuring Dr James Grime - singingbanana.com/
    NUMBERPHILE
    Website: www.numberphile.com/
    Numberphile on Facebook: / numberphile
    Numberphile tweets: / numberphile
    Subscribe: bit.ly/Numberphile_Sub
    Videos by Brady Haran
    Patreon: / numberphile
    Brady's videos subreddit: / bradyharan
    Brady's latest videos across all channels: www.bradyharanblog.com/
    Sign up for (occasional) emails: eepurl.com/YdjL9
    Numberphile T-Shirts: teespring.com/stores/numberphile
    Other merchandise: store.dftba.com/collections/n...
  • НаукаНаука

Комментарии • 1,8 тыс.

  • @Nessa-939
    @Nessa-939 7 лет назад +1721

    "I'm gonna skip a few"
    skips 999 991 numbers

  • @flinkstiff
    @flinkstiff 9 лет назад +520

    I wrote all the numbers 0 - 1 000 000 on paper and added it all up. It took half a year. Would have gone faster but i had to sleep as well. I would say your method is superior to mine. Good thing is i had a lot of paper to burn for warmth this winter. My house were cold though because of me spending all my money on buying paper to solve this equation. I guess it was a paradoxical problem and solution.

  • @shelverman
    @shelverman 10 лет назад +50

    I'm a teacher, and I've been looking all over RUclips for a good telling of the story of Gauss. Thank you!

  • @Kwailah
    @Kwailah 8 лет назад +106

    This is the first time in a long time that I can remember someone explaining math and at the end I thought "oh that's so cool" 😊

    • @TheBearDen
      @TheBearDen 3 года назад +1

      The magic of james grime!

  • @Cloiss_
    @Cloiss_ 8 лет назад +188

    The answer is 27,000,001 because the digits from 1 to 9 add up to 45, and each occur 100000 times in each of the 6 digits spots, so 45*600000 and then add 1 for 1,000,000.

    • @liamnicholls6732
      @liamnicholls6732 8 лет назад +10

      U smart

    • @kelvinpang438
      @kelvinpang438 6 лет назад +2

      There are a few other possible fast ways but none as fast as the one in the vid.

    • @zaryabaliahmed4147
      @zaryabaliahmed4147 6 лет назад

      Bb

    • @jimdecamp7204
      @jimdecamp7204 6 лет назад +9

      I like your way, it's the way I would have done it. Plus, he never demonstrates that the sum of digits in n (n

    • @jimdecamp7204
      @jimdecamp7204 6 лет назад +3

      I think Epik's way is just as fast. Why wouldn't it be?

  • @Niosus
    @Niosus 9 лет назад +74

    Another simple way is by looking at how often each number happens in each position. From 000000 to 999999. It is obvious that all possible combinations of numbers occur, so all you need is the average value of each position. 4.5 is the average off the numbers 0 through 9. You have 6 positions, so 4.5*6 = 27 is the average value of your numbers. For a million numbers that gives 27 million, with the last 1 for the 1 million.
    This trick works on any arbitrary range with some care. For instance from 0 to 600000: For the last 5 digits, the old trick still works. For the first digit you need to average the range from 0-5 which is 2.5. That makes 5*4.5 for the last 5 positions (=22.5) and 2.5 for the first position to make an average of 25. 25 * 600000 = 15 million, plus the final 6 makes 15 000 006.
    I believe this method is quite a bit more flexible and easier to calculate since you're working with some very small and easy to comprehend numbers right up until the last step.

    • @SPACKlick
      @SPACKlick 9 лет назад +1

      Niosus Used this method and forgot to multiply by 6. Ended up multiplying by 10 because a quick approximath told me I was an order of magnitude out.

  • @jyak27
    @jyak27 8 лет назад +237

    hmmm well 1 10 100 1,000 10,000 100,000 and 1,000,000 all equal 1. so the answer is at least 7.

    • @OrangeC7
      @OrangeC7 5 лет назад +19

      We have a minimum!

    • @mata5246
      @mata5246 5 лет назад +24

      @@OrangeC7 It also can't go over infinity, so somewhere in between huh?

    • @danial8271
      @danial8271 5 лет назад

      Funny

    • @anandsuralkar2947
      @anandsuralkar2947 5 лет назад

      @@mata5246 right

    • @purrplaysLE
      @purrplaysLE 4 года назад +6

      Somewhere between 7 and infinity-1...

  • @Manabender
    @Manabender 9 лет назад +318

    I got the right answer quickly, but with a different method.
    (More text to ensure a "Read more" button)
    (A little more)
    I considered six "digit slots", for which 0~999999 list all possibilities. Over ten numbers, the rightmost slot cycles through each digit 0~9, the sum of which is 45. This process repeats 100,000 times.
    Since each digit is independent, and all possibilities are used, each digit will appear 100,000 times in each slot. The sum of each ten is 45, there are 6 slots, and there are 100,000 groups of ten. 6*45*100,000=27,000,000.
    And of course, chuck on the +1 from 1,000,000, for 27,000,001

    • @WhatThyHex
      @WhatThyHex 9 лет назад +19

      Manabender I did it pretty much the same way. We have 1 million possible numbers (including 000000, etc) So we have 6,000,000 digits, each digit, each value occurs an equal amount, so 6,000,000/10 = 600,000. So 600,000 * 0 + 600,000 * 1 + 600,000 * 2... etc + 1 = 27,000,001

    • @adam9386
      @adam9386 9 лет назад +2

      WhatThyHex

    • @WhatThyHex
      @WhatThyHex 9 лет назад +2

      moe joe What? Why is this relevant?

    • @adam9386
      @adam9386 9 лет назад +1

      .

    • @Guil118
      @Guil118 9 лет назад +1

      Manabender Another way of seeing this. If you want to get the sum of every digit going from 1 to any number that fits the rule of x = 10^n ( while n is a positive integer ), you can follow this simple idea. Let n = logx, then the answer will be (45n x 10^(n-1)) + 1. For example, 1 to 1,000,000 or 1 to 100.

  • @williamkristian4075
    @williamkristian4075 7 лет назад +3

    Why do numberphile's thumbnails look like the funniest memes . Like a huge equation and it just zooms in on some old painting, with distortion

  • @kryptomath5352
    @kryptomath5352 7 лет назад +131

    For Gauss it was a 50 - 50 chance

  • @lemonke8132
    @lemonke8132 8 лет назад +41

    I did it a different way to get the answer, i used a very complicated algorithm that some refer to as google

    • @Trias805
      @Trias805 6 лет назад +4

      Gauss probably used Google too

    • @comptonGANGBANG
      @comptonGANGBANG Год назад

      @@Trias805 he made google back then just to google it tbh

  • @tanukigalpa
    @tanukigalpa 7 лет назад +1

    I think I was taught this trick a long time ago in one of my math classes, but I still was so pleased when I could remember "pairs, pairs!". It really is a testament to our brains and the power of our memories that a problem explained for 10 minutes sometime in the last 10 years could be recalled within minutes today. I didn't work it out myself, but the explanation stuck with me!

  • @VEN0MXVI
    @VEN0MXVI 11 лет назад +4

    I love it how enthusiastic he is in his videos! Great!

  • @Misterspork57
    @Misterspork57 8 лет назад +160

    I came about a different method, though not nearly as fast but it was still fun working out.
    I considered that the sum from 1 to 9 of the digits was 45. In continuing this to 1-99 that sum was repeated 10 times in the ones digit and 10 times in the tens digit. The sum is also repeated 100 times in each the ones, tens, and hundreds digit in the sum from 1 to 999, and so on. This means the sum of 1-9 is repeated 100000 times in the sum 1-999999 in each digit. 45*100000*6=27000000, finally the +1.

    • @elemersanmiguel
      @elemersanmiguel 8 лет назад +5

      did the same and resulted in this formula: 45*(n*10^(n-1)) + 1 being 10^n the number up to which we want to count the digits.

    • @artartsen2898
      @artartsen2898 8 лет назад

      Wouldn't this give you 45*10^1000005 if n=1000000 ?

    • @elemersanmiguel
      @elemersanmiguel 8 лет назад +1

      +Art Artsen the number you want to count to is 1000000, which is 10^6, so it would give 45*(6*10^(6-1)) + 1

    • @elemersanmiguel
      @elemersanmiguel 8 лет назад

      +Art Artsen if n = 1000000 you want to count up to 10^1000000

    • @artartsen2898
      @artartsen2898 8 лет назад +1

      Oooh right, the way you phrased it threw me off

  • @AnnaGlin
    @AnnaGlin 9 лет назад +2

    The film (based on the book) "Measuring the World" beautifully illustrates this story right at the beginning :)
    It's a german film about the lives of Carl Friedrich Gauß and Alexander von Humboldt. I can recommend it (don't know about an english dub though)

  • @lindhe
    @lindhe 9 лет назад +14

    1:10 doesn't he look really much like Matt?

  • @RFC3514
    @RFC3514 10 лет назад +362

    Your final explanation is somewhat (and unnecessarily) confusing. You're not adding 1 to 999998 to get 999999 (that sounds like you're adding values, not digits - which was what you told viewers to do), you're adding 1 to the result of 9+9+9+9+9+8. In other words, you're adding 1 to 53. Both things eventually give the same result because there are no carries, but it still sounds (from the way you describe it) like you're doing the wrong thing.

    • @MrNicePotato
      @MrNicePotato 7 лет назад +19

      as long as u are adding them up to 999999 each digit is added independently so the sum of digits is conserved.

    • @StefanReich
      @StefanReich 6 лет назад +19

      Yeah he didn't mention that there are no carries which is not immediately obvious.

    • @brokenwave6125
      @brokenwave6125 6 лет назад +12

      Nah...it made perfect sense how he explained it. Your critique is actually more "unnecessary". Your critique is the equivalent of saying..."no, 2 plus 2 doesnt equal 4...thats confusing. 4 is 1 plus 1 plus 1 plus 1."

    • @bernandb7478
      @bernandb7478 6 лет назад +23

      Broken Wave, you should think that over

    • @-danR
      @-danR 6 лет назад +4

      Stefan
      For me, the non-mention of non-carries was/is not immediately _striking._
      Addition, being associative, applies here with singular elegance. 1 is added to an end-8 and so forth leaving us with a stack of "999,999" -strings, each string added yielding 54, etc.

  • @Jimpozcan
    @Jimpozcan 8 лет назад +4

    To make it easier go from 0 to 999999. If you include leading zeros there'll be no effect on the sum but each number will have six digits. The average value of a digit is 4.5. A value of 4.5 per digit times six digits per number times a million numbers from 000000 to 999999 is 27 million. Add 1 for 1000000 and you get 27000001.
    I think that this method is a little easier but it's not really that different.

  • @Parasmunt
    @Parasmunt Месяц назад +1

    A great example of how in maths problems can become incredibly easier when you just write them differently.

  • @sphakamisozondi
    @sphakamisozondi Год назад +1

    01:40 Shoutout to Dr James for roasting Gauss's maths teacher. 🤣🤣

  • @drkoriesh
    @drkoriesh 10 лет назад +3

    To sum digits from number B to number A: (A^2 - B^2 + A + B) /2

  • @matthewlewiscomposer
    @matthewlewiscomposer 8 лет назад +37

    Here we go: 1+2=3+3=6... Wait, this will take a while.

    • @DrewKF
      @DrewKF 8 лет назад +7

      wait, you're onto something! what next?...

    • @tonksdude
      @tonksdude 5 лет назад

      @@DrewKF I think after that comes 17

    • @memebaltan
      @memebaltan 3 года назад

      @@tonksdude 10

  • @NathanClingan
    @NathanClingan 11 лет назад +1

    Loved this one. Thanks!

  • @IzabelaSSilva
    @IzabelaSSilva 11 лет назад +1

    I learned this when I was 12.. I've never forgotten Gauss' story since then

  • @benl2140
    @benl2140 8 лет назад +10

    Consider the last digit of every number from 1 to 1 million. 1/10 of those digits will be 0, 1/10 will be 1, 1/10 will be 2, all the way up to 9. Thus, their average will be (0+1+2...+8+9)/10=4.5. The same is true of the second last digits, the third last digits, all the way up to the sixth last digit. For the seventh digit, it will only be 1 in a single case (1000000). Thus, the sum of all the digits is 4.5*6*1000000+1=27000001.

  • @SkilledTheory
    @SkilledTheory 8 лет назад +272

    I just cheated and wrote a program haha.

    • @gioarca6623
      @gioarca6623 8 лет назад +7

      +Matt LeClerc ahahh the power of calculators :D

    • @nishkaarora6343
      @nishkaarora6343 8 лет назад

      +Matt LeClerc ditto

    • @guilhermebiem582
      @guilhermebiem582 8 лет назад +5

      +Matt LeClerc
      total = 0
      for i in 1..1000000
      digitsString = i.to_s
      thisDigitsSum = 0
      for e in digitsString.chars
      thisDigitsSum += e.to_i
      end
      total += thisDigitsSum
      end
      puts total

    • @TheAdriyaman
      @TheAdriyaman 8 лет назад +1

      +Guilherme Biem What language is that????

    • @guilhermebiem582
      @guilhermebiem582 8 лет назад +1

      Adriyaman Banerjee Ruby

  • @hansulrichjohner2694
    @hansulrichjohner2694 3 года назад +2

    If you think of the numbers from 1 to 100 as a triangle, the answer becomes quite evident and with Gausses intelligence, it is quite possible that he effectively did it.

  • @ex4j1991
    @ex4j1991 11 лет назад +1

    Thank you, that cleared it up pretty well, I didn't realize I had skipped a pairing.

  • @deusexmaximum8930
    @deusexmaximum8930 7 лет назад +3

    4:44 "Let's just write out all the numbers first."
    Oh, boy. Let me get some popcorn. *This is gonna be a while.*

  • @Trami103
    @Trami103 10 лет назад +21

    This is how I would solve it,
    000001
    000002
    000003
    ...
    999999
    at each digit position there are equal number of 0s to 9s. Thus at each digit position the average digit would be 4.5, having 6 digit position and 1 million numbers would give the same result.

  • @dybydx31
    @dybydx31 3 года назад

    Well explained.Gauss has been the huge huge figure in the field of Mathematics.The all time great.

  • @TylerWare777
    @TylerWare777 9 лет назад +2

    Another fun way to do this problem is to consider the number of times the sum 1-9 (value of 45) can occur. From 0-9 it occurs once. From 0-99 it occurs 20 times. From 0-999,999 it occurs 600,000 times. From that you can develop a simple formula that gives 45*6*10^5 = 27,000,000 => +1 => 27,000,001. More generally, for any number that can be expressed as 10^n (where n is a natural number): 45*n*10^(n-1) + 1

  • @riyaanbakhda8320
    @riyaanbakhda8320 8 лет назад +99

    Poozle = Puzzle
    Huuuuh.... British.....

    • @ChrisBandyJazz
      @ChrisBandyJazz 7 лет назад +15

      2:12 that was the "poblem" he gave the people

    • @soupisfornoobs4081
      @soupisfornoobs4081 4 года назад +2

      @@ChrisBandyJazz come on, there's clearly an r there, it's just a bit silent

    • @achyuththouta6957
      @achyuththouta6957 3 года назад

      @@soupisfornoobs4081 no

  • @Chezmemes
    @Chezmemes 9 лет назад +5

    almost similar to Niosus solution :
    for each of the 6 digits of the numbers 000000 to 999999, you have all digits from 0 to 9 used one tenth of the time, i.e 100000 times, so 100000 times * 6 digits * (1+2+3+4+5+6+7+8+9) = 27000000, add that 1 for 1000000 and you got it. That's the way I did it and finished before Gauss finishes in the story he tells :)
    Credit to Niosus for a solution that works for different numbers such as 6000000

  • @salmachi9836
    @salmachi9836 8 лет назад

    Amazing yet simple .

  • @TheBigJinglz
    @TheBigJinglz 11 лет назад +1

    this is so damn genius. i wish i could get such awesome ideas

  • @spyrex3988
    @spyrex3988 4 года назад +5

    Bruh Gauss's 5 century old formula's, theories and equations are still used in most modern engineering problems. It kinda blows my mind

    • @jdm3656
      @jdm3656 3 года назад +1

      Gauss was a 19th Century thinker, and there are mathematical discoveries from ancient times that are still in use.

  • @bengineer8
    @bengineer8 7 лет назад +12

    *Writes a program to do it

    • @ItsQuadPod
      @ItsQuadPod 7 лет назад +2

      Bengineer8 As someone who has started learning python, that's exactly what I did lol

    • @bengineer8
      @bengineer8 7 лет назад

      Andrew Garcia Sadly all I know is TI basic. My calculator is still working on ti, even after a couple hours

    • @sagiksp4979
      @sagiksp4979 7 лет назад +4

      digit_sum = 0
      for n in range(1000000):
      for digit in str(n):
      digit_sum += int(digit)
      print(digit_sum)

    • @janekmuric
      @janekmuric 7 лет назад

      +sagiksp It won't work. You have to use range(1,1000001) instead.

    • @Rekko82
      @Rekko82 7 лет назад +1

      Writing program takes time.

  • @piney153
    @piney153 11 лет назад

    What an elegant solution and great story.

  • @IEtinifni
    @IEtinifni 10 лет назад +1

    I just wanted to say thank you for this video Numberphile; because of it, I got extra credit towards my final grade in my Calculus class today! :D

  • @PhigNewton1
    @PhigNewton1 9 лет назад +21

    When I was ten someone asked me to solve 999,999 * 999,999 in my head. I said 999,998,000,001 but I couldn't prove it was in my head because it was online and it took me a little bit. I multiplied 999,999 by 1,000,000 and subtracted 999,999 to get the number.

    • @UnordEntertainment
      @UnordEntertainment 9 лет назад +10

      PhigNewton1 u should have said "get rekt" after and walked off

  • @tibschris
    @tibschris 8 лет назад +4

    I did it a completely different way.
    The ones place will see as many 0s as 1s as 2s as 3s, etc. This means that there will be 100 thousand 0s, 1s, 2s, etc.
    0 through 9 summed is 45; times 100,000 is 4,500,000.
    The first six digits all do this: the numbers from 0 to 9 is represented 100,000 times each.
    4,500,000 times 6 is 27,000,000.
    Just remember to add "1" at the end from one million: 27,000,001.

    • @turun_ambartanen
      @turun_ambartanen 8 лет назад

      +tibschris
      same
      PS: also 2016 XD

    • @nettles89
      @nettles89 8 лет назад

      +tibschris Ditto. Paused the video, worked it out in a couple minutes, then was really confused when he seemed to be adding the numbers, rather than the digits...made sense before long, though, and was probably a bit quicker than our way!

  • @Peterdrumtom
    @Peterdrumtom 11 лет назад +2

    Haha, this is so funny! We were taught this in math class just yesterday, and this video came up as recommended! ;D
    By the way, i love all of your videos on numberphile, keep 'em coming! :)

  • @burno55_
    @burno55_ 8 лет назад +4

    I did for the 1+2+3...99+100
    (100+1)/2x100
    (100+1)/2=50.5x100=5050

  • @ganondorfchampin
    @ganondorfchampin 10 лет назад +4

    Okay, I'm guessing the answer is 27000000, as there should be an even distribution of each digit. That means each digit appears 1/10 of the time in each, so there should be 100,000 series of 1+2+3+4+5+6+7+8+9 = 45 for each digit. There are 6 digits, so multiple it by 6. Or maybe 27000001, if include one million. Okay, time to watch video for answer.

  • @tonycmac
    @tonycmac 6 лет назад

    Brilliant!

  • @flynnkyran
    @flynnkyran 10 лет назад

    I have a math project and need to get 3 ideas. I got all of them from your channel, one of the channels I will never unsubscribe to. Numberphile

  • @cursedswordsman
    @cursedswordsman 9 лет назад +51

    Easier method: Pair 0 with 100, 1 with 99, ect. and you get 50 pairs of 100, but you have to add the 50 in the middle so it's 5,050.

    • @gillasosaurus
      @gillasosaurus 9 лет назад +9

      so you think 50*100 + 50 is easier than 50*101? lol

    • @cursedswordsman
      @cursedswordsman 9 лет назад +6

      Gil Marquez ...What? I was explaining where 50*101 comes from using intuition. You'd have 50 pairs of 100, and the 50 in the middle wouldn't have a pair so you would add it.

    • @TheRu5tyNaiL
      @TheRu5tyNaiL 9 лет назад +2

      cursedswordsman Actually no. You have 49 pairs of 100. 1 of 100 on its own. and 50 which has no pair. You cannot pair 100 with 0 because if you use 100/2 and get 50, 0 isn't included in those 100 numbers.

    • @RunItsTheCat
      @RunItsTheCat 9 лет назад +1

      TheRu5tyNaiL You can force include it for the sake of calculation. Just do what Numberphile did but all pairs - 1, and add the 50 times you subtracted 1 back at the end. It's 5000 + 50. Tada~

    • @JosephFabian91
      @JosephFabian91 9 лет назад +1

      Gil Marquez Well if I was to multiply that in my head, subconsciously I'd rearrange it in his form. I'd look at 50x101 and say "oh, that's 50 hundreds, plus an extra fifty. 5050."
      I guess if you're going to punch it into a calculator, it's easier to have only two terms multiplied, but I'd definitely say 50x100+50 is more intuitive, at least for my own personal thought process.

  • @AREmrys
    @AREmrys 8 лет назад +7

    There is one problem I have with this. It's difficult to explain, and English is not my native language, but I'll try:
    Obviously it is taken for granted that all those number pairs that add up to 999,999 always have a digit sum of 54 when considered as a pair of two separate numbers. Why can we be so sure that the digit sum of the two separate numbers is transferred into the result of the addition?
    If we pick two random numbers, like e.g. 57 and 26, the digit sum of the two numbers considered separately is 20. Adding them together we get 83, and that has a digit sum of 11. So the digit sum is not always transferred into the result of an addition.
    How can we be sure that it always works out with all the pairs adding up to 999,999? Is there a proof for that?

    •  8 лет назад +2

      +AREmrys Perhaps because in this way of adding two numbers it is always 999 999, so it never breaches the decimal structure/column, I mean it is never 5+6 or 8+ 3, It's always adding up to 9 in a column.
      e.g.: 500 000 + 499 999 = 999 999
      the only calculation of digits here is this:
      5+ 4 = 9

  • @paonquinho
    @paonquinho 9 лет назад +1

    That's good! I did it by noticing how often each digit appeared from 0 to 999999. Adding 0s, each digit appears 100000 times in each position, 6 positions gives 600000. The sum of digits 1 through 9 is 45, so 45*600000 gives us 27000000. Then we add the 1 (from 1 million), and presto! :)

  • @daviddemar8749
    @daviddemar8749 8 лет назад

    cooooooool! can't wait to amaze my friends 😀

  • @thepussygrabbingfamilyvalu557
    @thepussygrabbingfamilyvalu557 8 лет назад +10

    i didn't know the story about how gauss calculated the total from 1 to 100. here's how i calculated the total digits from 1 to 1m: if you just look at the units, the pattern is simply 0,1,2,3...8-9 repeated one hundred thousand times (0,1,2,3,4,5,6,7,8,8,9, and then 10,11,12,13...). now, we know that 0+1+2+3..+9 =45 and that is repeated a hundred thousand times, so the total for the units only is 45,000. for the decades, the pattern is similar: 0 repeats 10 times, 1 repeats 10 times... 9 repeats 10 times, and then it starts again for 10,000 times. the sum is the same, though: 45,000! the for hundreds, the pattern is 0 repeated 100 times, 1 repeated 100 times and the the whole thing stats over again and is repeated 1000 times. all in all, there are 6 positions (units, decades, hundreds, thousands, tens of 000s, hundred of 000s), so the sum of the digits is 45,000*6=27,000,000!

    • @tesseract2144
      @tesseract2144 8 лет назад

      +Carl Coppens You forgit to add the number 1 000 000. So it is 27 000 001

    • @thepussygrabbingfamilyvalu557
      @thepussygrabbingfamilyvalu557 8 лет назад

      Tesser4ct nope. it's 27 000 000

    • @zukaka84
      @zukaka84 8 лет назад

      +Carl Coppens I also solved in this way. But the answer is still 27 000 001. Number 1000000 is not included in that calculation.

    • @BigPapaMitchell
      @BigPapaMitchell 8 лет назад

      +Carl Coppens You didn't include 1000000

    • @juanmarin6557
      @juanmarin6557 8 лет назад

      +Carl Coppens 45,000*6 = 270.000, not 27.000.000

  • @husseinnasser
    @husseinnasser 10 лет назад +8

    Dr. James, I think your assumption is wrong. At 05:50 You said, "If all those pairs equal the same thing we can now add these digits" but that is not true, the sum of digits does not necessary equal the sum of the actual numbers. So lets take an example. 100 is equal 50+50, it is also equal 1 + 99, but when you add the digits of both sums. 5+0+5+0 you get 10 , but when you add 1 + 9 + 9 you get 19. 100 is also equal to 9+9+9+9+9+9+9+9+9+19 (which digits sums to 91). In other words are alot of whole numbers that sums to a given value, however the sum of each sum's digit does not necessary equal. This means when you get the 999999 pairs and multiplied by half a million, you are only summing the digits 9. If you done that with by starting from a 1 instead of a zero , 1000001 multiplied by half a million, you will get a totally different result (much lesser though cuz you are summing 1s and 0s)

    • @prototypesoup
      @prototypesoup 9 лет назад

      wouldn't you pair 1 with 98, in that case? (and, 0 with 99)

    • @LonkinPork
      @LonkinPork 7 лет назад +2

      That's why he's adding them to 999 999 instead of the cool 1 000 000; 9 is the highest possible value of a digit, but given the way he goes through the list, he won't end up with any two digits that add up to anything higher than 9.
      ex. when his system gets to 203 456, that will be added to 796 543 to get 999 999, so working from right to left, it's 6+3 = 9, 5+4 = 9, 4+5 = 9, 3+6 = 9, 0+9 = 9, and 2+7 = 9

    • @brokenwave6125
      @brokenwave6125 6 лет назад

      So in summary...you simply misunderstood him.

  • @KKk-oo1xn
    @KKk-oo1xn 7 лет назад

    Thanks for this video, it was really interesting. Best regards!

  • @zankar
    @zankar 11 лет назад

    this is great stuff

  • @AdamBomb5794
    @AdamBomb5794 6 лет назад +4

    or just print(sum([sum(map(int,str(i))) for i in [x for x in range(1,1000001)]]))

  • @99hourvideos
    @99hourvideos 9 лет назад +4

    I learn more here in 7 minutes than I did in 7 years of school! Wow, thanks Brady!

  • @TheGoldCraftians
    @TheGoldCraftians 11 лет назад

    Thats the most bloody brilliant thing on earth

  • @saxbend
    @saxbend 11 лет назад +1

    Thanks. Took me a while to get to that conclusion but I can see it now. :-)

  • @OrdwaysChannel
    @OrdwaysChannel 8 лет назад +7

    Before I see, I'm gonna guess 1 million

    • @OrdwaysChannel
      @OrdwaysChannel 8 лет назад +2

      +spaz cuber well i was wrong

    • @Henrix1998
      @Henrix1998 8 лет назад

      I quessed 4.5 millions

    • @eduardogomes4865
      @eduardogomes4865 7 лет назад +2

      Well, pretty bad guess... Every number has the sum of its digits higher than one (otherwise it would be 0), so it's very clear that the result must be higher thant 1 million.

  • @Graviton1066
    @Graviton1066 8 лет назад +93

    all the digits in 1,000,000 add up to ... 1 ... 1 + 0 + 0 + 0 + 0 + 0 + 0 = 1

    • @scoutman195
      @scoutman195 8 лет назад +14

      All the digits in one to a million, implying 1, a million, and all numbers inbetween.

    • @Graviton1066
      @Graviton1066 8 лет назад

      Zombers
      No, that's not what it implies.

    • @scoutman195
      @scoutman195 8 лет назад +38

      Graviton1066 sorry, it implies it to people with a brain.

    • @Graviton1066
      @Graviton1066 8 лет назад

      Its very poorly worded.

    • @scoutman195
      @scoutman195 8 лет назад +12

      Graviton1066 have you ever heard the phrase "pick a number one to ten"? i know it implies it.

  • @toddbiesel4288
    @toddbiesel4288 7 лет назад

    Gauss tossing his slate to the teacher: 19th century mic drop.

  • @Dannnytrules
    @Dannnytrules 11 лет назад +1

    Beautiful :)

  • @pennyfish89
    @pennyfish89 8 лет назад +13

    OH YA, THIS STORY.... when i was very young like his age, school teacher ask to do the same.... so wad i did was,,
    0 + 100 = 100,
    1 + 99 = 100,
    2 + 998 = 100
    ...... 49 + 51 = 100
    100 x 50 + 50 = 5050
    i solve it in 10mins...

    • @pennyfish89
      @pennyfish89 8 лет назад +1

      +pennyfish89 Oh ya,, btw,,, i wrote this comment before i finish watch this vid

    • @xingchen3258
      @xingchen3258 8 лет назад +13

      +pennyfish89 Maybe one day you will contribute as much to mathematics as Gauss did!

    • @XxXgabbO95XxX
      @XxXgabbO95XxX 8 лет назад +2

      +pennyfish89 2 + 998 = 1000

    • @chraman169
      @chraman169 8 лет назад +1

      2+998 =1000

    • @DrewKF
      @DrewKF 8 лет назад +3

      Also:
      2 + 998 = 1,000
      ;D

  • @calavenas
    @calavenas 9 лет назад +4

    It isn´t so hard...
    The video is wrong, because 999990+10 it´s equal to 54 or to 46?
    It´s just a little example, the right answer is 4.999.996

    • @TNbarnholdt
      @TNbarnholdt 9 лет назад +2

      999.990 is paired with 9 giving 999.999
      10 is paired with 999.989 giving 999.999

    • @Hootbrooks
      @Hootbrooks 9 лет назад +1

      Corredor De Luz Thank you. I also summed the digits as they would appear in each column and got 4999996. The method he used combines numbers before parsing them into digits to be added.

  • @Sartaglo
    @Sartaglo 11 лет назад

    1:15 When you said nine I randomly cut the deck of cards I was holding (from watching Numbery Card Trick - Numberphile) and right there was the nine of clubs. MINDBLOW

  • @etglasstortvand
    @etglasstortvand 10 лет назад

    I'm pretty proud of myself to have done it when I was about 8-9 years :) It's a neat trick

  • @rambi1072
    @rambi1072 8 лет назад +68

    I got 5050 in a second, I just assumed 50.5 was the average of all the numbers then multiplied that by 100

    • @bloomsux69
      @bloomsux69 8 лет назад +84

      Sure you did

    • @maplesyrup2944
      @maplesyrup2944 8 лет назад +2

      +Rambi “Rambi9000” Ok, cool.

    • @DrewKF
      @DrewKF 8 лет назад +2

      Wow, that's like Jedi Accountant skills...

    • @NoriMori1992
      @NoriMori1992 8 лет назад

      +Heisenberg GB Problem?

    • @DrewKF
      @DrewKF 8 лет назад +2

      +NoriMori ego problem...

  • @webkinz0207
    @webkinz0207 11 лет назад +5

    Love this show!!! I'm going to SHOOT the next person to say "timesed by..." though. :/

  • @MaxwellHauser
    @MaxwellHauser 11 лет назад

    PERFECTLY explained.

  • @strohtaler4698
    @strohtaler4698 8 лет назад +1

    incomplete - wanted is the sum of the digits of EACH number, but calculated was the sum of the digits of the sum of pairs - missing the prove that adding the digit sum of each number (of a pair) is the same as the digit sum of both numbers added. digitsum(1+99) digitsum(1) + digitsum(99)

  • @theskoomacat7849
    @theskoomacat7849 9 лет назад +9

    (x^2+x)/2 you can thank me later

  • @sonkew826
    @sonkew826 8 лет назад

    is there anyone who doesn't know the story already and doesn't still want to watch good auld James Grime with his satisfied smile.
    but seriously, who doesn't know that story?

  • @MitchBurns
    @MitchBurns 7 лет назад

    I learned that trick back in Algebra class. I was shown it like a triangle though. Then you just call the last number n and multiply n by n+1 and divide by 2. So the formula for adding all the numbers like that is just (n^2+n)/2. It's pretty similar to factorial only with addition instead of multiplication.

  • @IanFox
    @IanFox 11 лет назад

    Omg, exactly what I thought before he said it! Go Gauss!

  • @dxutube
    @dxutube 8 лет назад

    Brilliant

  • @TheFreeBro
    @TheFreeBro 2 года назад

    I love how he writes his zeros

  • @johns1307
    @johns1307 11 лет назад +1

    Just want to point out that every minute of video probably equates to anywhere from 2-10 minutes of footage. The average video length of these videos means that you can safely assume that these people have given the equivalent of an entire lecture per video. Dunno about the rest of you, but I think that's quite a bit of dedication. Keep it up folks, and keep watching! We can all stand to learn some.

  • @glowingfish
    @glowingfish 6 лет назад +1

    It is really easy to MULTIPLY all the digits! :)

  • @rodaraujos88
    @rodaraujos88 11 лет назад

    nice, never thought of generalizing it :)

  • @LaullyVanDraculaura
    @LaullyVanDraculaura 11 лет назад

    My math teacher told me this story , i love her!

  • @jcfreak73
    @jcfreak73 11 лет назад

    Another thing which I think is interested. The 10th triangle number is 55. The 100th is 5050. The 1000 is 500500. the 1,000,000th is 500,000,500,000. It is always 5, followed by one less of the number of zeros in n, followed by 5 and one less of the number of zeros in n. There are other interesting patterns as well, but I don't remember many of them.

  • @suchaboringusername
    @suchaboringusername 11 лет назад

    every digit place sees every digit the same number of times, so for instance, the 100,000 place sees 0 up until 99,999, then 1 until 199,999, etc, so you can just take the average (4.5) times 1,000,000 and multiply by 6 (for the 6 decimal places) and then add 1 for the 1 in 1,000,000

  • @christosvoskresye
    @christosvoskresye 9 лет назад +1

    I thought you would do this a different way. Adding the digits 0+1+2+3+4+5+6+7+8+9=45, and from 0 to 999,999 has each of these digits appearing 100,000 times in each column, so those digits add to 45 X 100,000 X 6 = 27,000,000. Then, once again, add the 1 from 1,000,000.

  • @DJejbarros
    @DJejbarros 8 лет назад

    I used a different approach: If you consider "1" as "000.001" and so on, you'll have one million 6-digit numbers. Considering each number appears an equal amount of times, you divide 6 million digits for 10. Then multiply 600.000 for 45 (the sum from 0-9) and get 27.000.000 and finally add 1

  • @VicvicW
    @VicvicW 11 лет назад

    I did a similar thing in math with all the numbers from 1 to 100, you simply add up all the pairs that equal a hundred (disregard 100 and 50) and you can work out that there are 49 hundreds, so 4900, add on the extra 150, and wala. You can use the same truck here, it all comes to 500 000 050 000.

  • @booodan
    @booodan 11 лет назад

    I thought of the same trick that Gauss used when he first stated the problem using 1-100, I feel so smart :D

  • @fandomruler2668
    @fandomruler2668 8 лет назад

    I learned this in math class it was so cool

  • @koobz21
    @koobz21 11 лет назад

    this guys going places

  • @TheKrazykool809
    @TheKrazykool809 11 лет назад

    i got the answer the exact same way :O
    getting it right feels awesome, much less discovering your own way!

  • @PattyManatty
    @PattyManatty 11 лет назад

    That being said I do like your use of integer division and modulus operators.

  • @viditparab2851
    @viditparab2851 8 лет назад

    That was so awesome .... we had the same problem till 1000 in our test

  • @MrAniketShedge
    @MrAniketShedge 11 лет назад

    I guess I know what you missed- adding all digits of 999999 will be same as adding up all digits of 999996 and 3, but not 999997 and 3, because in addition some amount is carried over to next places (recall addition from primary school). So using clever pairs, it can be worked out. Notice that this works out even when other places are changed: 999989 and 10

  • @SimeTologist
    @SimeTologist 11 лет назад

    Oh, this is brilliant. I was just about to write a comment about how this couldn't work, then I saw how beautifully it actually does:
    When you add two numbers, a and b, the digit sum d(a+b) equals d(a) + d(b) as long as no pair of digits with the same order of magnitude exceeds 9 when adding together. d(9)=9 and d(2)=2, but d(9+2)=d(11) is just 2. This is what the zero does - it lets every pair sum up to 999,999, and this is why adding 1 to 999,999 or 1,000,000 wouldn't work.

  • @Psychentist
    @Psychentist 9 лет назад +1

    Reminds me of one of the puzzles on ProjectEuler.

    • @siebehiel1071
      @siebehiel1071 9 лет назад

      It is the first one, but it is a little differrnt

  • @MyBallzGotShocked
    @MyBallzGotShocked 6 лет назад

    When i was 13 i made up the (n squared minus n)divided by 2 plus n. It was the same problem, add every number from 1 to 100 and i finished it in seconds. I understand my teachers astonishment a little more now

  • @therandomguy4292
    @therandomguy4292 8 лет назад +1

    U can use nxn+1
    _________
    2
    If 1 to 50 then n=50 means
    50x51
    ________ = 25x51 =1275
    2
    If it is 1to 100 then n=100
    100x101
    __________= 50x101=5050
    2
    Means we can use this to find the sum

  • @TheSuperZombieNerd
    @TheSuperZombieNerd 11 лет назад

    It can be written either way; in German, the letter "ß" is the same as writing two of a lower-case "s."
    For example, Bülowstraße can also be written as Bülowstrasse.

  • @stevefrandsen7897
    @stevefrandsen7897 9 лет назад

    Good trick Dr. James.
    Thinking outside the lunch pail (box has been sooooo overused).

  • @tugvow3025
    @tugvow3025 5 лет назад

    I actually came up with a formula to solve them. I'm sure it's probably been done before.
    To determine the sum of all units up to a power of 10:
    ((N*4.5)*10^N)+1
    To determine the sum of all numbers up to a power of 10:
    ((10^N/2)+0.5)*10^N
    Have fun.