Multiplicative Persistence (extra footage) - Numberphile

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 392

  • @DavidSavinainen
    @DavidSavinainen 5 лет назад +965

    9999 has a Parker Persistence of 3?

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

      A parkersistence, perhaps?

    • @DavidSavinainen
      @DavidSavinainen 5 лет назад +69

      OrangeC7 parkerhaps

    • @bradburyrobinson
      @bradburyrobinson 5 лет назад +61

      @@DavidSavinainen:
      "Is three the correct answer?"
      "Parkerhaps..."

    • @fuseteam
      @fuseteam 5 лет назад +7

      Parker persistence of 4 :p

    • @SlimThrull
      @SlimThrull 5 лет назад +4

      It's even alliterative! This is fantastic!

  • @WIMMine
    @WIMMine 5 лет назад +187

    I will never get tired of hearing Matt Parker talk about maths.

  • @ConnPatMan009
    @ConnPatMan009 5 лет назад +89

    I love how every time he makes a mistake he puts the suggested link to the Parker Square.

  • @quartzofcourse
    @quartzofcourse 5 лет назад +363

    Suggested video: the Parker square

    • @firefish111
      @firefish111 5 лет назад +15

      That *_was_* the mascot

    • @wobblysauce
      @wobblysauce 5 лет назад +3

      It just rolls off the tongue so well.

    • @iski4317
      @iski4317 5 лет назад +1

      Every video is about a number tho

  • @michs342
    @michs342 5 лет назад +273

    So a Parker multiplication???

    • @bradburyrobinson
      @bradburyrobinson 5 лет назад +22

      Parkerplication.

    • @bradburyrobinson
      @bradburyrobinson 5 лет назад +30

      Parkerplication, a subset of Mattematics.

    • @Henrix1998
      @Henrix1998 5 лет назад +4

      More like Parker's persistence

    • @PhilBoswell
      @PhilBoswell 5 лет назад +5

      How about a Parker Product?

    •  5 лет назад

      The career change to comedy / outreach seems pretty committed, that's for sure.

  • @himanshumallick2269
    @himanshumallick2269 5 лет назад +237

    1:15 Matt wanted to say 'its all about the base'

  • @hansmntfr
    @hansmntfr 5 лет назад +13

    Fixed the recursion and put it in python 3.x if anybody is interested:
    def persistance(num, steps=0):
    if len(str(num)) == 1:
    return steps
    else:
    steps += 1
    digits = [int(i) for i in str(num)]
    result = 1
    for j in digits:
    result *= j
    return persistance(result, steps)

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

    When I watched the first video I thought about starting from down up, and then I got to the realization that you need to stop whenever you encounter a prime bigger than 10 (or, of course, bigger than 7). And then I saw this video where Matt told me exactly that, and it made me happy because I'm awful at math but I have it a go anyway, and I think he would be proud!

    • @KM-pm4vf
      @KM-pm4vf 3 года назад +1

      Well I'm proud of you, I mean I'm nobody of relevance in maths, but still. Proud of you Penguin.

  • @SmileyMPV
    @SmileyMPV 5 лет назад +66

    I have made a program to search for some numbers, and I am now almost certain that the conjecture is true.
    First observation was also made in the video. All prime factors of the digital root of any number are less than 10. So the only possible prime factors of a digital root are 2, 3, 5, and 7. Now comes the important corollary.
    If we have a number of multiplicative persistence n, then its digital root must have the following properties.
    1. It has multiplicative persistence n-1.
    2. The only prime divisors are 2, 3, 5, and 7.
    So the question becomes whether there exists a number of multiplicative persistence 11, for which the only prime divisors are 2, 3, 5, and 7. Since we require the multiplicative persistence to be greater than 1, in particular none of the digits of the number can be zero. So we can limit our search to numbers with the following properties.
    1. None of the digits are zero.
    2. The only prime divisors are 2, 3, 5, and 7.
    Let us call such numbers candidates.
    Here comes the punch line. The set of all candidates appears to be finite. I conjecture that 31262221321885653647626425815737111943458241183262682285162767533715254994149452428386848427865279586287233185834769954797571297422117699584, which factors into 2^25*3^227*7^28, is the largest candidate, which would mean there are 12614 candidates in total. The reason I so strongly believe this is that this number has 140 digits, and by exhaustive search I can conclude with certainty that there exist no larger candidates with at most 300 digits.
    Assuming my conjecture holds, the function f such that f(n) is the amount of numbers of multiplicative persistence n for which none of the digits are zero and the only prime divisors are 2, 3, 5, and 7 is well-defined. We can also calculate all of its non-zero values.
    f(0)=9
    f(1)=
    17
    f(2)=
    11997
    f(3)=
    388
    f(4)=
    134
    f(5)=
    40
    f(6)=
    12
    f(7)=
    8
    f(8)=
    5
    f(9)=
    2
    f(10)=2
    Here f(10) corresponds to the numbers 4996238671872 and 937638166841712. Note that the first of the two also appears in the video. Also, f(9) corresponds to the numbers 438939648 and 231928233984 and f(8) corresponds to the numbers 4478976, 784147392, 19421724672, 249143169618, and 717233481216.
    I want to finish off with a heuristic argument why, in every base, the set of candidates is probably finite. I start with the following observations.
    Let n and N be natural numbers. Then there are O(log_n(N)) numbers of the form n^k

    • @SmileyMPV
      @SmileyMPV 5 лет назад +20

      I have now optimized the search algorithm to find all candidates of at most d digits. It now requires O(d^4) time and O(d) space. It finds all candidates of at most 250 digits in 3 minutes on my laptop. I will leave it running over night to see what it can find.
      Do note that, if there are no new candidates of at most d digits, then there are no numbers of multiplicative persistence 12 of at most d*log(9)/log(10) digits. For example, since I already checked there are no new candidates of at most 300 digits, I know there are no numbers of multiplicative persistence 12 of at most 314 digits.

    • @emeraldelement5458
      @emeraldelement5458 5 лет назад +7

      I was fascinated by your work here so far. I found this on the OEIS and thought it might help you strengthen your conjecture:
      From David A. Corneth, Sep 23 2016: (Start)
      For n > 1, the digit 0 doesn't occur. Therefore the digit 1 doesn't occur and all terms have digits in nondecreasing order.
      a(n) consists of at most one three and at most one two but not both. If they contain both, they could be replaced with a single digit 6 giving a lesser number. Two threes can be replaced with a 9. Similarily, there's at most one four and one six but not both. Two sixes can be replaced with 49. A four and a six can be replaced with a three and an eight. For n > 2, an even number and a five don't occur together.
      Summarizing, a term a(n) for n > 2 consists of 7's, 8's and 9's with a prefix of one of the following sets of digits: {{}, {2}, {3}, {4}, {6}, {2,6}, {3,5}, {5, 5,...}} [Amended by Kohei Sakai, May 27 2017]
      No more up to 10^200. (End)
      From Benjamin Chaffin, Sep 29 2016: (Start)
      Let p(n) be the product of the digits of n, and P(n) be the multiplicative persistence of n. Any p(n) > 1 must have only prime factors from one of the two sets {2,3,7} or {3,5,7}.

    • @Eren-dq4uj
      @Eren-dq4uj 5 лет назад

      Can you send me the program?

    • @FeLiNe418
      @FeLiNe418 5 лет назад +3

      You should write a paper.

    • @wisnoskij
      @wisnoskij 4 года назад +4

      When you limit the size of the number, of course the candidates are going to be finite. What does not follow is, their will be no numbers of the form 2^a*3^b*5^c*7^d over 300 digits that do not include a zero. Their are clearly an infinite number of numbers without 0 in them, their are also clearly an infinite number of numbers with the factors 2, 3, 5, and 7. What has not been demonstrated is that these are distinct sets that have practically zero overlap.

  • @admiralbananas
    @admiralbananas 5 лет назад +6

    It's so comforting to me when "Suggested: The Parker Square" shows up in the top-right.

  • @Gotlyfe
    @Gotlyfe 5 лет назад +27

    I wrote up my code before watching this extra footage. Everything I thought I was clever for doing was mentioned in this video.

    • @mitchellsteindler
      @mitchellsteindler 5 лет назад +15

      Theres a general rule in the realm of making things: if you could figure it out quickly, it wasnt clever. Have found this out many times!

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

      @@mitchellsteindler A-yup. Me too. When I was 10 or 11 I was looking to generate the primes in order. So I just did a while loop and increased the number by 1 every iteration. Well! Being the smart kid I was I realized I didn't have to test any of the even numbers because none of them were prime (except of course). So I started incrementing by 2 instead! Oh and I only have to look for factors up to the square root of the number I'm looking I'm looking for! Ho, ho, ho! I'm so smart!
      Except, yeah, everyone already knew this.

    • @maxonmendel5757
      @maxonmendel5757 5 лет назад +1

      @@mitchellsteindler had never thought of it like that

    • @stigcc
      @stigcc 5 лет назад +1

      Mitchell Steindler Unless you are a genius, then the rule does not apply, I guess.

    • @Gotlyfe
      @Gotlyfe 5 лет назад +4

      Wait. So things aren't clever if you figure them out quickly?
      Just because other people have already figured something out, doesn't mean you're not clever when you figure it out for yourself.

  • @ed_halley
    @ed_halley 5 лет назад +10

    I did a bit of code for myself. First, the semi-naive approach you suggested. There are two kinds of numbers with a persistence of 11: those which have a digit product of 937638166841712 and those which have a digit product of your 4996238671872. I tried all possible numbers with between 0 and 250 copies of the digits 2, 3, 7 in ascending order, and there are only two such outcomes. Out of curiosity, I found that there are only nine different powers of 7 (tried everything up to 7^30000) which do NOT produce a zero in the product: 7^1, 7^2, 7^3, 7^6, 7^7, 7^11, 7^19, 7^35. Out of those, 7^35 and 7^19 have 5s and 8s/2s which will produce zeros on the next iteration. Similar patterns appear slower for 2^n and 3^n but they deplete very quickly.

    • @Pulsar77
      @Pulsar77 5 лет назад +3

      Yep, I had the same idea. This is what I found:
      Persistence of 6: 27648 = 2^10 * 3^3 * 7^0 (5 digits)
      Persistence of 6: 47628 = 2^2 * 3^5 * 7^2 (5 digits)
      Persistence of 6: 64827 = 2^0 * 3^3 * 7^4 (5 digits)
      Persistence of 6: 84672 = 2^6 * 3^3 * 7^2 (5 digits)
      Persistence of 6: 134217728 = 2^27 * 3^0 * 7^0 (9 digits)
      Persistence of 6: 914838624 = 2^5 * 3^5 * 7^6 (9 digits)
      Persistence of 6: 1792336896 = 2^10 * 3^6 * 7^4 (10 digits)
      Persistence of 6: 3699376128 = 2^23 * 3^2 * 7^2 (10 digits)
      Persistence of 6: 48814981614 = 2^1 * 3^20 * 7^1 (11 digits)
      Persistence of 6: 134481277728 = 2^5 * 3^6 * 7^8 (12 digits)
      Persistence of 6: 147483721728 = 2^16 * 3^8 * 7^3 (12 digits)
      Persistence of 6: 1438916737499136 = 2^24 * 3^6 * 7^6 (16 digits)
      Persistence of 7: 338688 = 2^8 * 3^3 * 7^2 (6 digits)
      Persistence of 7: 826686 = 2^1 * 3^10 * 7^1 (6 digits)
      Persistence of 7: 2239488 = 2^10 * 3^7 * 7^0 (7 digits)
      Persistence of 7: 3188646 = 2^1 * 3^13 * 7^0 (7 digits)
      Persistence of 7: 6613488 = 2^4 * 3^10 * 7^1 (7 digits)
      Persistence of 7: 14224896 = 2^9 * 3^4 * 7^3 (8 digits)
      Persistence of 7: 3416267673274176 = 2^6 * 3^27 * 7^1 (16 digits)
      Persistence of 7: 6499837226778624 = 2^24 * 3^18 * 7^0 (16 digits)
      Persistence of 8: 4478976 = 2^11 * 3^7 * 7^0 (7 digits)
      Persistence of 8: 784147392 = 2^6 * 3^6 * 7^5 (9 digits)
      Persistence of 8: 19421724672 = 2^21 * 3^3 * 7^3 (11 digits)
      Persistence of 8: 249143169618 = 2^1 * 3^2 * 7^12 (12 digits)
      Persistence of 8: 717233481216 = 2^9 * 3^5 * 7^8 (12 digits)
      Persistence of 9: 438939648 = 2^12 * 3^7 * 7^2 (9 digits)
      Persistence of 9: 231928233984 = 2^33 * 3^3 * 7^0 (12 digits)
      Persistence of 10: 4996238671872 = 2^19 * 3^4 * 7^6 (13 digits)
      Persistence of 10: 937638166841712 = 2^4 * 3^20 * 7^5 (15 digits)
      There are:
      139 numbers with persistence 4
      41 numbers with persistence 5
      12 numbers with persistence 6
      8 numbers with persistence 7
      5 numbers with persistence 8
      2 numbers with persistence 9
      2 numbers with persistence 10
      Given how low most exponents are, it's very likely that there aren't any more numbers than these.

  • @bruinflight
    @bruinflight 5 лет назад +10

    We need a programmingphile channel Brady! I loved this video for the coding!

  • @AbiGail-ok7fc
    @AbiGail-ok7fc 5 лет назад +20

    Numbers with a 5 in them don't have to generate numbers with a 0 in them, there must be an even digit as well. For instance, this chain has odd digits only: 3335 -> 135 -> 15 -> 5. I haven't found an example with a longer chain though.

    • @Morbacounet
      @Morbacounet 5 лет назад +1

      You can't have 5 and an even digit. It's easier to ignore 5.

    • @giadamoretti4819
      @giadamoretti4819 5 лет назад +7

      it's not only "5 and an even digit", you also have to make sure that all the other numbers you have don't give you an even number when you multiply them: 599 wouldn't work cause 9*9 =81 and 81*5=405
      so yes, i too think that not having a 5 makes it easier

    • @AbiGail-ok7fc
      @AbiGail-ok7fc 5 лет назад +1

      @@Morbacounet Can you if you want to prove their cannot be long chains starting off with a number containing a 5? It's clear it's very hard to find chains longer than 2 steps, but does that mean there aren't any?

    • @MrDannyDetail
      @MrDannyDetail 5 лет назад +6

      @@Morbacounet But might you be ignoring a rare set of numbers with one or more 5's, and no even digits, that actually turn out to have large number of steps?
      I can clearly see that ignoring any number that has a 5 and any even digit in it does make sense, but surely if there is no even digit in it then the presence of one or more 5's might not be a problem.

    • @Xnoob545
      @Xnoob545 4 года назад +1

      355

  • @shaikhmullah-ud-din1964
    @shaikhmullah-ud-din1964 5 лет назад +19

    6:11 and the Parker Square suggestion :p
    classical trolling!

  • @josephtixier2404
    @josephtixier2404 5 лет назад +45

    "i Suggestion: The Parker Square - Numberphile"... hahahahahaha

  • @deathpigeon2
    @deathpigeon2 5 лет назад +42

    277777788888899 has a prime factorization of 13*59*1699*213161503, which isn't ideal. It also doesn't matter where you put the 2 (so long as you keep the order of 7s, 8s, and 9s fixed), as all of them have at least one prime factor greater than 7. I had hope for 777777888888992 since it was divisible by 2^5, but the next smallest prime factor after 2 was 3457. (It's full prime factorization is 2^5*3457*23689*296797 which, again, is not ideal.)

    • @carltonleboss
      @carltonleboss 5 лет назад +3

      Nice

    • @eryksoowiej4427
      @eryksoowiej4427 5 лет назад +5

      Technicaly, for this purpose 2*7*7*7*7*7*7*8*8*8*8*8*8*9*9 is 2*7*7*7*7*7*7*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*3*3*3*3, soo... maybe this :27777772222222222222222223333 will be better.

    • @deathpigeon2
      @deathpigeon2 5 лет назад +4

      That will be exactly the same We need something which survives 12 steps and, because it's exactly the same, it will only last 11 steps. Factoring is important because, if you can find an 11 step number with only single digit prime factors, you'd be able to construct a 12 step number. @@eryksoowiej4427

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

      @@deathpigeon2 It's prime factors won't be exactly the same though.

    • @eryksoowiej4427
      @eryksoowiej4427 5 лет назад +1

      Xeridanus exactly what I ment.

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

    0:23 “You know that could be a fun project, who knows maybe I’ll find it. 233 digits is huge but not impossible to work with”… sees the video is 4 years old… looks it up sees they’ve now checked to 20,000 digits… “yeah maybe I’ll let the people with more computing power than my laptop keep looking”

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

    Brilliant book plug, honestly 😂

  • @toppertechie
    @toppertechie 5 лет назад +52

    Shouldn't have used the Gaxio, Matt...

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

    The "Parkersistence sequence": Take some number n, add up all the digits, and then follow the persistence pattern from before.

    • @MrRyanroberson1
      @MrRyanroberson1 5 лет назад +5

      In that respect I have found a number with parkersistence 12: (10^30864198765433 -1) * 10 + 2 (just 30864198765433 nines and then a two)

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

    I think you already have the mascot for a 'Parker Square' moment: that plane on the front of his book. I can't think of a better one, as not only is it quite fitting, it'll also make sense to people who don't know what -- or have never heard of -- the 'Parker Square'. And I think Matt will approve of the use of the 'airplane' over the 'Parker Square'.

  • @dard4716
    @dard4716 5 лет назад +3

    wrote a little python which does the naive brute force search of the other bases. checked numbers 1 to 100 million:
    Base - Persistence - Number
    2, 1, 10
    3, 3 , 222
    4, 3, 333
    5, 4, 33334
    6, 5 , 24445
    7, 7 , 5555555
    8, 6, 333555577
    9, 7, 2577777
    almost linear, but a small sample size
    def dig_prod(num, base=3):
    """Accepts and returns base 10 number, converts number into target base
    and multiplies all digits together."""
    import numpy as np
    return np.product([int(x) for x in np.base_repr(num, base)])

  • @JohnMichaelson
    @JohnMichaelson 5 лет назад +2

    Matt and James Grime need to do some kind of collaboration vid if their schedules ever allowed it. It would be so cool to have my two favorite Numberphile guests in the same vid.

  • @TheSkepticSkwerl
    @TheSkepticSkwerl 3 года назад +5

    I had a feeling its base. So I made this in python with base8 (oct) and base16(hex) and base 8 seems to have maxed at 6 steps. but oddly, unexpectedly, base16 (hex) has seemed to have capped at 8. why 8?

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

    Instead of adding line 7 (steps += 1) I would suggest to change the recursive call to per(result, steps + 1). Same result, but somewhat cleaner.

  • @robo3007
    @robo3007 5 лет назад +7

    Next I think Matt should cover the Parker factorials. 1, 3, 6, 10, 15, 21...

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

      The triangle numbers!

  • @szilardecsenyi516
    @szilardecsenyi516 4 года назад +1

    There are probably indeed numbers with properties in every number system that can be converted to single digits in maximum steps. In the triple number system, for example, 222, in the quadruple number system, 333. These are usually easier to explain heuristically.

  • @TheSameDonkey
    @TheSameDonkey 5 лет назад +5

    Thing about prime factors of the number is you can always stick a bunch of ones in it until you find one that does have only 2s 3s and 7s as prime factors. It probably makes more sense to do it the other way around when coding it I.e. generate numbers by multiplying 2s 3s and 7s.

  • @janApen
    @janApen 5 лет назад +3

    This will be the first challenge of my mathematical career!

  • @ceruchi2084
    @ceruchi2084 5 лет назад +1

    Loved how it was still three steps!

  • @hebl47
    @hebl47 5 лет назад +3

    It might be a Parker multiplication, but that was no Parker segue. Because that way the perfect transition into the book ad.

  • @chukwa7862
    @chukwa7862 2 года назад +1

    "One day, we will have a mascot for such moments!"
    More from Numberphile: The Parker Square

  • @Tinker_it
    @Tinker_it 5 лет назад +2

    Well plugged book spot

  • @marbleswan6664
    @marbleswan6664 5 лет назад +1

    Im going to overgeneralize an overgeneralized generalization:
    In the iterative multiplication of the digits of any whole positive integer N, the limit of the persistence of that number N will equal the base (B+1)
    As long as that base is equal to or greater than 10.
    So P(N)=(B>=10)+1
    But since I havent checked above 10 either, so P(N)=(B=10)+1
    Thanks for coming to my retarTED talk.

  • @skyrider8890
    @skyrider8890 5 лет назад +2

    A classic Parker Square!

  • @mathedson
    @mathedson 4 года назад

    Despite being a recreational problem, there is some interesting math behind the multiplicative persistence problem, including connections with objects akin to cellular automata. For those interested in the problem, I suggest reading the paper "On Sloane's persistence problem", Experimental Math vol 23 (2014), 363--382.
    There one will find more computational evidence, and results for arbitrary bases.

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

    I think I know of a shortcut. Basically take any of the 11-step numbers, and take all the prime factors. If any of the prime factors are double-digit, move on. Because any 12-step number, well after the first step, you'd get an 11-step number. So any 12-step numbers could be found from the 11-step numbers. Seems more efficient to take a bottom-up instead of top-down approach.
    Edit: Just noticed, he mentioned this in the video.

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

    These videos are glorious.

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

    to remove the seccond print of the last number, just replace it with printing the steps instad of adding another print line.
    I saved me the code as a textfile, so i always can play around with it, using my python software.

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

    Growing them up sounds like a great idea!

  • @RunstarHomer
    @RunstarHomer 5 лет назад +7

    1:28 "there's a conjecture that all base 3 numbers above a certain size have a 0 in them."
    Is this what he meant to say? That can't possibly be true

    • @tomsmith6878
      @tomsmith6878 5 лет назад +1

      111111111111... is infinitely big and has no 0 in it. You are right. However, I have no idea what he meant to say.

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

      Not sure, but it might be hinting at this April Fool's vid they did 7 years ago.
      ruclips.net/video/UfEiJJGv4CE/видео.html

    • @SmileyMPV
      @SmileyMPV 5 лет назад +4

      He meant to say that all powers of two above a certain size (2^15) are conjectured to have a zero in their ternary representation.

    • @user-ow1bc4sx2r
      @user-ow1bc4sx2r 3 года назад +1

      the smallest base 3 number of a given persistence would have to be made entirely of 2s. This makes sense: we only have 0,1,2 to work with in base 3, and any digit being 0 would make the persistence 1, and any digit being 1 wouldn’t change the persistence.
      So in base 3, all numbers that we need to check would contain only 2s. That means the resulting number would be a power of 2, represented in trinary. The conjecture is that all powers of two above a certain size contain a 0, so that wipes it out. So he’s saying in shorthand that all trinary numbers worth checking above a certain size have a zero in their first step, which makes them all have persistence of 2.

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

    f we cross out from set of positive integers all numbers divisible by 2 and all numbers divisible by 3 then
    all remaining numbers (including remaining composite numbers and ALL prime numbers) will be in one of two forms 6k-1 or 6k+1, so it's not suprising that every prime plus or minus 1 is divisible by 6

  • @AerosfilisOfficial
    @AerosfilisOfficial 5 лет назад +5

    When you watch such video throwing a challenge at you but it's 2 am
    Welp, I guess sleep will wait

    • @sirynka
      @sirynka 5 лет назад +1

      How do you leave a comment 2 days ago if video was upload few minutes ago?

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

    Did some research myself. generating numbers starting with 1 and then multiplying by digits 2..9 until a 0 appears in the number. This stops quite fast. 4996238671872 (first multiplication of the digits of 277777788888899) being part of this set. Total set size is just 2584 items. If I did things right the only possible way to find a number with more than 11 steps is one that is huge does 12 or more steps and then drops down to 0.

  • @StephenFarthing
    @StephenFarthing 5 лет назад +2

    I bought the book in Budapest!

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

    0:47 That's because any programming language compiler is defined in a way that the type Number has a specific range.
    I'm not a Python programmer, but I know that in JavaScript, Java, and C# it's like that.
    In JavaScript, you simply have a type "number", which has a fixed range.
    In Java, there are some types of numbers, including byte, int and long.
    In C#, there are tons and tons of types of numbers.
    However, in Java and C#, you can use a library, BigInteger or BigDecimal, which basically tell the compiler to remove the regular range, and instead hand it over directly to the RAM, so the more RAM you have - the bigger numbers you can use while maintaining is the accuracy.
    I imagine it's the same with Python's "numpy".
    In JavaScript, there are plenty of big number libraries you can use.
    However, in V8 engine (Node.js, Chromium, Chrome), a new type of number has been added - BigInt. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
    This means that you don't even need a special library when dealing with numbers, as you can directly do it in the browser, as long as you have enough RAM.

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

    This is the 5000th vid I've Liked!

  • @sinom
    @sinom 5 лет назад +2

    Beautiful thumbnail.

  • @JxH
    @JxH 5 лет назад +1

    @1m35s: "...all base 3 numbers above a certain size have a zero in them..."
    Counter example: 222......222(base 3) where the length is just above "a certain size". I have other counter examples if required.

    • @MrDannyDetail
      @MrDannyDetail 5 лет назад +2

      I thought that at first, since he didn't really explain that, but I think what he meant was that once the length is 'above a certain size' then all base 3 numbers will, when their digit are multiplied together, create a second number with at least one zero it in, which dooms them to be a 2 step number, since they go to 0 in the second step.

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

    You only have to check numbers of the primes 2,3, and 7.
    So 2^x * 3 ^ y * 7 * z with x, y, and z in a sufficiently small range like 0 to 54 will produce all possible results.
    The only two largest numbers I could find this way were:
    937638166841712 and 4996238671872. Both take 10 iterations to complete.
    937638166841712 is the largest of those two. 2^54 is larger than this. Therefore if there would be any number whose digits multiply to that number it should be smaller than 2^54.
    Unfortunately, there are none that do.

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

    As far as trying to work backward from N = 277777788888899, remember that in trying to find a number that will produce N on its first step, any permutation of its digits will do just as well as N itself, because after N, the sequence will carry on exactly as with N in that place.
    So you have to factor all those (digit-permuted) possibilities, to find one or more that factor completely in single-digit factors.
    There are 15!/(2!·6!²) = 1,261,260 such permutations.
    Incidentally, the prime factors of N are:
    277777788888899 = 13·59·1699·213161503
    Fred

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

      There are more possible permutations, because you can break up the 8's and 9's into combinations of 2's, 3's, 4's and 6's. On top of that, you can insert an arbitrary number of 1's at any position.

  • @sinom
    @sinom 5 лет назад +4

    Instead of adding a new parameter you could have just always returned one more. So:
    return per(result) + 1
    And in the beginning instead of returning done, which is pretty much useless instead return 1 (or 0 whichever is the correct one)

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

      Or do per(n,steps+1)

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

      @@killereks The recursion is already "counting" how many times the persistence happens, @Sinom is just suggesting getting the function to accumulate and report that count when it returns back up the chain.
      What you're suggesting is just another form of what Matt already did, which is getting each recurrence of the function to calculate an extra step, and then printing it out at the base case before the returns happen. And again, they'll happen regardless; passing that parameter is missing an opportunity to make the code more efficient.
      This sort of thing can actually matter in larger programs, so programmers often try to think about things this way.

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

      @@KyleJMitchell i know what sinom suggested but i think Matt's way is more readable

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

      @@killereks if you program using functional paradigm, sure
      otherwise, it is just a way of showing you would rather write a loop than a recursion
      no problem doing that either, but the recursive way is as sinom suggested for its mathematical iterative numerical method's resemblance

    • @killereks
      @killereks 5 лет назад +1

      @@RadeticDaniel using recursion you might run into an overflow which is annoying

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

    Looking at base 3 it's obvious the only numbers we care about are ones where all digits are 2 because 0 results in failure and 1 does nothing. This means we only need to find the numbers which are powers of 2 that have no 0's written in base 3. The numbers I found currently are
    2 (2), 4 (11), 8 (22), 16 (121), and 32,768 (1,122,221,122)
    I have not coded this, I checked every number up to 2^30 by calculator. 8 (22) is particularly interesting as it is the only time (to my knowledge) where a number containing only 2's will itself be a power of 2. This is because number containing only 2's can be written as (3^x)-1 where x is the number of 2's. Every number containing all 2's will immediately be followed by the introduction of a new place value which in base 3 is a power of 3. This also gives 222 the largest multiplicative persistence I could find.
    26 (222) -> 8 (22) -> 4 (11) -> 1 (1).
    Base 4 is a really similar problem, the only numbers we care about are ones that only contain 3's or contain 3's and exactly one 2. Any number with more than one 2 becomes a factor of 4 when multiplied and every factor of 4 in base 4 ends in a 0. Thus we only care about numbers which are powers of 3 and powers of 3 doubled that also have no 0's. I found [by hand]
    6 (12), 9 (21), and 27 (123)
    With 63 (333) having the largest persistence I could find
    63 (333) -> 27 (123) -> 6 (12) -> 2 (2)

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

    I love the room you guys are in. Is that an apartment or a college maths closet? Love the aesthetic.

  • @MCLegoboy
    @MCLegoboy 5 лет назад +5

    9999 > 36 > 18 > 0
    9999 > 6561> 180 > 0
    Miraculously though, it's still the same number of steps, and the second step is only off by a factor of 10. That's kind of neat.

    • @supermarc
      @supermarc 5 лет назад +2

      1*8=8 though, not 0

    • @MCLegoboy
      @MCLegoboy 5 лет назад +1

      @@supermarc Uuuuuh
      ruclips.net/video/PTAXUYLbFYk/видео.html

  • @Jiggerjaw
    @Jiggerjaw 5 лет назад +22

    I picked 3339933399, I think it was 4 steps. I was disappointed until I saw just how hard it is to get over 2.

    • @rogerdotlee
      @rogerdotlee 5 лет назад +1

      My version shows that has 5 steps:
      per(3339933399,0)
      4782969
      217728
      1568
      240
      0
      0
      Total Steps: 5

    • @nbrs6121
      @nbrs6121 5 лет назад +7

      Additionally, 9,999,999 gives an identical result at 7 digits instead of 10.

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

      @@rogerdotlee I think you mean 999,999 (six digits). 9,999,999 is only three steps.

    • @fuseteam
      @fuseteam 5 лет назад +2

      @@rogerdotlee remove the "print n" under the if lol

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

    *Classiiiiiic* Parker square!

  • @LifeAsANoun
    @LifeAsANoun 5 лет назад +2

    I hate when vid makers take out the math, or the science, or the supposedly tough brain work. Thank you for making a workaround for keeping the original vid watchable by the plebs, while letting the nerds nerd on.

  • @happypiano4810
    @happypiano4810 4 года назад

    Put this in computer language
    Start with 1
    Find a number whose digits multiply to equal 1
    If the number is prime, reject it
    If the number is composite, search for a lower composite number.
    If every number less than 64 digits is prime, start with 2, then 3, then 4, etc...
    When a number has a multiplicative persistence of 12 or more, stop, and show the number.
    That is how I’d search for it.

  • @TheRMeerkerk
    @TheRMeerkerk 5 лет назад +1

    Is there a math theorem about prime factorizing numbers after adding certain digits to them? For example, if we add a a couple of 1's to 277777788888899, could it eventually become a number that can be prime factorized by 2's, 3's, 5's, and 7's?

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

      Okay, just as I posted it, I realized that 2 and 5 are impossible, since we can check the last digit. To become divisible by at least one 3 you'd have to add 1+3x ones. That means that for all other cases, you need to get a number that is equal to 7^n. My suspicion is that this trick won't work, but other modifications might still work. If I move the 2 to the back I at least get a number that is divisible by 2.

  • @Henrix1998
    @Henrix1998 5 лет назад +4

    If you ever want to search for longest result, write the code in C or even assembly, the code won't be too long and it will run orders of magnitude faster than python

    • @nowonmetube
      @nowonmetube 5 лет назад +3

      It's takes more time to learn C first 😂

    • @0LoneTech
      @0LoneTech 5 лет назад +6

      Python has big integers, and Pypy can compile it. C or assembler don't, so you'll be calling an arbitrary precision library like gmp, and the difference becomes insignificant after you hit big numbers. Close to metal isn't magic.
      That said, try Julia or Haskell. And for a task like this, maybe Decimal instead of Integer.

    • @0LoneTech
      @0LoneTech 5 лет назад +1

      @@00O3O1B If you're doing that level of assembly work (I have), the answer is typically get a bigger microcontroller or stop toying with the CPU and use the GPU already. Which can be eased greatly with e.g. Clyther or OpenAcc.
      Searches like these are embarassingly parallel so distributing it easy, and offers gains in thousands compared to cpu fiddling often 2-5x. Algorithmic work is often more significant still.

    • @rasowa2958
      @rasowa2958 5 лет назад +1

      Yes. I wrote my code for this in C, but I had to operate on arrays of integers that represented base-million digits (like digit[2] = 277; digit[1] = 777788; digit[0] = 888899;)
      I also reduced search space as Matt described in main video, and with other optimizations it allowed me to search all numbers up to 300 decimal digits within about 15 minutes.
      Spoiler: my conclusion was that searching further is a waste of time.

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

    I'm still game to find the biggest number.

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

    And one more before I shut up and move on:
    per(24964)
    1728
    112
    2
    2
    Total Steps: 3
    per(4964)
    864
    192
    18
    8
    8
    Total Steps: 4
    per(27788)
    6272
    168
    48
    32
    6
    6
    (wow. This is fun!)

  • @AbiGail-ok7fc
    @AbiGail-ok7fc 5 лет назад +3

    277777788888899 doesn't have any single digit prime factors, so it can't be part of any chain of length 12 or more. Only numbers of the form 2^n * 3^m * 7^p can be the second number of any chain of length > 3.

    • @Kieza12
      @Kieza12 5 лет назад +1

      You can also have 3^m * 5^q * 7^p, just never 2's and 5's together (though these numbers are unlikely to be the smallest since they don't lead with a 2)
      Eg:
      355
      75
      35
      15
      5

    • @MEver316
      @MEver316 5 лет назад +2

      We need to remember though that it isn't that number... It's those digits. The only reason is arranged that order is because they're looking for the smallest one. 998888887777772 is just as valid as a choice of a number with a persistence of 11 but it's much bigger. Is there a way of rearranging 277777788888899 to give us a number of the form you mentioned? I suspect not but it's worth investigating...

    • @AbiGail-ok7fc
      @AbiGail-ok7fc 5 лет назад +1

      @@MEver316 It's not, but I wasn't claiming that. However, if you multiply the digits of 277777788888899 together, you get 2^19 * 3^4 * 7^6, which is the second number of a chain. Given a number of the form 2^n * 3^m * 7^p which forms a long chain, it's easy to find the smallest number which reduces to that. Every number in a chain which *did not start the chain* will be the product of only single digit primes.

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

      @@MEver316
      You can not only rearrange the digits but also replace any 8 with 222 or 24, any 9 with 33, any 23 with 6 etc. and you can inject any number of 1s.

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

      So, to have a p12 (number with persistence 12)
      you need a p11 (number with persistence 11)
      that is the product of powers of 2, 3 and 7 (or 3, 5 and 7).
      Those can be easily tested with 3 nested "for" loops, using n*m*p steps.
      For n, m and p up to 300 only the following 2 numbers have persistence 10:
      4996238671872 = 2^19 * 3^4 * 7^6
      937638166841712 = 2^4 * 3^20 * 7^5
      2^19 * 3^4 * 7^6 can be changed to 2^1 * 8^6 * 9^2 * 7^6
      and those numbers are used in 277,777,788,888,899

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

    I think we will find numbers with multiplicative persistance of 12,13, even a million, billion, googol, etc but we will end up getting in the zone of unimaginably large numbers like Graham's number, TREE(3), etc
    Wikipedia says we have searched till 10^20000, but 10^20000 is nothing compared to infinity so those numbers with multiplicative persistances of 12,13,1000000,1000000000,10^100, etc will be unimaginably large but still finite

  • @scottbigbrain3944
    @scottbigbrain3944 4 года назад +1

    I tied the number on the fronts of digits and persistence with 466,777,777,888,889.

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

    I see Matt is already working on his 2nd book in the Humble Pi series of math bloopers.

  • @DominusTerrae
    @DominusTerrae 5 лет назад +1

    The growing up works, but you need to consider every permutation of the numbers along the way

  • @koflerkohime2981
    @koflerkohime2981 5 лет назад +1

    Unfortunately, the number 277777788888899 has prime factors 13, 59, 1699, and 213161503. I guess this means, that one can never express that number as a multiplication of digits because of the massive prime factor? For instance, 4996238671872 (the next number), has multiple single-digit prime factors 2^19, 3^4, 7^6.

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

      This would not be such a problem - 277777788888899 having big prime factors - because this is not the only one number, holding a record now, it is the smallest one. What about 271111774928738118871178132? It is practically the same as 277777788888899, it only has a bunch of 1's, placed anywhere, and some of other digits are presented in their factored form - for example, here one of two 9's appears as 3*3 and one of six 8's - as 2*4.
      Obviously one can generate infinitely many numbers of this kind. The hard part is to prove that none of them has progenitor, represented in form Pr = 2^i * 3^j * 7^k.

  • @Jona69
    @Jona69 5 лет назад +1

    I love Matt

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

    I bought the Audible version of the book!

  • @colinstu
    @colinstu 5 лет назад +2

    "Let's just spontaneously fix that in the edit" lol

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

    whats the smallest number with the most multiplications before you reach 0-9?

  • @sakkikoyumikishi
    @sakkikoyumikishi 4 года назад

    I'm guessing 77 would be one of the better ones with merely two didgits, right?
    77 -> 49
    49 -> 36
    36 -> 18
    18 -> 8
    for a total of four steps. I don't imagine you'll easily get a persistence of more than twice the number of digits.

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

    Matt mentioned a theorem that all base 3 numbers after a certain point have a 0 in them. This is demonstrably untrue.
    He might have been referring to the theorum that all base 3 powers of 2 have a zero in them, however, and I'm less certain of that one

  • @TheRedCyndaquil
    @TheRedCyndaquil 5 лет назад +1

    5:38 The Parker Silence...

  • @vilmabostrom2
    @vilmabostrom2 5 лет назад +5

    I picked 47, it had three steps

    • @Xeridanus
      @Xeridanus 5 лет назад +2

      Not bad! According to the other video, 39 is the smallest. (I had to go back and check)

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

    There seem to be 2 different versions of this program, one which prints the number of passes and one that does not. The call to the first one is per(nnn) where nnn is the number to be tested.. This version does not compute and/or print the number of passes. Please tell me the call to version that computes and prints the number of passes. The Def statement shows 2 parameters. What are the corresponding parameters in the version that computed the number of passes.

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

    Is there a record for additive persistence? You know, like Multiplicative persistence but adding all the digits instead of multiplying them? Or is it too easy to increase the additive persistence by adding a digit?

  • @DeathBringer769
    @DeathBringer769 5 лет назад +1

    Classic Parker Square

  • @kerblo
    @kerblo 5 лет назад +1

    To find a number with 12 steps why notfind a number where the product of the digits equals 22777788899?

    • @theMysterieX
      @theMysterieX 5 лет назад +1

      As others have pointed out, 277777788888899 has a prime factorization which includes primes bigger than 7 and thus cant be the result of multiplying any digits together

  • @ahmedshaikha8938
    @ahmedshaikha8938 5 лет назад +2

    For anyone doing upward propagation, there are 1261260 numbers to check

  • @elementalsheep2672
    @elementalsheep2672 5 лет назад +1

    The prime factorisation of 277777788888899 is 13 × 59 × 1699 × 213161503.
    So no, you can't get any higher with that number.

  • @hgjfkd12345
    @hgjfkd12345 5 лет назад +20

    I always pronounced numpy as "num-pee" because it sounds funny, like lumpy

    • @nowonmetube
      @nowonmetube 5 лет назад +2

      You like pee? I like pie

    • @hgjfkd12345
      @hgjfkd12345 5 лет назад +1

      @@00O3O1B I'm aware what it's SUPPOSED to be and why, I just like mine better

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

    Even though 277777788888899 has factors all over the place if we were to rewrite it as some other number which would give the same output then this yields a supply of infinitely many numbers which create 11-chains such as M=71128736271174148461161171722, f(M)=f(277777788888899) and then try to make a number M=2^a*3^b*7^c, thus there exist X such that f(X)=M which would be the twelfth step. I feel this is a better approach, maybe

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

      The code might be something along the lines of a number M of the form 2^a*3^b*7^c where f(M)=4996239671872 which was the second number in the '11-chain' OR f(M) being some other second term of another 11-chain

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

    If you want it to stop printing the last number twice, near the beginning of the code, print n only if steps == 0.

  • @megaexplosions
    @megaexplosions 4 года назад

    He's gone and Parkered it!

  • @johni0018
    @johni0018 5 лет назад +2

    Was this video reuploaded 3 days after it was originally uploaded?

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

      Maybe patreon something something? Often I notice videos in this channel are unlisted

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

      @@alicewyan It can't be that. This video was uploaded to youtube 3 days ago. I saw it myself.

  • @brycerosenwald2915
    @brycerosenwald2915 4 года назад

    1:30 "There's a conjecture that all base three numbers above a certain size have a zero in them." - umm, what?? What about a string of twos? Or am I misunderstanding this.

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

    Its not that there is no number, the conjecture is that is smaller than 10^233 that has a persistence of 12.

  • @Yakoable
    @Yakoable 5 лет назад +1

    I wonder, however: since it is base-dependant, what is the point of it all? I mean, is looking into base-dependant stuff a legitimate research field? It's an honest question, I wouldn't be that surprised if there were extremely useful insights to be gained by doing it. Any applications I should know about?

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

      It's not always about the result, but about the methods used to reach the answer.

    • @mathedson
      @mathedson 4 года назад

      Despite being a recreational problem, there is some interesting math behind it, including connections with objects akin to cellular automata. I suggest you look at the paper "On Sloane's persistence problem", Experimental Math vol 23 (2014), 363--382.

  • @DarqIce
    @DarqIce 5 лет назад +1

    Could you not take this maximum number (2777....) and try carefully adding single digits to see if you can get away with more than 11 steps? Obviously whatever number with 12 more steps would be larger than the current record holder?

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

    5 is ONLY a bad number if you've got even numbers within the number.
    57 gives you three steps!
    57
    5 * 7 = 35
    3 * 5 = 15
    1 * 5 = 5

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

    Haven't read the book yet. Was there actually an incident where wings were put on an airplane backwards?

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

      OMG I've seen the cover of that book loads of times on his videos etc, and never twigged that there was anything out of the ordinary about that plane!
      I guess if we're all at an airport, and for some reason they let a volunteer chose which plane we all fly on, then make sure I don't volunteer lol. I'd have us arriving at our destination by the little tried method of flying backwards away from it until we had gone so far around the world that we would arrive at it from the opposite direction to expected!(Or I guess we could face away from it and reverse towards it, but still.....).

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

    How could you work backwards from 8 to that larger number?

  • @OceanBagel
    @OceanBagel 5 лет назад +1

    I guess I'll give it the old Parker try.

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

    He didn't even remove the double print when he went back and added the total steps
    I'm not mad, just disappointed.

  • @raydarable
    @raydarable 5 лет назад +3

    Was the book supposed to flicker or was that intentional?

    • @MrDannyDetail
      @MrDannyDetail 5 лет назад +1

      Aren't both of those options the same?

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

      @@MrDannyDetail Yes, I was half asleep when I typed that.

    • @PopeGoliath
      @PopeGoliath 5 лет назад +1

      @@raydarable it was a real Parker Comment.

  • @ABM_GD
    @ABM_GD 4 года назад

    What program did he use to type the code on?