What's special about 277777788888899? - Numberphile

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 3,9 тис.

  • @numberphile
    @numberphile  5 років тому +554

    Extra footage: ua-cam.com/video/E4mrC39sEOQ/v-deo.html
    Matt's new book is Humble Pi: bit.ly/Humble_Pi
    More Matt videos on Numberphile: bit.ly/Matt_Videos

    • @mrJety89
      @mrJety89 5 років тому +18

      Can't you just ask what numbers give you 277777788888899 when multiplied, and then that number would have a persistense of 12 by default.

    • @ErixTheRed
      @ErixTheRed 5 років тому +10

      @@mrJety89 Or really you could look to multiply out to any permutation of the digits in 277777788888899. Maybe it's easier to end up with an even number like 997777778888882.

    • @jackingbowl5678
      @jackingbowl5678 5 років тому +1

      can you make a downloadable program for those codes?

    • @QuackingQuietly
      @QuackingQuietly 5 років тому +4

      interesting seeing python in a Numberphile video, as I just started learning python a couple days ago

    • @mrJety89
      @mrJety89 5 років тому +1

      @@ErixTheRed
      Yeah, I was thinking abou that too. Something tells me that they've already tried both of those ideas.

  • @jerberus5563
    @jerberus5563 5 років тому +8008

    "5 times 4 is … uhhhhh….20." The deeper into math that you get, the harder the easier things become sometimes. XDDD

    • @raimonwintzer
      @raimonwintzer 5 років тому +97

      preach

    • @GoProGuyHD
      @GoProGuyHD 5 років тому +55

      He is obviously joking

    • @timirkantisom7833
      @timirkantisom7833 5 років тому +60

      Nope

    • @mmeister8582
      @mmeister8582 5 років тому +505

      This is actually super accurate. U stop using numbers at some point when u do math, so u lose basic skills

    • @SirNyanPanda
      @SirNyanPanda 5 років тому +20

      @@mmeister8582 What do you mean you stop using numbers?

  • @TheSwiftFalcon
    @TheSwiftFalcon 3 роки тому +2284

    As a programmer, what gets me is that he went back and modified his code, but didn't remove the redundant print statement.

    • @CorwinAlexander
      @CorwinAlexander 3 роки тому +72

      Definitely, I barely coded ever and haven't coded since the 80s, but even I spotted that that was the problem.

    • @DarkKyugara
      @DarkKyugara 3 роки тому +33

      I knew he would simply remove 1 from the total number, because the code gave him +1 because of the entra last step.

    • @jpdemer5
      @jpdemer5 3 роки тому +112

      It's a Parker Program: almost right.

    • @Lodinn
      @Lodinn 3 роки тому +22

      What got me is print statements in the first place. Python2 is strong with him.

    • @KarstenOkk
      @KarstenOkk 3 роки тому +6

      With a little bit of extra interfacing it could make logical sense. Like the final number gives an additional string "Final entry: X". But yeah, he said he "could just" remove it, he never said he would.

  • @unrealnews
    @unrealnews 5 років тому +348

    I love how Matt is willing to think and even make mistakes on camera. That kind of security in one’s intelligence probably makes someone really easy to get along with.

    • @F1amingDeath
      @F1amingDeath 3 роки тому +6

      Never trust a perfect person

    • @efulmer8675
      @efulmer8675 3 роки тому +15

      Except Matt isn't perfect, he makes tons of mistakes all the time, he's just secure that his mistakes don't reflect on his actual abilities. Otherwise we wouldn't have the brilliant "Parker X" banter that makes his channel and Numberphile's channel so entertaining.

    • @chriswebster24
      @chriswebster24 2 роки тому +21

      @@efulmer8675 I think that was the point. A person who claims to be perfect is likely to be fake, and you can’t trust someone like that. A person who doesn’t mind getting caught making mistakes, because he never pretended to be perfect in the first place, is more likely to be someone you can trust.

  • @sk8rdman
    @sk8rdman 5 років тому +2686

    At first I thought that Matt was extremely brave to be so confident in his coding skills that he would be willing to do it live on the internet in front of an audience of nerds.
    Then I realized that Matt is not ashamed to be caught making mistakes.
    In truth, that's one of the things I admire most about him.

    • @YourIQDoesntMeanShitToMe
      @YourIQDoesntMeanShitToMe 5 років тому +76

      I entirely agree. I deeply admire and envy that about others, while I despise my own fear.

    • @HN-kr1nf
      @HN-kr1nf 5 років тому +38

      these numberphile regulars are really great.

    • @totheknee
      @totheknee 5 років тому +14

      He makes mistakes live on the internets for breckfist and doesn't give 2 Fs! XD

    • @GhostGlitch.
      @GhostGlitch. 5 років тому +68

      Mik he was talking about the individual digits being prime

    • @caleblewis8169
      @caleblewis8169 5 років тому +6

      Parker square

  • @WhiteHatMatt
    @WhiteHatMatt 5 років тому +2335

    Mathematician small talk: “So what numbers are you into these days?”

    • @qwertyuiop-cy5en
      @qwertyuiop-cy5en 5 років тому +50

      ahh uhm i personally like 12

    • @theterribleanimator1793
      @theterribleanimator1793 5 років тому +23

      @@qwertyuiop-cy5en i could go for an exponential today.

    • @EaglePicking
      @EaglePicking 5 років тому +32

      @@theterribleanimator1793 It's been the number 91 again for the last few weeks.

    • @Cream147player
      @Cream147player 5 років тому +14

      32 is a number I find inherently attractive for no apparent reason (other than being a power of 2).
      I don’t find 16 as attractive but I do love it being the only number that can be described as x^y and y^x where x and y are differing positive integers (2 and 4, for the record).
      Overall I just love powers of 2. Numbers like 12 and 24 are cute and all, but that factor of 3 feels like an imperfection.

    • @jeek3452
      @jeek3452 5 років тому +8

      3, take it or leave it

  • @subzeroelectronics3022
    @subzeroelectronics3022 3 роки тому +279

    I love how “Suggested: The Parker Square” pops up in the corner when Matt says, “I’m always one to give it a go.”

  • @benjaminbrady2385
    @benjaminbrady2385 5 років тому +2987

    The base 2 version of this game is pretty sad

    • @nowonmetube
      @nowonmetube 5 років тому +96

      You can only use 1s

    • @nowonmetube
      @nowonmetube 5 років тому +150

      1
      11
      111
      1111
      11111
      Now play the game backwards..

    • @J374338
      @J374338 5 років тому +66

      Both 1 and 0 are the BOOM 🤣🤣🤣

    • @samodelkini
      @samodelkini 5 років тому +121

      nowonmetube It‘s always 1 step whatever the number is
      111111111111111-> 1*1*...*1=1

    • @Smittel
      @Smittel 5 років тому +41

      @@samodelkini yea i think they knew that thanks for clarifying tho

  • @MrCyanGaming
    @MrCyanGaming 5 років тому +3537

    lot of people saying 327 isn't prime, I think he means the individual digits are prime

    • @numberphile
      @numberphile  5 років тому +921

      Yep, I think so.

    • @stardustreverie6880
      @stardustreverie6880 5 років тому +27

      @@numberphile nitrogen-infused coffee ☕

    • @Garbaz
      @Garbaz 5 років тому +302

      He said "Primes" (plural), so yes.

    • @JamesSpeiser
      @JamesSpeiser 5 років тому +210

      that was obvious to me immediately and I'm an idiot

    • @hgjfkd12345
      @hgjfkd12345 5 років тому +93

      It's a parker prime

  • @FixTheWi-Fi
    @FixTheWi-Fi 5 років тому +553

    Matt: *writes code*
    Matt: "That can't go wrong."
    Me: *waits to see how that'll go wrong*

    • @wtfiswiththosehandles
      @wtfiswiththosehandles 4 роки тому +20

      That's something we would have called a *Parker Code*

    • @GlobalWarmingSkeptic
      @GlobalWarmingSkeptic 2 роки тому +5

      Every programmer writes perfect code while they are staring at it. Nothing can ever go wrong.

  • @Stuka01210
    @Stuka01210 5 років тому +3947

    *uses calculator*
    "2 × 7.... equals 14"
    Literally me when I write an exam. Can't go wrong lol

    • @LundbergMeja
      @LundbergMeja 5 років тому +83

      Stuka don't forget to double check it!

    • @iNthGineer
      @iNthGineer 5 років тому +75

      It was me in engineering school... I was double checking simple multiplications because I was more stressed to get it wrong because of them than with the reasoning of the math!

    • @RedGallardo
      @RedGallardo 5 років тому +34

      He's a mathematician, he does it in a sequence, it doesn't matter how simple is an action. It's the order inside your mind. Because the moment he says "nah, I don't have to do it, it's obvious" he starts to make mistakes. From small to bigger and for math these are all the same. He's learned the hard way to be patient and correct. So it's now a reflex. =)

    • @Peter_1986
      @Peter_1986 5 років тому +8

      I had a weird habit of refusing to accept a calculator when I took math tests in junior high school in the late 90s.
      My math teacher was always like "shouldn't you have a calculator, though?" and I said NO, and insisted on calculating everything by hand.
      Not sure why, but maybe I wanted to prove to myself that I could do it without a calculator or something.

    • @maxine_q
      @maxine_q 5 років тому +6

      Well he wanted to multiply all the digits together, so he started with 2 x 7. Sure he could have typed 14 straight away and saved two button presses, but he didn't.

  • @thijsvanesch6939
    @thijsvanesch6939 5 років тому +586

    "i'm always one to give it a go"
    *parker square shows up in the i-card*

  • @Mutual_Information
    @Mutual_Information 2 роки тому +82

    For some reason, I always like videos about really big numbers. It seems it’s more interesting for a large number to be special.. because it’s so specific!

  • @richardy
    @richardy 5 років тому +935

    12:53
    Matt be like "I'm always one to give it a go"
    Top right corner suggestion: *Parker Square*

  • @PotmosHetoimos
    @PotmosHetoimos 5 років тому +1758

    I paused this at 3:40 and thought "I could code this!" So I did. Then I came to the video...and watched him decided to code it.

    • @DanielBrownsan
      @DanielBrownsan 5 років тому +196

      You get points for "doing the work". Kudos!

    • @kryo2k
      @kryo2k 5 років тому +76

      Did exactly the same. Ended up without bugs.

    • @Faaaaaaaaaaaaz
      @Faaaaaaaaaaaaz 5 років тому +68

      5 points to Gryffindor

    • @anand.suralkar
      @anand.suralkar 5 років тому +4

      Cool i m not in my room or i would have also coded it

    • @anand.suralkar
      @anand.suralkar 5 років тому +3

      @@kryo2k lol

  • @8939403231
    @8939403231 5 років тому +27

    I loved watching him code along with showing the math problem. Please do this more often!

  • @BastienHell
    @BastienHell 5 років тому +564

    > print(n), return "done"
    > pastes code in the terminal
    Inspiring.

    • @terner1234
      @terner1234 5 років тому +61

      you just can't comprehend his high IQ and thinking skills

    • @globalincident694
      @globalincident694 5 років тому +44

      he was using python 2 as well

    • @Lovuschka
      @Lovuschka 5 років тому +33

      He forgot to add "Hello World"

    • @thexavier666
      @thexavier666 5 років тому +89

      I know it's a joke. But let me educate others. Matt is a mathematician, not a coder. He is not expected to know the tiny nuances of coding. What matters is whether his logic is correct. So returning "DONE" is perfectly fine. Also, using Python2 is also fine. It's not like this code is some multi-client multi-threaded huge application which needs to maintained for a long time. It's just a simple script to crunch some numbers. No need to bring Python3 here as he is comfortable with Python2. But it's encouraged to shift to it. (I myself shifted to Python3 a month back)

    • @NightsChapterSeven
      @NightsChapterSeven 5 років тому +5

      Sumitro Bhaumik how is returning done fine? It makes no sense

  • @timbuttanshaw9431
    @timbuttanshaw9431 5 років тому +155

    I love that as Matt says "I'm always one to give it a go" a link to the parker square video comes up in the top corner

  • @idkravitz
    @idkravitz Рік тому +14

    The reverse approach might be better - instead of looking for numbers that result in most steps, look for steps and reconstruct the number that should give these steps. For instance if the last step is 20 then we should go for number whose digits are divisors of 20, like 225 or 45, and so on

  • @DylanMatthewTurner
    @DylanMatthewTurner 5 років тому +205

    I wrote a small C program to brute-force output the numbers.
    I think it's correct, if I understood the problem correctly.
    It should go through all natural numbers through 18446744073709551615 (the maximum size of an 8-byte unsigned long long in C).
    It's been running for a few hours now and I have 1-10.
    Terminal output:
    10-> 0
    Number 10 has score: 1
    25-> 10-> 0
    Number 25 has score: 2
    39-> 27-> 14-> 4
    Number 39 has score: 3
    77-> 49-> 36-> 18-> 8
    Number 77 has score: 4
    679-> 378-> 168-> 48-> 32-> 6
    Number 679 has score: 5
    6788-> 2688-> 768-> 336-> 54-> 20-> 0
    Number 6788 has score: 6
    68889-> 27648-> 2688-> 768-> 336-> 54-> 20-> 0
    Number 68889 has score: 7
    2677889-> 338688-> 27648-> 2688-> 768-> 336-> 54-> 20-> 0
    Number 2677889 has score: 8
    26888999-> 4478976-> 338688-> 27648-> 2688-> 768-> 336-> 54-> 20-> 0
    Number 26888999 has score: 9
    3778888999-> 438939648-> 4478976-> 338688-> 27648-> 2688-> 768-> 336-> 54-> 20-> 0
    Number 3778888999 has score: 10

    • @roguechlnchllla6564
      @roguechlnchllla6564 5 років тому +16

      You can make it much bigger, if the original number is a String, and you just multiply the digits.

    • @defectus1769
      @defectus1769 5 років тому +41

      @@roguechlnchllla6564 Even better, notice how the result of the multiplication is always of the form 2^a × 3^b × 7^c, since you're just multiplying lots of digits together. The 4's, 8's and 9's can be broken down into multiple 2's or 3's, and the 5 never appears with any 2's without instantly giving a multiple of 10 and therefore a zero at the start.
      Now, the problem just boils down to finding three integers, a, b and c, such that
      2^a × 3^b × 7^c
      is a number with a multiplication persistence of 11.

    • @wg_spiritomb
      @wg_spiritomb 5 років тому +5

      I have written a simple one in python . Upto 6-7 its fast, but after that the time it takes grows exponentially

    • @eilonlifshitz7302
      @eilonlifshitz7302 5 років тому

      i got them all to the last one as well

    • @X3MgamePlays
      @X3MgamePlays 5 років тому +4

      @@defectus1769
      You beat me to it. I too was thinking about that.
      I also thought of reverse engineering the next number.
      Ex. 2, 12, 34, it ends at 34, since it needs 2*17. 17 is a 2 digit number and a prime.
      Ex. 2, 12, 43.
      Ex. 2, 12, 223 or 232 or 322. Some of which can go further.
      Ex. 2, 21, 37.
      Ex. 2, 21, 73.
      I tried 6, and got myself a little tree of options to start from. They all end with 6. But I don't know how to write a program that looks for reversed engineer all options.
      If someone makes that, you could use that 11 parts number as a start. All possible answers would roll out. And perhaps even more.
      Since you are right about 2, 3 and 7. You could easily weed wrong answers out for the next step.

  • @egorstrakhov1840
    @egorstrakhov1840 5 років тому +789

    9:40 - u have nice hairstyle on your shadow)))

  • @VynceMontgomery
    @VynceMontgomery 2 роки тому +55

    I think Matt hit on an important bit when he mentioned the base-ten-ness of this problem. Consider that in base 2, you can never have a number that multiples to anything other than 1 or 0. Has anybody checked for patterns across bases?

    • @douggggggg
      @douggggggg 2 роки тому +6

      i would think base 10 is definitely the reason for 11 being the maximum
      probably a proof if you generalize a base 10 number as a sum of multiples of powers of 10 where you can manage to pull out a "10" after 10 steps and then you will get the 11th step always resulting in 0 and there being no way to continue

    • @VynceMontgomery
      @VynceMontgomery 2 роки тому

      @@douggggggg I don't think it's that clean, quite, but I do think the attrition of possible branches gets too fast

    • @markhughes7927
      @markhughes7927 Рік тому

      111 - the number of the star-gate?

  • @jessephillips1233
    @jessephillips1233 5 років тому +248

    I paused at 1:50 and gave it a try. Went with 999
    so:
    999->729->126->12->2
    4 steps, not bad.

    • @Ascordigan
      @Ascordigan 5 років тому +17

      I tried 3927 and got five (378, 168, 48, 32, 6) steps.

    • @SgtSupaman
      @SgtSupaman 5 років тому +5

      @MilesTisserand , if you mean any number has an equal chance of being chosen, I have a feeling the odds would lean heavily to 1 and 2 steps because of how often 0 comes up. It would be interesting to see the odds if you automatically exclude certain numbers that you know will drag down the average (like any that has 0 from the start).

    • @tabletoparcade4203
      @tabletoparcade4203 5 років тому +4

      @@Ascordigan Then 679 (2x3) would have the same steps. Now you know after watching the rest of the video, that the aim is find the lowest number.

    • @plplpop1
      @plplpop1 5 років тому +2

      @MilesTisserand Interesting idea. If I wasn't a busy undergrad, I would definitely try it out and graph the probability distribution. It'd be crazy to find a hidden poisson or something haha

    • @megamuumi7859
      @megamuumi7859 5 років тому +1

      I got six steps with 888888888

  • @johnox2226
    @johnox2226 5 років тому +359

    9:42 Matt with a Mohawk does not look right...

    • @RonJohn63
      @RonJohn63 5 років тому +2

      That's a buzz cut, not a Mohawk.

    • @WrenAkula
      @WrenAkula 5 років тому +13

      @@RonJohn63 Look at the shadow on the door.

    • @RonJohn63
      @RonJohn63 5 років тому

      @@WrenAkula I choose to not understand!

    • @forstnamelorstname4169
      @forstnamelorstname4169 5 років тому +9

      Matt is secretly an anime protagonist with a fancy transformation sequence.

    • @bcn1gh7h4wk
      @bcn1gh7h4wk 5 років тому

      me: "Matt with a moh.... ?" _spots the joke_ ".... omg..." _facepalm_

  • @jwsjacobs
    @jwsjacobs 4 роки тому +32

    12:52 "I'm always one to give it a go"
    (i) symbol recommends The Parker Square
    *savage*

  • @paulbeattie1717
    @paulbeattie1717 5 років тому +881

    I liked the coding part! More of that yes yes!!

    • @randomdude9135
      @randomdude9135 5 років тому +9

      Can I learn these Cscience things all by myself?

    • @artaway6647
      @artaway6647 5 років тому +19

      @@randomdude9135 yea, fortunately there are tons of programming lessons on the internet

    • @anthonyhoffmann
      @anthonyhoffmann 5 років тому +8

      Just say no to python.

    • @LiborSupcik
      @LiborSupcik 5 років тому +16

      @@anthonyhoffmann why so?

    • @erikbmx478
      @erikbmx478 5 років тому +10

      How about subscribing to computerphile?

  • @Zejgar
    @Zejgar 5 років тому +278

    0:14
    "277,777,788,888,899" - written on the paper
    "277,777,778,888,899" - said by Matt
    Don't think we wouldn't find a Parker Square in this one too, mister Matt!

    • @feronanthus9756
      @feronanthus9756 5 років тому +8

      I had high hopes... and then we got 15 seconds into the video.

    • @UnabashedOops
      @UnabashedOops 5 років тому

      Someone explain?

    • @stumbling
      @stumbling 5 років тому +9

      The Parker persistence of "277,777,778,888,899" is still 11.

    • @cone16v
      @cone16v 5 років тому +1

      PARKER SQUAREEEAAAAAA

    • @TheKivifreak
      @TheKivifreak 5 років тому

      @@nicholas2113 broke the record of smallest number fulfilling said property

  • @FanTazTiCxD
    @FanTazTiCxD 3 роки тому +28

    I love that thumbnail. The way he looks, with such fascination, at the number 277777788888899 as if it's the most attractive thing in the world 🤣🤣🤣

  • @BurakBagdatli
    @BurakBagdatli 5 років тому +1045

    Matt, we love you but please it's time to upgrade to Python 3.

    • @recklessroges
      @recklessroges 5 років тому +34

      He's got 9 *whole* months before python2 is EOL ;-) [Yes! *stop* using python2; maybe try golang?]

    • @VaibhavKarve
      @VaibhavKarve 5 років тому +8

      I came into the comments to say this!

    • @nowonmetube
      @nowonmetube 5 років тому

      Lol

    • @nowonmetube
      @nowonmetube 5 років тому +4

      What's the difference though?

    • @mursie100
      @mursie100 5 років тому +28

      Or maybe use a decent programming language.

  • @ethanmay170
    @ethanmay170 5 років тому +69

    Hey mate, after watching this video I have spent hours upon hours trying to figure out a formula.
    I haven't come up with an exact formula, however, I have noted that if you start *backwards* you can go around in circles for ages.
    Take the single digit number 6, for example. Now 6 has 4 factors, 1-6 and 2-3.
    With this, we can make 4 number, from the 4 factors... 16 23 32 61
    We know two of these are primes so they are irrelevant, bye bye 23 and 61
    now, with 16 and 32, one is the double of the other - ill come back to this.
    So, like before, 16 has 3/single digit factors, 2-8,4-4
    from this, we can make 28, 44, 44:) and 82
    We can continue this sequence until all our remaining factors and their combinations only have primes as factors, and then this final number we can put into the program, or calculate yourself and figure out the steps, coming back to the final figure/our figure, 6.
    I'll leave you with one last thing. 23 earlier, was a prime number and we could not continue it in the sequence, however; 2*3=6 but so does 1*2*3, and 1*1*2*1*3*1*1
    This is the difficulty I am facing with my current formula, as there is nothing against placing 1s into a prime number solution or just any solution in general and then continue on from there-doing the same thing over and over again. It does just mean one thing - your final solution will be longer than the current record, however, we can break the record and set a new one.
    I'll let you break the record though, is too tired now :)

    • @ZournUnleashed
      @ZournUnleashed 3 роки тому +13

      this dude wrote all of that only to get 3 likes

    • @Seb135-e1i
      @Seb135-e1i 2 роки тому +4

      ​@@onehotseat You... missed the point.
      Ethan started on a random single-digit number, and created a sequence that would go to it (28 -> 16 -> 6) by factoring it. It's transparent how this method works - you find single-digit factors of a number, and string them together to create a new number (factors of 16 are 1,16, 2,8, 4,4, so 28 and 44 both go to 16 which goes to 6). Using the same method we continue - single-digit factors of 28 are 4,7.
      47 is prime, and 74 has no single-digit factors. However, 4 is 2x2, so we also have 227, 272, 722. And none of them have single-digit factors, so we can't continue this sequence past length 3 (47 -> 28 -> 16 -> 6)
      Adding 1 to the _starting_ number is pointless, but we don't _have_ a starting number. However, a 1 in an intermediate step is not harmful, and only expands the number of possibilities for reversing a sequence. We can't continue the sequence from 23 because 23 is prime - nothing will multiply to it. However, by inserting 1s, we could end up with a number that contains only a 2, a 3, and a ton of 1s, with single-digit factors. From these, we can construct a number that multiplies the number we found with 2, 3, and 1s, and that number will multiply to 16.
      At the extreme, there's the number from the video. That one ends at 0, and there's infinitely many numbers that can lead to 0. Picking one at random, 20, gives us more factors to play with. 20 factors to 4,5, giving us 225, 252, 522, 45, and 54. Continuing in this fashion, we get to 438939648, which has factors 2^12, 3^7, 7^2, all single-digit. However, you may notice that there's no way to arrange and combine those factors that gives us another number with single-digit factors, _unless_ if you slot in a 1 and end up with the number 4996238671872. That number _does_ have single-digit factors - a 2, 6 7s, 6 8s, and 4 3s.
      I'm just not sure whether this number theory method is faster than brute forcing. There's already a plethora of ways to rearrange and combine factors of large numbers, and you have to find the ones with single-digit factors. You then have to account for the fact that every combination could have any number of 1s put into it, in any position, and factorise those too, all of which sounds computationally more expensive than just multiplying down the digits of most numbers from 1 to 10^320

    • @9891904317589
      @9891904317589 Рік тому +1

      Toying with this for a while, I think I found a way to get to higher numbers. If you check the steps on each number, they always repeat the lower steps. Like, 277777788888899, results first is 4996238671872, then later is 438939648. While the one beneath it, 3778888999, the next step is 438939648. This could mean that a way to find the 12th number, maybe the second step of it is the first step of the 11th one. Not a rule, since the smaller ones seem to break it, but bigger ones a very consistent.

  • @ElavesGames
    @ElavesGames 8 місяців тому +3

    five years later this is hands down my favourite thumbnail on this channel

  • @MichaelMamanakis
    @MichaelMamanakis 5 років тому +208

    If you add 90, or a 3.24e-11% you get 277777788888989, which has the same persistence, but is also prime.

    • @Monitorbread
      @Monitorbread Рік тому +4

      woah

    • @fcturner
      @fcturner Рік тому +7

      It’s higher than the original, and just has the same sequence of numbers. Bit underwhelming.

    • @bable6314
      @bable6314 Рік тому +6

      It's literally the same sequence of numbers lol, just in a slightly different order.

    • @MIKIBURGOS
      @MIKIBURGOS Рік тому +2

      If you add 900 to yours, it also works (or 990, 9990, 99990....)

    • @fffmpeg
      @fffmpeg Рік тому +4

      any permutation of these digits have the exact same persistence and it's pretty obvious. changing two digits around and calling it adding 90 is a little weird

  • @santimonto26
    @santimonto26 5 років тому +81

    While the Parker Square is always amusing, this video leads me to a nice new constant: Brady's Number = 2

    • @woodfur00
      @woodfur00 5 років тому

      Vihart already did that

  • @AIex_Kidd
    @AIex_Kidd 2 роки тому +7

    love the shadow of his head at 9:41 lol

  • @nadiaguarracino6910
    @nadiaguarracino6910 5 років тому +19

    I discovered this trick when I was bored a school and started to multiply persistently numbers in the calculator. I always found it a very intriguing trick, didn't know it was actually a mathematical curiosity

    • @keksitzee1094
      @keksitzee1094 5 років тому +4

      Judging from the videos in this channel, anything and everything is a mathematical curiosity when the simplest problems can be scaled up, and up, and up, until it isn't trivial anymore. There are quite a few other videos like this where the game is pretty simple, but then when you continue to play it, it gets more difficult. Then they whip out the brown paper

    • @thedavecwright
      @thedavecwright 5 років тому +2

      So rightly, the Guarracino Number of 277777788888899 is 11... etc... 😊

  • @mattfritz1984
    @mattfritz1984 5 років тому +103

    I really like these types of videos that combine coding and number stuff

  • @akshayrajan8793
    @akshayrajan8793 5 років тому +37

    At 12:51
    Matt: "I'm always one to give it a go"
    Numberphile suggested video: "The Parker Square"

  • @oldcowbb
    @oldcowbb 5 років тому +274

    wise word: never code in front of class
    matt: hold my square

    • @nateiverson8681
      @nateiverson8681 3 роки тому +2

      Honestly it's no more risky than doing mathematics in front of a class. Everyone makes mistakes at the board.

    • @MakisHMMY
      @MakisHMMY 3 роки тому +1

      I always coded in front of my class. Hours and hours per day

  • @GlitchyPikachu
    @GlitchyPikachu 4 роки тому +3

    Every Numberphile thumbnail is a work of art, but some, like this one, are even better art than the rest

  • @twibby6625
    @twibby6625 5 років тому +155

    Soon in comments, new world record with number that has 15 steps and Matt playing it on piano

    • @ErixTheRed
      @ErixTheRed 5 років тому +5

      Play it on today's google doodle

    • @zmaj12321
      @zmaj12321 5 років тому +11

      Soon on 4chan, someone asks a question about an anime and someone else mathematically analyzes it to find a 15 -step number.

    • @ehsan_kia
      @ehsan_kia 5 років тому +13

      It does indeed seem like 11 is the limit. I calculated up to 1500 digits and there aren't any solutions. Similarly, I computed limits for bases 2-10,
      Base 2: 1
      Base 3: 3
      Base 4: 3
      Base 5: 5
      Base 6: 5
      Base 7: 8
      Base 8: 6
      Base 9: 7
      Base 10: 11
      They all reach this "cliff" after which there's no answers as far as I computed, so it's probably fair to conjecture they all reach limits.

    • @theonetruepath
      @theonetruepath 5 років тому

      @@ehsan_kia Base 11: 13 23777777777777777778888888999999aaaaaaaaaaaaaaaaaaaa

    • @bencrossley647
      @bencrossley647 5 років тому

      @@ehsan_kia Any chance you could do this for bases up to 36? I have a conjecture I'd like to test and I cannot code. :(

  • @matthiasheymann
    @matthiasheymann 5 років тому +103

    Your shadow at 9:46 is epic - you look like Julius Caesar. :-)

  • @robertattaway7866
    @robertattaway7866 4 роки тому +9

    This was pretty cool. I spent some time starting with digits and increasing them until the proverbial 2,5 pattern or a zero started showing up. Once you start getting a significant number of digits it really is difficult to not get a zero into any position simply due to the law of large numbers having some zeros somewhere.

  • @JordanMetroidManiac
    @JordanMetroidManiac 5 років тому +40

    I think it would be important to consider other base counting systems. Ten is a weird number, so start with smaller (or maybe larger) bases to see what might be going on underneath all of it. Certainly, larger bases will have larger persistence measures because a randomly chosen number will have a smaller chance of having a zero in the product of its digits.

  • @kevinr.9733
    @kevinr.9733 5 років тому +264

    You need a string of digits that multiply out to 277777788888899.
    ...
    Oh, bummer, all of its prime factors are greater than 7.

    • @PsychoMuffinSDM
      @PsychoMuffinSDM 5 років тому +28

      It's not just a string of digits that multiple out to that number, but any combination of the digits in that number.

    • @owensilberg2966
      @owensilberg2966 5 років тому +25

      and you can add as many 1s as you want anywhere in the number

    • @kevinr.9733
      @kevinr.9733 5 років тому +1

      True. That would potentially make the search easier.

    • @owensilberg2966
      @owensilberg2966 5 років тому +4

      @@kevinr.9733 I agree with that, but couldn't it also exponentially increase the number of numbers that would have to be checked?

    • @MIKIBURGOS
      @MIKIBURGOS 5 років тому +2

      @@Stefan-ls3pb Oh i just realised :( you destroyed my life

  • @peppermintmiso4341
    @peppermintmiso4341 3 роки тому +3

    12:52 "I'm always one to give it a go"
    "Suggested: Parker Square"
    Numberphile you did it again

  • @Ritermann
    @Ritermann 5 років тому +31

    Every time I watch these kind of videos, I find myself convincing myself that I would be so good at math if it would be taught to me this way back in school. But then I think, I am a potato when it comes to math. Fun to watch it anyway

    • @Loki-
      @Loki- 2 роки тому +2

      Nothing wrong with giving it a go

  • @mohakgautam4832
    @mohakgautam4832 5 років тому +163

    Tutorial on how to convert your computer into a bonfire.

    • @whatisthis2809
      @whatisthis2809 5 років тому +16

      Step 1. Run complex problems that nobody has answered!
      Step 2. Wait
      Step 3. Wait
      ...
      Step 9. Wait
      Step A. Wait
      Step B. Wait
      ...
      Step FC. Wait
      Step FD. Wait
      Step FE. Wait
      Step FF. Wait
      Step 100. Boom! You got an answer and a fire!

    • @MajorMandyKitten
      @MajorMandyKitten 4 роки тому +2

      Are you running a 90s processor without a cooler? Lol

    • @Tsutomu6
      @Tsutomu6 4 роки тому

      Made my day.

    • @boboften9952
      @boboften9952 4 роки тому +1

      @@whatisthis2809
      Brilliant .

  • @grim66
    @grim66 3 роки тому +2

    One of the things I would do if I were coding the search algorithm: Include a table of entries that have already been processed, a cache, which links the number being calculated to its persistence value
    Any time you complete a digit-multiplication, check if the result has already been cached, because if it has, you already know how many more steps are left in the chain
    Or, better yet: Organize digits by their size, since as they say, at the end of the video, any permutation of digits will give you the same result -- This will reduce the size of the cache because you won't have a bunch of permutations clogging it up
    So, if "n" is the input number, your program would have a rough flow of
    per(n):
    is n a one-digit number?
    TRUE: return 0
    FALSE: proceed to next segment
    R = multiply_digits(n) -> sort(R) -> is (sorted) R cached?
    TRUE: retrieve cached value, add 1, this is the persistence value of n; save n and its persistence to cache
    FALSE: recurse, using R as the new n -> add 1 to returned persistence value of R to get n's persistence value
    This would be especially useful if you were iterating over numbers, as it would save time computing the same chain of numbers over and over again
    On the note of iteration: As they say in the video, avoid any combinations of digits that are known to create a 0; the first and easiest way to do this is to check if the number has both a 5 and an even number in its digits, in which case you automatically know that its persistence value is 2. If the number ALREADY has a 0 in it, you know its persistence value is 1. This check might end up consuming more processing power, though, it's hard to say.

  • @manudude02
    @manudude02 5 років тому +25

    You can reduce the sample spaces even further. You can eliminate all numbers with a 1 in it (since it has no effect on the result), and can eliminate all numbers that start 34.... (you can start 26...) or 36..... (similar to 2....9).
    edit: Also just realised it could never have more than 1 six in it, as two sixes allows 4....9 for a smaller number. And it cannot start 44 since it allows 2....8...

    • @Luxalpa
      @Luxalpa 5 років тому +4

      You can also calculate the thing backwards (i.e. start from the smallest number, then work your way upwards), which would probably make the thing much faster.

    • @manudude02
      @manudude02 5 років тому +2

      @@Luxalpa I thought some more about it, and I think that any numbers beating it will have to start with 2,3,4,6,7,8,9 or 26 before we hit the wall of 789s (and obviously kept in digital order). If we cheat and count 26 as one digit for the purpose of recording length (obviously we multiply by 12 still), then we only need to check 210680 numbers to check all numbers of length 230, and even that is double counting some numbers.

    • @Luxalpa
      @Luxalpa 5 років тому +3

      @@manudude02 I would like to know how you got to that idea.
      I myself found a way to get up to length 1600 with fairly realistic effort (without requiring a super computer that is). Basically, the realization is that all chain numbers (i.e. all numbers except for the starter) must be N = 2^x * 3^y * 7^z. So you just need to go through all the x, y and z, find a number that doesn't contain 0 or 5, and then see if the multiplied digits result in any other of those numbers. With x, y, z < 1000 you only need to check 1 billion numbers. Storing them all on a hard disk would take some 1.6 TB of storage, however I think if you exclude all the numbers with 0 and 5 in it, the storage requirement will probably be much lower (I'll have to double check my math on that one or just learn Python and give it a try).

    • @senshi01
      @senshi01 5 років тому

      I tried to make it all the way around, the program ask the number of steps and then calculate all the numbers... didn't succeed...

    • @manudude02
      @manudude02 5 років тому +1

      @@Luxalpa Obviously we are not going to have zeros or one and removing 5s (not checked, but I doubt you can avoid even numbers for long), but look at every 2-digit other case. I ignore any starts with a 7,8 or 9 in it since we are already in the "wall" in that case
      22 -> replace with 4 for 1 less digit
      23-> replace with 6 for 1 less digit
      24-> replace with an 8 for 1 less digit
      26-> unable to find a fault in it
      33-> replace with a 9 for 1 less digit
      34-> using 26 gives a smaller number with the same product
      36-> using 2 and a 9 gives a smaller number with the same product
      44-> using 2 and a 8 gives a smaller number with the same product
      66-> using 4 and a 9 gives a smaller number with the same product
      I started up a program (in java) about 10 minutes ago to check, so far it is has checked every candidate under 120 digits, but at least it scales by an order of N^2, while checking 2^x * 3^y * 7^z is scaling by an order of N^3.
      edit: Actually, I think your way may be more efficient if you don't have memory concerns, going from k=1000 to k=1001 gives you another 3 million-ish numbers to check, while going from 1600 to 1601 digits is another 9 million-ish numbers to check. You do have the downside in that you'd need to actually convert the x/y/z values into an actual number, but that's a small price to pay

  • @carlwitt7950
    @carlwitt7950 5 років тому +24

    Math and Coding in one video.
    This is a good start to my day.

  • @marvinabarquez8915
    @marvinabarquez8915 3 роки тому +20

    Matt could've fixed the duplicated single digit final value by removing line 3. that's my only contribution to this video

  • @andymcl92
    @andymcl92 5 років тому +42

    Loving Matt's shadow at 9:42 :)

  • @julianpinn5018
    @julianpinn5018 5 років тому +32

    This is a common problem on MBPs caused by the trackpad ribbon cable being too long, being bent to fit, and failing after time at the kinks. Replace the trackpad ribbon cable (£7 or so) and your trackpad and keyboard should work again. Did mine a few months ago. Good luck.

    • @standupmaths
      @standupmaths 5 років тому +10

      Julian Pinn Thanks! I plan to take a screwdriver to it soon.

    • @gartinmarrix8484
      @gartinmarrix8484 5 років тому

      Did it myself recently and I was surprised at how easy it really was.

    • @Zolbat
      @Zolbat 5 років тому +1

      Just go to the genius bar and get them to fix it practically for free (probably less than 2000 pounds at least)

    • @gartinmarrix8484
      @gartinmarrix8484 5 років тому

      @@Zolbat It's 7 pounds for a cable, over 100 for the genius bar.

    • @Zolbat
      @Zolbat 5 років тому +3

      @@gartinmarrix8484 so practically for free, which is amazing since the problem isn't even apples fault. Obviously all the users don't know how to treat their hardware... Opening and closing a laptop multiple times is nothing short of careless.

  • @mushyplushii
    @mushyplushii 5 років тому +26

    When you became so advanced, easy things are the hard things

  • @zadrik1337
    @zadrik1337 5 років тому +7

    I lost it when the Parker Square video popped up in the suggestion card when he said "I'm always one to give it a go."

  • @michaelhoefler5118
    @michaelhoefler5118 5 років тому +24

    “You never wanna have two threes, cause that could be a nine”

  • @salzlord
    @salzlord Рік тому +1

    I love these videos because they inspire me to code programs that do this myself. Eventhough I’m watching this 4 years later it was a great video

  • @officer_baitlyn
    @officer_baitlyn 5 років тому +16

    4:00 the trackpad having problems along with the keyboard is a known mac issue from what i can tell watching louis rossmann

    • @jtlundberg2381
      @jtlundberg2381 5 років тому +2

      Yeah it is. It happened to my computer. The trackpad cable just needs to be replaced. You can get one off amazon for $10. Super easy fix

    • @jeffreymontgomery7516
      @jeffreymontgomery7516 5 років тому +2

      or he hit the shortcut to turn them off and hasn't realized it yet

    • @ceruleanfish6703
      @ceruleanfish6703 5 років тому +1

      Or RE trackpad on a Mac laptop... If it's an older machine, take the battery out and make sure it isn't swelling. My LithIon MacPro battery up and swelled so bad it crushed the trackball circuitry.

    • @jacoblysinger
      @jacoblysinger 5 років тому

      I just came here from his video 😂

  • @MEver316
    @MEver316 5 років тому +57

    I paused the video to try the challenge and went for 799->567->210->0
    I beat you Brady, but only just...
    EDIT: after watching the rest of the video I'm quite pleased with my 3 steps 😁.

    • @Anders1314
      @Anders1314 5 років тому

      Tha's atually 4. He counts the zero when he counts the 11 steps

    • @MEver316
      @MEver316 5 років тому +1

      @@Anders1314 I counted the 0 as well. I didn't count the 799 I started with though.

    • @Anders1314
      @Anders1314 5 років тому +1

      @@MEver316 You're right. My mistake

    • @yesmannoman454
      @yesmannoman454 5 років тому

      Mine was 7879

    • @anand.suralkar
      @anand.suralkar 5 років тому

      Nice

  • @manningbartlett522
    @manningbartlett522 7 місяців тому +1

    This video gives the known lower bound for P(n) = 12 as n > 10^233. The latest result is from Tim Peters (Sept 2023): " A long computer run checked N=30000, a bit over 36*10^12 candidates. The smallest candidate with more than 30000 digits is > 2.67*10^30000, which is the smallest remaining possibility for a(12)"

  • @VaibhavKarve
    @VaibhavKarve 5 років тому +22

    Dr. Brady, we need more live coding in Numberphile videos.

  • @sherlockholmes4005
    @sherlockholmes4005 5 років тому +4

    my favourite part of the video was when Matt looked at 5x4 and knew it was 20, but took a second to check in his head because he can't afford to get that wrong on camera. I have the same experience whenever I have to give simple change when working the till lol

  • @NathanJamesJerritze
    @NathanJamesJerritze Рік тому +3

    that is the world's best thumbnail

  • @achyuthramachandran2189
    @achyuthramachandran2189 5 років тому +21

    Never a Matt Parker video without a Parker blooper within 20 seconds of the video starting.

    • @numberphile
      @numberphile  5 років тому +6

      It's all marketing for Matt's new book about math mistakes... Available now: bit.ly/Humble_Pi

    • @standupmaths
      @standupmaths 5 років тому +13

      Numberphile Can confirm. All mistakes (for the rest of my career) are now officially deliberate.

    • @aozorakei5288
      @aozorakei5288 5 років тому +1

      @@standupmaths You could say it's a Parker Mistake

  • @dyllpickalio1700
    @dyllpickalio1700 5 років тому +7

    I love how he always has to put in the Parker Square.
    Matt will never live it down...

  • @androlsaibot
    @androlsaibot 4 роки тому +1

    Matt: "You put in a 5, it's not gonna work"
    Me: really? Let's only use 3, 5, 7, 9
    .
    I found some numbers with 3 steps, the smallest one should be 57 -> 35 -> 15 -> 5
    Also working: 7753 (actually getting a 0 at the second step, but I love how 7 * 7 * 3 * 5 = 735), 7533 (oops, that's 3*3*3*3*3 * 31, nice!), 5553, 5333
    .
    4 steps: 35559 or 555333 -> 3375 -> 315 -> 15 ->5
    .
    Anyone knows more?

    • @androlsaibot
      @androlsaibot 4 роки тому

      4 steps: 557
      .
      5 steps:
      5579 / 75533
      1575
      175
      35
      15
      5

  • @fernandoalvear3739
    @fernandoalvear3739 5 років тому +81

    He didn't use stackoverflow? Matt is a genius!

    • @Attlanttizz
      @Attlanttizz 5 років тому

      You misspelled Stack Overflow.

    • @wWvwvV
      @wWvwvV 5 років тому +5

      @@Attlanttizz you can't put whitespaces in URLs. Even the logo is stack*overflow* as one word:.

    • @Attlanttizz
      @Attlanttizz 5 років тому +2

      @@wWvwvVUse your favorite search engine, search for Stack Overflow, you'll see.

    • @MrUwU-dj7js
      @MrUwU-dj7js 5 років тому +1

      @@Attlanttizz If this was a matter of you being able to find your page on Google, the original comment was already fine.

    • @Attlanttizz
      @Attlanttizz 5 років тому

      @@MrUwU-dj7js Well obviously: no. Stack Overflow is the name of the site and it's written with two separate words, not in one word. Even the term stack overflow as is used in programming is written with two separate words. Just wanted to point that out, nothing more :)

  • @gregg4
    @gregg4 5 років тому +16

    What about using a different base?
    Let's say base 2; because those numbers only contain one and zero, the product will always be either one or zero. The max number of steps for base 2 is just 1.
    What is it for base three?
    222 (26 in base 10) -> 22 (8 in base 10) -> 11 ( 4 in base 10) -> 1
    Three steps is the longest I have been able to find so far.
    Is there a formula to find Max_Steps(base) = ?

    • @JimBob4233
      @JimBob4233 5 років тому

      Shouldn't 22tri be 8dec, since it's 6+2 and 2*2*2? Likewise, 11tri is 4dec.

    • @gregg4
      @gregg4 5 років тому

      @@JimBob4233 Yes, I did edit my comment to correct that.

  • @Chrysalis208
    @Chrysalis208 5 років тому +5

    I just learned more about coding in this simple video than i ever had before

  • @Art-fn7ns
    @Art-fn7ns 5 років тому +700

    Python 2? In 2019? Well, I suppose you still have 288 days left to enjoy your habits.

    • @PaulaJBean
      @PaulaJBean 5 років тому +128

      Python 2 will not suddenly stop working in 2020. There are gazillion companies still using Python 2.x codebases, and they won't migrate everything to Python 3. Heck, forty-year old COBOL code is still used, millions and millions of lines of code.

    • @Art-fn7ns
      @Art-fn7ns 5 років тому +80

      @@PaulaJBean You're right. Also, Pluto is a planet.

    • @leandrometfan
      @leandrometfan 5 років тому +66

      @@Art-fn7ns well, it is, a dwarf one.

    • @iqbalnash5748
      @iqbalnash5748 5 років тому +4

      @@Art-fn7ns Now this is important!

    • @Stiwoz
      @Stiwoz 5 років тому +4

      @@leandrometfan smaller than our moon? it's an ateroid, not a dwarf planet. its diameter is smaller than the width of australia cmon

  • @MattiaConti
    @MattiaConti 5 років тому +39

    if len(str(n)) == 1 is for nerds -> if n < 10 is for engineering

    • @besserwisser4055
      @besserwisser4055 5 років тому

      pretty simple

    • @blueskyredkite
      @blueskyredkite 5 років тому +1

      That's definitely less stress on your processor. There are times I wish I knew languages other than Perl.

    • @erynn9770
      @erynn9770 5 років тому

      len(str(n)) is what's directly defined ("if there's only one digit left"). n

    • @HyperSpify
      @HyperSpify 5 років тому

      If you compile the code, str(n) is faster because you're going to call str(n) later on line 6 so the compiler will optimize it to compute it once and keep the result. Of course you can get rid of str(n) completely by using "% 10" (i.e. modulus 10) and "/10" in a loop instead to calculate "result", which I'm guessing is even faster.

    • @charlieangkor8649
      @charlieangkor8649 5 років тому

      Mattia Conti hes a mathematician. cannot do common sense. only complicated abstract concepts.

  • @oliverb7897
    @oliverb7897 Рік тому

    Every time I see this thumbnail it cracks me up. Matt Parker is a treasure

  • @pudicio
    @pudicio 5 років тому +74

    more live coding with matt!!! more live coding with matt!!!!

  • @st0rmforce
    @st0rmforce 5 років тому +17

    I don't know why, but I love plucky little 77.
    77->49->36->18->8
    The longest run for a two-digit number.

    • @MusicalMatthew
      @MusicalMatthew 5 років тому +4

      Fun fact, in my 12th grade math class many years ago, the teacher had on the whiteboard (from a previous class) a complete the number sequence puzzle and it was 77, 49, 36, 18, ___ and I managed to get it in seconds. I've told so many people that one and very few have solved it without me telling them. So when I read out loud '77 - 49 - 36 - 18' I was like HEYYYYY I RECOGNIZE THAT PATTERN!

    • @gabrieleporru4443
      @gabrieleporru4443 5 років тому

      It seems like it never wants to end

    • @gabrieleporru4443
      @gabrieleporru4443 5 років тому

      @@MusicalMatthew well, okay, but it doesn't seem it was so difficult😂

    • @brightonpauli3916
      @brightonpauli3916 5 років тому +5

      @@gabrieleporru4443 It never seems difficult when you know the answer lol

    • @MrRenanwill
      @MrRenanwill 5 років тому

      Factor this number in prime decomposition and then get the possible numbers that make 77 be true in their multiplication (arranging them in any order).

  • @xdkristof
    @xdkristof 7 місяців тому +1

    "Nice, going for primes! Look at you!"
    327 is 109x3.
    update: someone just pointed out that he means 3, 2 and 7 respectfully

    • @fizztrumpet1496
      @fizztrumpet1496 6 місяців тому

      3, 2, and 7 are primes

    • @xdkristof
      @xdkristof 6 місяців тому +2

      @@fizztrumpet1496 well, i'm a dumbass

    • @fizztrumpet1496
      @fizztrumpet1496 6 місяців тому +1

      @@xdkristof No you're not :)

  • @captainufo4587
    @captainufo4587 5 років тому +39

    I'm a simple man. I see a thumbnail of Matt Parker possesed by the ghost of Hannibal Lecter and I click on it.

  • @piguy5450
    @piguy5450 5 років тому +142

    As a python programmer, I appreciate the demonstration

    • @user-ob3nn3th7y
      @user-ob3nn3th7y 5 років тому +31

      As a python programmer, i dont appreciate the continuation of python 2.

    • @kwinzman
      @kwinzman 5 років тому +29

      len(str(n))==1 instead of just n

    • @dertyp6833
      @dertyp6833 5 років тому +17

      print n
      return "DONE"
      How can appreciate this?

    • @AlexanderBukh
      @AlexanderBukh 4 роки тому

      pithon, ok

    • @primekrunkergamer188
      @primekrunkergamer188 4 роки тому +2

      @@kwinzman I know right completely unnecessary use of the length function. But its alright since he is not a programmer

  • @Frostnburn
    @Frostnburn 3 роки тому +3

    Just to add, they can also remove any numbers with "1" in them for the smallest number search, since that number will always yield the same number of steps as the same number but with all the '1's removed, so any smallest number cannot have "1" in its digits

  • @bg4567890
    @bg4567890 5 років тому +5

    7:14 you don't need to have print(n) in line 3 where you have the check.... it already prints that result for you

  • @wompastompa3692
    @wompastompa3692 5 років тому +68

    Just get rid of 'print n' if you don't want final result showing up twice.

    • @Septimus_ii
      @Septimus_ii 5 років тому +4

      That throws up an error if the original number is only 1 digit, but that can easily be ignored or corrected

    • @kittyrules
      @kittyrules 5 років тому +14

      no no keep it! this way it is Parker code.

    • @namelastname4077
      @namelastname4077 5 років тому +3

      the method is recursive, so you only need one single print(n) on the first line

  • @LudwigvanBeethoven2
    @LudwigvanBeethoven2 5 років тому +10

    4:42 Thats a weird way if saying
    if(n < 10)

  • @15schaa
    @15schaa 5 років тому +9

    Matt: I'm always one to give it a go.
    *Suggested: The Parker Square*

  • @stormwolfenterprises3269
    @stormwolfenterprises3269 5 років тому +6

    while loops: Let's just keep running till you say to stop
    Matt Parker: 6:19
    Also Matt Parker: *mic drop*

  • @notnoah154
    @notnoah154 2 роки тому +6

    Can't you just get a number that when you multiply all its digits makes the record holder? Wouldn't that just add 1 step? Or is the record holder impossible to multiply into?

    • @dhycee8215
      @dhycee8215 2 роки тому

      fact, but what string of digits multiplied will get you that number.... figure that one out

    • @notnoah154
      @notnoah154 2 роки тому

      @@dhycee8215 thats the problem lul

  • @polpat
    @polpat 5 років тому +25

    What happened to the calculation of the width of the 3-sided coin?

    • @xyz39808
      @xyz39808 5 років тому +2

      anoderone comments on that vid say they probably fell down the hole of "what counts as a flip"

  • @Arthur-mj2vd
    @Arthur-mj2vd 5 років тому +4

    That moment when it took Matt about 5 seconds to figure out what 5 x 4 equals, made me realize I still have a chance to succeed in this world.

    • @cuboembaralhado8294
      @cuboembaralhado8294 3 роки тому

      You just mastered a basic skill, thats not much impressive

  • @TheSkullConference
    @TheSkullConference 4 роки тому +3

    I love how Matt is both hosted on Computerphile and Numberphile.

  • @leefisher6366
    @leefisher6366 5 років тому +5

    Hi, I might be underthinking this, but can't you start at the end and work backwards?
    For example, end on the single digit 2. Now 1x2 = 2, so the previous step can be 12. The one before that can be 34 as 3x4 = 12.
    Now, 34 is 2x17, which doesn't work, but all that means is that you replace 34 with 62 or anything else that equals 12. If none of those work, start adding 1s into the mix, for example 162 (which multiplies to 12) gives 992 as a starting point for the next one.
    Doing this, I'm sure a number with multiplicative persistence greater than 11 can be found in time; and there's no limit to the persistence if you're persistent enough.

    • @charliesteiner2334
      @charliesteiner2334 5 років тому

      Definitely seems promising. It's also possible to imagine this terminating - whenever you hit a number that has a prime factor other then 2,3,5,7, (i.e. bigger than 10) you lose. If a number's factors (allowing duplicates) can only be rearranged into losing numbers, it also loses. Do all numbers eventually lose, or is there an infinite chain of winners?

    • @AndrewBlechinger
      @AndrewBlechinger 5 років тому

      So basically we try to construct numbers with a bigger persistence by working up like this?

    • @leefisher6366
      @leefisher6366 5 років тому

      For each number, there are infinitely many options for the one above it, since we can have as many 1s as we like, anywhere in the number that we like. Surely, not all of them can be losers?

  • @arturslunga3415
    @arturslunga3415 3 роки тому +9

    When the calculator is tilted to Landscape you know it's serious math

  • @phoephoe795
    @phoephoe795 3 роки тому

    Set a programme to run backwards-
    start with any single digit
    then split it into its factors
    string it into a number
    split that into its factors (stop if double digit)
    string it up, and repeat.
    So 8, 2x4
    24, 3x8
    38, 19x2 (stop)
    5, 1,5
    15, 3x5
    35, 7x5
    75, 3x5x5
    355, and so on

    • @PsychoMuffinSDM
      @PsychoMuffinSDM 3 роки тому

      Not that easy, you have to consider other permutations too:
      So 8, 2x4 AND 2x2x2, AND 4x2
      So 24 AND 222 AND 42, etc
      Don't forget 1s may apply too, so 124, 214, 412, 2221, 2122, 421,142, etc etc etc...

  • @mickybadia
    @mickybadia 5 років тому +27

    You can tell the guy is crazy for real as he does string conversions for integer arithmetic.

    • @jeffreymontgomery7516
      @jeffreymontgomery7516 5 років тому +4

      You have to, because you're using each digit individually.
      Multiply the digits of 12345: 1 * 2 * 3 * 4 * 5 = 120
      Well you can't do that if you don't discriminate the digits, can you? The next simplest way would be d=n%10; r=r*d; n=n/10 - - - -Oh - but you still need to loop... and be careful of n, lest it become 0... so you'd need to check the length each iteration...
      Far simpler to just check each digit individually - So the simple way coding it is to convert to a string, and take each character individually for its length.

    • @mickybadia
      @mickybadia 5 років тому +6

      @@jeffreymontgomery7516 As a computer scientist I invite you to believe me. String conversions are inappropriately costly and looping through integer divisions is exactly what you should use. Here is how, if you do not go for built-in functions like "reduce":
      def mult_digits(n):
      acc = n % 10
      chopped = n // 10
      while chopped > 0:
      acc *= chopped % 10
      chopped //= 10
      return acc

    • @jeffreymontgomery7516
      @jeffreymontgomery7516 5 років тому +9

      ​@@mickybadia - You misunderstand me... I agree.
      If I were making that as part of a computer program, to be used long-term, I would keep it a number.
      But for the example he gave, without getting too in-depth and needing to use more variables and perform extra testing on the value and ...
      It does what was wanted quickly and simply.
      He's using a language that needs interpreting, such as BASIC. Let's write it in Pascal, or C, and compile it...
      Hey - even better - let's not use something that high level, or needs an interpreter - let's write it in machine language and get it done even quicker!
      ....except then nobody watching would be able to understand what it's doing.
      For what it was meant to do, it does well.

    • @MrRenanwill
      @MrRenanwill 5 років тому

      He can do it Just with integer, but it would be harder. For exemple, you need to know how much digits d the number n has and then take the how Many mulples of 10^d has in n to take Just the first digit of the number and do it recursively to take the others one. Well... exhausting doing this and I dont know if it would be beter optmizied then the version that he did.

    • @djhalling
      @djhalling 2 роки тому

      In the second line it would have been far easier to keep it as an integer. Instead of
      if len(str(n))==1:
      he could just have used
      if n

  • @ohboy1113
    @ohboy1113 5 років тому +12

    Now I know what this thumbnail reminds me of.
    *It’s treason, then*
    Darth mathematicus

  • @mooncowtube
    @mooncowtube 4 роки тому +1

    Love how when Matt says "I'm always one to give it a go" a card for the Parker Square video appears...

  • @ermanovnemachan3086
    @ermanovnemachan3086 3 роки тому +3

    The prime factorization of each number (>20) in the list at 8:03 can be written as
    2^a * 3^b * 7^c (a,b,c >= 0)
    So the same will probably apply to the number with multiplication persistence of 12.
    But no idea how to get a computer to work out numbers with 200 digits...

    • @AA-100
      @AA-100 Рік тому

      If I knew how to write code so that it does this:
      Take the number 277,777,788,888,899, replace some of the 8s with 2 4 or 2 2 2, and some of the 9s with 3 3, then add an arbitrary number of 1s at the end, then rearrange ALL the digits in that number, to get another new number, which is an even number
      The digits in this number will still multiply to the same value and still have a MP of 11.
      Now check if that number can be expressed as 2^a × 3^b × 7^c. If not, repeat the process
      Surely by pure luck, the computer will find such a number that is in the form 2^a × 3^b × 7^c
      Which will be the digits of a number with an MP of 12.

  • @NatetheAceOfficial
    @NatetheAceOfficial 5 років тому +61

    7:30 - ♫ ♫ I will refactor this later! ♫ ♫

    • @keelwakamar
      @keelwakamar 5 років тому +3

      Daniel shiffman FTW

    • @Wouter10123
      @Wouter10123 5 років тому +3

      // 15-05-2013 MP: Temporary solution, fix later.

  • @mizar_copernicus138
    @mizar_copernicus138 5 років тому +15

    "this is so much quicker!" said the inventor of calculator

  • @jasper265
    @jasper265 5 років тому +10

    For the deduplicating of the single-digit: removing the "print n" on line 3 would have done the trick...

    • @robheusd
      @robheusd 5 років тому +4

      But then it wouldn't print the result for a single-digit number. Instead you should first do the non single-digit number and then only print the result once.

  • @zkhydro4985
    @zkhydro4985 5 років тому +10

    Can you work backwards? Start at step one work to step 12?

    • @chappie3642
      @chappie3642 4 роки тому +1

      How would you know what the factors of the multiplication are? There are so many possibilities for each step

    • @phoephoe795
      @phoephoe795 3 роки тому +1

      Its factors must be single digit- which makes checking easier since you can repeatably divide by 2, then 3, 5, and 7. If there is anything left then stop.
      More on point, 12 step might be impossible- since theres only 10 starting positions and therefore a finite number of combinations.

  • @JellyMonster1
    @JellyMonster1 2 роки тому

    Well I had to have a go. The best I came up with was 66, 36, 18, 8 (3 steps), 77, 49, 36, 18, 8 (4 steps - 11:17 in the video) and 6677, 1764, 168, 48, 32, 6 (5 steps). Thanks Matt.

  • @Gebes
    @Gebes 5 років тому +51

    Where can i send my 12 step number to get verificated as record holder?

    • @Gebes
      @Gebes 5 років тому +5

      @TheBibliophile 0 you will see it, if i get the official record holder...

    • @michakrawiec8217
      @michakrawiec8217 5 років тому +3

      How did it go? Where can i see it? :D

    • @peet4444
      @peet4444 5 років тому +3

      Did you send it yet? Im curious

    • @_catzee
      @_catzee 5 років тому +1

      @@Gebes just say it right here
      And of course, email Numberphile.

    • @Funkopedia
      @Funkopedia 5 років тому +8

      These things become a big deal very fast. If you just post it anywhere online at all, particularly showing your work, the timestamp will show you were the first. I 100% doubt it, though. If you had the initiative to find the number, you would have the initiative to find out where to announce it.