Witness Numbers (and the truthful 1,662,803) - Numberphile

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2021
  • Featuring Matt Parker - more Parker links below.
    Check out Brilliant (get 20% off their premium service): brilliant.org/numberphile (sponsor)
    More links & stuff in full description below ↓↓↓
    MATT PARKER STUFF
    Stand-Ups Maths on TH-cam: / standupmaths
    Matt's website: standupmaths.com
    Matt's Books (Amazon): amzn.to/3absFfV
    Matt's playlist on Numberphile: bit.ly/Matt_Videos
    Parker Square Merch: numberphile.creator-spring.co...
    Numberphile is supported by the Mathematical Sciences Research Institute (MSRI): bit.ly/MSRINumberphile
    We are also supported by Science Sandbox, a Simons Foundation initiative dedicated to engaging everyone with the process of science. www.simonsfoundation.org/outr...
    And support from the Akamai Foundation: www.akamai.com/company/corpor...
    NUMBERPHILE
    Website: www.numberphile.com/
    Numberphile on Facebook: / numberphile
    Numberphile tweets: / numberphile
    Subscribe: bit.ly/Numberphile_Sub
    Videos by Brady Haran
    Patreon: / numberphile
    Numberphile T-Shirts and Merch: teespring.com/stores/numberphile
    Brady's videos subreddit: / bradyharan
    Brady's latest videos across all channels: www.bradyharanblog.com/
    Sign up for (occasional) emails: eepurl.com/YdjL9
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 979

  • @TheJVBlackbelt
    @TheJVBlackbelt 2 ปีที่แล้ว +1179

    "Well I happen to know, below 91 there are 90 numbers"
    The things I learn from Numberphile are priceless.

    • @raphaelschmitz-dumont4426
      @raphaelschmitz-dumont4426 2 ปีที่แล้ว +48

      *negative numbers and zero*: "Are we a joke to you?"

    • @OrangeC7
      @OrangeC7 2 ปีที่แล้ว +35

      @@raphaelschmitz-dumont4426 The rationals: "Are we a joke to you?"

    • @timallgood4108
      @timallgood4108 2 ปีที่แล้ว +34

      @@OrangeC7 The irrationals: "Are we a joke to you?"

    • @Ludwig-MariaAKern-yz2vs
      @Ludwig-MariaAKern-yz2vs 2 ปีที่แล้ว +28

      @@timallgood4108 the complex:" hey look over there!"

    • @theantimatter
      @theantimatter 2 ปีที่แล้ว +27

      @@Ludwig-MariaAKern-yz2vs unfortunately, the complex are neither below nor over 90, afaik.

  • @RibusPQR
    @RibusPQR 2 ปีที่แล้ว +1557

    You need a full jury to conclude a number is a prime, whereas even just one dissenter will show the number is composite. This implies that primes are guilty and composites are innocent. This makes sense, because we usually assume numbers are composite until proven prime.

    • @451Duke
      @451Duke 2 ปีที่แล้ว +72

      Elegant.

    • @vigilantcosmicpenguin8721
      @vigilantcosmicpenguin8721 2 ปีที่แล้ว +179

      But the star witnesses you have to call in are the most notorious primes. It takes a hardened criminal to rat out their fellow criminals.

    • @ivarangquist9184
      @ivarangquist9184 2 ปีที่แล้ว +32

      You forgot to mention how ugly prime numbers are. We all know that 13 and 17 cannot even compare with the beauty and structure such as 36 and 100. The worst are those large primes like 101 or 83. WHY CAN'T THEY GROW UP LIKE EVERYONE ELSE? THEY LACK SOPHISTICATION AND ARE A SHAME TO THIS WORLD. AND DON'T CLAIM IT'S BECAUSE OF THE WAY THEY ARE TREATED. IT'S THE NATURE OF THEIR EXISTENCE THAT IS THE PROBLEM. WHY ARE THEY CALLED PRIME WHEN THEY ARE USELESS, SINFUL REINCARNATIONS OF THE DEVIL HIMSELF.

    • @nicholasleclerc1583
      @nicholasleclerc1583 2 ปีที่แล้ว +52

      @@ivarangquist9184
      I see that the spirit of Pythagoras lives well & strong inside you, my child

    • @xCorvus7x
      @xCorvus7x 2 ปีที่แล้ว +26

      @@ivarangquist9184 True mathematical beauty lies in the primes.
      Any composite order you cherish seems boring and daft in comparison to the primes' unruly yet reliable nature.

  • @mlcastle
    @mlcastle 2 ปีที่แล้ว +2298

    I first learned about this when I took a class taught by Prof. Rabin, who called it the "randomized primality test" because he was too humble to tell us it was named after him, which made it a bit hard to find references to what he was talking about in our textbook or online

    • @aleksapetrovic7088
      @aleksapetrovic7088 2 ปีที่แล้ว +90

      Thats cool

    • @truebark3329
      @truebark3329 2 ปีที่แล้ว +97

      That is COOOOOOOOOLLLL

    • @JLo_24
      @JLo_24 2 ปีที่แล้ว +64

      Taught by the one who made it XD

    • @will1603
      @will1603 2 ปีที่แล้ว +23

      I love how in america you can just choose to take a class. One of the few things from America id like in theuk

    • @mlcastle
      @mlcastle 2 ปีที่แล้ว +54

      @@will1603 i mean it was a class taught in my school's CS department while i was working towards a CS degree there. maybe math students or something would've also been welcome (i don't remember, it was a long time ago), but it wasn't like totally something completely, um, randomized

  • @malice1105
    @malice1105 2 ปีที่แล้ว +1185

    There is a lot of character in this video, well done to both of you.

    • @toolebukk
      @toolebukk 2 ปีที่แล้ว +11

      New to numberphile, eh? 😄

    • @vigilantcosmicpenguin8721
      @vigilantcosmicpenguin8721 2 ปีที่แล้ว +5

      Yeah, really made me invested in the plot of this crime drama.

    • @antonhengst8667
      @antonhengst8667 2 ปีที่แล้ว +9

      welcome to the wonderful world of matt parker

    • @proloycodes
      @proloycodes 2 ปีที่แล้ว +2

      @@toolebukk he is punning around...

    • @WakdominelwanNelwanWdm
      @WakdominelwanNelwanWdm 2 ปีที่แล้ว +1

      @@katowo6521 berbahasa indonesia

  • @NardiPaffon
    @NardiPaffon 2 ปีที่แล้ว +154

    55,648 is the 50,000th composite number.
    I ran the script for each number between 2 to 55,648. Runtime: ~27 minutes on my machine.
    The numbers which turned up to be false-witnesses the most times were:
    (The number, how many times found lying)
    (2401, 183)
    (625, 182)
    (6561, 173)
    (529, 166)
    (81, 164)
    (729, 152)
    (4096, 149)
    (4225, 126)
    (3481, 125)
    (256, 123)
    Nice to see that these biggest liars are all (almost) powers of primes:
    2401 =7 ^ 4
    625 =5 ^ 4
    6561 =3 ^ 8
    529 =23 ^ 2
    81 =3 ^ 4
    729 =3 ^ 6
    4096 =2 ^ 12
    4225 =65 ^ 2

    • @ytkerfuffles6429
      @ytkerfuffles6429 ปีที่แล้ว +12

      thats so cool. i wonder why that is.

    • @talastra
      @talastra 6 หลายเดือนก่อน +13

      They are all perfect squares: 49^2, 25^2, 81^2, 23^2, 9^2, 27^2, 64^2, 65^2, 59^2, 16^2 ... also, taking powers of 4 rather than perfect squares, there is 3,4,5,7,8,9 (6 is missing; did 1296 not quite make the cut)? Meanwhile, 23, 59 and 65 seem quite random relative to the others. If I was to try to screw around with it, I would notice that 65 is 23*3-1, I would note that 59 = 23 + 36, and 65 = 23 + 42. I'm not sure this would get me anywhere :)

    • @ensiehsafary7633
      @ensiehsafary7633 4 หลายเดือนก่อน +1

      How you did the test with an even number

    • @therealelement75
      @therealelement75 หลายเดือนก่อน

      ​@@talastra welp guess I'm not trusting squares then

    • @talastra
      @talastra หลายเดือนก่อน

      Yeah, don't trust anyone over 30@@therealelement75

  • @dro56789
    @dro56789 2 ปีที่แล้ว +895

    "Witness, is this number prime?"
    "Yes!"
    "Objection, your honour. We have evidence that this witness is a strong liar."
    "Sustained."

    • @qovro
      @qovro 2 ปีที่แล้ว +137

      A Parker witness, you might say.

    • @tonymiller8244
      @tonymiller8244 2 ปีที่แล้ว +15

      @@qovro uh oh

    • @cossaertom
      @cossaertom 2 ปีที่แล้ว +20

      he gave it a go, but wasn't quite right.

    • @DergPH
      @DergPH 2 ปีที่แล้ว +3

      Oh no

    • @adamqazsedc
      @adamqazsedc 2 ปีที่แล้ว +5

      SUS

  • @flan1591
    @flan1591 2 ปีที่แล้ว +877

    13:03 Matt's about 3 orders of magnitude off; it's 1 trillion and 122 billion. That's a real Parker Quadrillion if I've ever seen one

    • @TabooGroundhog
      @TabooGroundhog 2 ปีที่แล้ว +86

      Gotta have at least one per video

    • @Ojisan642
      @Ojisan642 2 ปีที่แล้ว +50

      The billion is sus.

    • @blumousey
      @blumousey 2 ปีที่แล้ว +15

      I'm pretty sure he puts them in intentionally, like his book

    • @markinnes4264
      @markinnes4264 2 ปีที่แล้ว +28

      Could be the British Vs American definition.

    • @GeeItSomeLaldy
      @GeeItSomeLaldy 2 ปีที่แล้ว +23

      @@markinnes4264 No-one uses the Long-count any more in mathematics

  • @jmv333
    @jmv333 2 ปีที่แล้ว +209

    11:53 "Over 8 times as far" must of course be referring to a 'Parker 8', which we can therefore infer is some value less than 6.6103.
    We learn so much from Matt!

    • @Karolomen
      @Karolomen 2 ปีที่แล้ว +17

      At one point (7:02) he also said that 18 is just below a quarter of 90 - and I was like "WTF, 90/18=5, Matt surely knows that", but, just like with what you wrote, in this case it must have been a Parker quarter.
      Okay, hold up. I've just watched it again to find the timestamp and he said "quarter" because 25% is the worst-case scenario for the ratio of liars.

    • @benjaminshepard
      @benjaminshepard 2 ปีที่แล้ว +21

      Similar to the 'Parker Quadrillion' at 12:49 eh?

    • @Triantalex
      @Triantalex 4 หลายเดือนก่อน

      false.

  • @Honey-lx1ly
    @Honey-lx1ly 2 ปีที่แล้ว +954

    Previous statements I made were incorrect, due to hasty coding. I am very confident in the following results:
    For 2 < n < 100, n is odd, the top 5 naughtiest numbers are the following:
    38, with 4 offences
    8, with 3 offences
    18, with 3 offences
    34, with 3 offences
    47, with 3 offences
    For 2 < n < 1000, n is odd, the top 5 naughtiest numbers are the following:
    64, with 16 offences
    68, with 15 offences
    118, with 14 offences
    307, with 14 offences
    274, with 13 offences
    For 2 < n < 10000, n is odd, the top 5 naughtiest numbers are the following:
    512, with 68 offences
    64, with 66 offences
    256, with 59 offences
    1451, with 58 offences
    254, with 57 offences
    There seems some justification that powers of two are particularly naughty.

    • @camicus-3249
      @camicus-3249 2 ปีที่แล้ว +128

      Can't wait for the next video on N*ughty Numbers

    • @MySharpify
      @MySharpify 2 ปีที่แล้ว +47

      I wonder if it's because they're a power of 2. Who was second and third for each test respectively?

    • @annyone3293
      @annyone3293 2 ปีที่แล้ว +18

      81 seems naughty for all natural up to thousands.

    • @steven_porter
      @steven_porter 2 ปีที่แล้ว +8

      I think it's interesting that these are powers of two. Thanks for this!

    • @unvergebeneid
      @unvergebeneid 2 ปีที่แล้ว +4

      I wonder if this is an actual patten and if that's been proven already... 🤔

  • @pyglik2296
    @pyglik2296 2 ปีที่แล้ว +689

    I love these little anthropomorphisations of numbers and the stories of their relations :)

    • @PronatorTendon
      @PronatorTendon 2 ปีที่แล้ว +11

      I prefer onomatopoeic anthropomorphisations

    • @toxicara
      @toxicara 2 ปีที่แล้ว +13

      Ooh I'd love it if they got together with ViHart and did a story series of different number types. The only question left is what should they call it?

    • @DergPH
      @DergPH 2 ปีที่แล้ว +1

      Hmmm

    • @limbridk
      @limbridk 2 ปีที่แล้ว +5

      I'm ALWAYS team anthro! In fact, I dislike strongly when anybody tries to stop me from anthroing for a bit of spice.

    • @HypnosisBear
      @HypnosisBear 2 ปีที่แล้ว +1

      Love your pfp

  • @tomrivlin7278
    @tomrivlin7278 2 ปีที่แล้ว +246

    I love how the numbers changed from witnesses to detectives to cops to juries as the video progressed XD

    • @hughcaldwell1034
      @hughcaldwell1034 2 ปีที่แล้ว +18

      Yeah, the story did seem somewhat judicially confused...

    • @efulmer8675
      @efulmer8675 2 ปีที่แล้ว +11

      That's OK though, it makes for really interesting worldbuilding.

    • @42ArthurDent42
      @42ArthurDent42 2 ปีที่แล้ว +17

      Spoiler alert : one of them is the killer.....

    • @dinklebob1
      @dinklebob1 2 ปีที่แล้ว +8

      Detectives and cops can be witnesses, no? The only real jump was to jury.

    • @programmingpi314
      @programmingpi314 2 ปีที่แล้ว +7

      Matt liked the numbers so much, that he kept promoting them.

  • @KSignalEingang
    @KSignalEingang 2 ปีที่แล้ว +122

    It's like they say: Don't do the crime if you can't prove you're prime.

    • @AyatollahKhomeiniSalleh
      @AyatollahKhomeiniSalleh 2 ปีที่แล้ว +5

      Awesome one! 🤣🤣🤣

    • @samuelvilz
      @samuelvilz 2 ปีที่แล้ว +5

      This comment is on fire 🔥

    • @asheep7797
      @asheep7797 2 ปีที่แล้ว +1

      @@samuelvilz then get some water

    • @una_10bananas
      @una_10bananas 2 ปีที่แล้ว +1

      I had a lecturer who would pronounce "prime" as "crime"

    • @Triantalex
      @Triantalex 4 หลายเดือนก่อน +1

      false.

  • @joaquinclavijo7052
    @joaquinclavijo7052 2 ปีที่แล้ว +258

    * ponts at 747 *
    "we're assuming this is odd"

    • @falquicao8331
      @falquicao8331 2 ปีที่แล้ว +59

      One of the boldest assumptions a mathematician has ever said

    • @thatguyalex2835
      @thatguyalex2835 2 ปีที่แล้ว +9

      The 747 airplane is kinda odd. It has a hump like a giant metal sky whale. It is my favorite mainstream aircraft though. :)

    • @SwervingLemon
      @SwervingLemon 2 ปีที่แล้ว +1

      @@thatguyalex2835 The hump is why I love the old Antonov's.

    • @d5uncr
      @d5uncr 2 ปีที่แล้ว

      It's a Parker conjecture.

    • @thatguyalex2835
      @thatguyalex2835 2 ปีที่แล้ว

      @@SwervingLemon I like both models of planes. Are you talking about the AN-225?

  • @henrygreen2096
    @henrygreen2096 2 ปีที่แล้ว +27

    Absolutely admire the strength of Parker to not make a “Prime Suspect” joke in the whole video haha

  • @Einyen
    @Einyen 2 ปีที่แล้ว +297

    The results are symmetrical, so the witness "a" always gives the same results as witness (n-a), so the 18 liars for 91 are actually:
    1,9,10,12,16,17,22,29,38,(91-38),(91-29),(91-22),(91-17),(91-16),(91-12),(91-10),(91-9),(91-1)
    You can also use witnesses a>n without problems, but the result for a, a+n, a+2n, a+3n ... etc. will be the same.

    • @adamqazsedc
      @adamqazsedc 2 ปีที่แล้ว +7

      Coolio

    • @hippasusofmetapontum6447
      @hippasusofmetapontum6447 2 ปีที่แล้ว +19

      Cool, so if I wanted to figure out all liars for any given number I'd only have to check halfway.

    • @Falanwe
      @Falanwe 2 ปีที่แล้ว +22

      You should never call 1 and n-1 as witnesses: they will always tell you n is prime.

    • @Einyen
      @Einyen 2 ปีที่แล้ว +7

      ​@@Falanwe Yeah I know, I forgot to mention that. I just added them in the list because they were shown in the video for the 91 case. You should also never use n, 2n, 3n, ... etc as witness, they will always show composite even for primes. So basically (2 to n-2), (n+2 to 2n-2), (2n+2 to 3n-2), ... etc. are ok, but the results for each range are identical, but it is useful to use a>n if you have a huge a that works for a lot of n.
      For example the 2 witnesses a=336781006125 or a=9639812373923155 will work for n

    • @Galakyllz
      @Galakyllz 2 ปีที่แล้ว +1

      @@Einyen Thanks for the information. You rock.

  • @pierredefermat2559
    @pierredefermat2559 2 ปีที่แล้ว +85

    I was waiting for this for about 500years!

    • @revenevan11
      @revenevan11 2 ปีที่แล้ว +9

      😆 well look who it is!

    • @volodyadykun6490
      @volodyadykun6490 2 ปีที่แล้ว +10

      Is the comment to the video too small to put proof in?

    • @pierredefermat2559
      @pierredefermat2559 2 ปีที่แล้ว +5

      @@volodyadykun6490 Unfortunately, yes.

    • @naszaalbania2576
      @naszaalbania2576 2 ปีที่แล้ว

      Time Lord!

    • @brandonmarquette7476
      @brandonmarquette7476 2 ปีที่แล้ว +1

      Pierre! How’s it hangin? How’s the dirt nap? Did you dream of Bernhard Riemann?

  • @tejarex
    @tejarex 2 ปีที่แล้ว +107

    Python's pow function takes an optional mod argument, making this test easy to program. For instance, pow(23, 373, 747) = 131.

    • @eac-ox2ly
      @eac-ox2ly 2 ปีที่แล้ว +6

      Huh, did not know that!

    • @trueriver1950
      @trueriver1950 2 ปีที่แล้ว +9

      How sensible for anyone programming any cryptographic stuff.

    • @ThePharphis
      @ThePharphis 2 ปีที่แล้ว +1

      I think I'm going to have to start solving my project euler problems in python due to this lol

    • @1992jamo
      @1992jamo 2 ปีที่แล้ว +1

      If anyone is interested, this is how you'd implement it in c#
      public static int Pow2(int x, int y, int z)
      {
      int number = 1;
      for(int i = 0; i < y; i++)
      {
      number = number * x % z;
      }
      return number;
      }

    • @shoo7130
      @shoo7130 ปีที่แล้ว +2

      @@1992jamo Try:
      while (y > 0) {
      if (y & 1) number = number * x % z;
      x = x * x % z;
      y >>= 1;
      }
      instead.

  • @javik9165
    @javik9165 2 ปีที่แล้ว +159

    Makes sense that the primes are the most apt witnesses for telling if another number is prime or not.

    • @dms1683
      @dms1683 2 ปีที่แล้ว +38

      It takes one to know one

    • @dinklebob1
      @dinklebob1 2 ปีที่แล้ว +6

      They see each other at the various prime meetings and functions.

    • @Triantalex
      @Triantalex 4 หลายเดือนก่อน

      ??

  • @LeventK
    @LeventK 2 ปีที่แล้ว +236

    When I heard "In the future, entertainment will be randomly generated." I didn't think numbers would be this entertaining.

    • @TunaBear64
      @TunaBear64 2 ปีที่แล้ว +12

      Numbers can lie- I mean
      WEED EATER

    • @amyshaw893
      @amyshaw893 2 ปีที่แล้ว +5

      i mean, is entertainment not randomly generated anyway?

    • @abiwardani3944
      @abiwardani3944 2 ปีที่แล้ว +3

      Wait youre the chess guy

    • @vigilantcosmicpenguin8721
      @vigilantcosmicpenguin8721 2 ปีที่แล้ว +2

      The funny thing is, that meme became popular when a TH-cam video of the clip went viral. That clip was uploaded by the user Tibees, who ended up becoming a math TH-camr. It's full circle.

    • @DergPH
      @DergPH 2 ปีที่แล้ว

      Same

  • @mathphysicsnerd
    @mathphysicsnerd 2 ปีที่แล้ว +66

    18/90 is the new Parker approximation for 1/4

    • @volodymyrgandzhuk361
      @volodymyrgandzhuk361 2 ปีที่แล้ว +3

      He said AT MOST 1/4 of the numbers are liars

    • @mathphysicsnerd
      @mathphysicsnerd 2 ปีที่แล้ว +2

      @@volodymyrgandzhuk361 Ah, lay off. Ever since the Parker Square plenty of almost correct things have been labelled as Parker solutions and Matt's in on the joke. He is a stand-up comic you know

    • @johannesvanderhorst9778
      @johannesvanderhorst9778 2 ปีที่แล้ว +1

      @@volodymyrgandzhuk361 So let's hope for him that there are no composite numbers n = p*q*r where each of the prime number q, and r divide (n-1)/2.

  • @jamirimaj6880
    @jamirimaj6880 2 ปีที่แล้ว +66

    Matt Parker and James Grime, really the two stars you need on the 10th anniversary of Numberphile

    • @BravoCharleses
      @BravoCharleses 2 ปีที่แล้ว +12

      Don't forget Cliff Stoll!

    • @UnderwurldChris
      @UnderwurldChris 2 ปีที่แล้ว +10

      And Hannah Fry!

    • @5ucur
      @5ucur 10 หลายเดือนก่อน +2

      Neil (what was his surname again... the OEIS founder) and Ben Sparks are also people I like to see in these videos!

  • @protocol6
    @protocol6 2 ปีที่แล้ว +113

    This reminds me of bloom filters and their cousins, the xor and fuse filters. They are constructed from a set of numbers (hashes, usuallly) but they use far fewer bits than the set and can tell you if a number isn't in the set faster than you could search the set. You can control how often they lie about it being in the set by the size of the filter in relation to the size of the set. Since these filters are just big integers, there should be naturally occurring filters for every possible set somewhere in the natural numbers.

    • @soranuareane
      @soranuareane 2 ปีที่แล้ว +1

      Sounds very Miller-Rabin-y.

    • @protocol6
      @protocol6 2 ปีที่แล้ว +4

      @@luxuryenby Maybe, but if you think about it too much, you will be relieved when an infinite troupe of monkeys shows up at your door wanting to talk to you about the script for Hamlet they've worked out.

    • @Triantalex
      @Triantalex 4 หลายเดือนก่อน +1

      ??

  • @johnchessant3012
    @johnchessant3012 2 ปีที่แล้ว +32

    This is basically a generalization of the Fermat primality test, where you just test if a^(n-1) = 1 (mod n); if it isn't, then it's definitely composite, but if it is, then it's only probably prime. Except, for the Fermat test, there are "Carmichael numbers" for which every witness is a liar; the first three are 561, 1105, and 1729. So the real innovation of the Miller-Rabin test is being able to prove that at most 25% of its witnesses are liars, enabling an effective probabilistic test.

    • @magsaysay84
      @magsaysay84 6 หลายเดือนก่อน +1

      Fun that Ramanujan's Number is in there

  • @MrCheeze
    @MrCheeze 2 ปีที่แล้ว +82

    I'm a little bit curious whether 1662803 has any particular properties that makes it more likely to be honest, or if it's just a pure numerical coincidence that it happens to cover up the holes of the other three numbers over that range.

    • @RecursiveTriforce
      @RecursiveTriforce 2 ปีที่แล้ว +48

      Well 1662803 is prime and 1662804 is very composite.

    • @Salan156
      @Salan156 2 ปีที่แล้ว +2

      Why am I not suprised that you'd be thinking about something like that :D But it's definetly interesting

    • @DukeBG
      @DukeBG 2 ปีที่แล้ว +16

      Pretty sure "happens to cover up the holes of the other three numbers over that range"

    • @jamesknapp64
      @jamesknapp64 2 ปีที่แล้ว +3

      @@DukeBG my guess as well

    • @vigilantcosmicpenguin8721
      @vigilantcosmicpenguin8721 2 ปีที่แล้ว +6

      They were just raised not to be a liar.

  • @JonathonV
    @JonathonV 2 ปีที่แล้ว +55

    Liar numbers should be called “perjurious numbers”! 😂

    • @vigilantcosmicpenguin8721
      @vigilantcosmicpenguin8721 2 ปีที่แล้ว +2

      Because, if there's one things mathematicians like, it's giving catchy names to numbers.

  • @amyshaw893
    @amyshaw893 2 ปีที่แล้ว +27

    matt, that calculator has a FACT button on it. ttype the number, hit equals, then shift+(the degrees button) and it prints out the prime decomposition of the number

    • @thatguyalex2835
      @thatguyalex2835 2 ปีที่แล้ว +2

      I programmed my TI-84 CE to factor any number under 2.52 million in November 2020. :) Why that number? Cos the device runs out of memory beyond 2.5 million. I even came up with an estimated calculation time (3 minutes for factoring the largest numbers).
      Have you ever programmed your calculator Matthew in TI Basic?

    • @U014B
      @U014B 2 ปีที่แล้ว +2

      @@thatguyalex2835 So you're saying it can do FACTs and Logic?

    • @ZedaZ80
      @ZedaZ80 2 ปีที่แล้ว +1

      @@thatguyalex2835 friend, that's a Casio

    • @thatguyalex2835
      @thatguyalex2835 2 ปีที่แล้ว

      @@U014B Nope. :) It can't. It is not a Casio.

    • @thatguyalex2835
      @thatguyalex2835 2 ปีที่แล้ว

      @@ZedaZ80 Yes, the calculator in the video was a Casio. I used to own a Casio a long time ago, but sadly most textbooks here in the US require Texas Instruments. :( At least I can program it.

  • @phlogchamp
    @phlogchamp 2 ปีที่แล้ว +19

    13:03 that’s a blunder if I’ve ever seen one, classic Matt Parker move.

    • @StefanReich
      @StefanReich 2 ปีที่แล้ว +4

      11:50 Another blunder

  • @Quasarbooster
    @Quasarbooster 2 ปีที่แล้ว +68

    If the set of witnesses are the first n primes, what is the largest number that can be conclusively confirmed or rejected as prime, as a function of n? The examples Matt showed makes me think it might be exponential or double exponential.

    • @apuji7555
      @apuji7555 2 ปีที่แล้ว +3

      that sounds pretty interesting

  • @montrealleciester7277
    @montrealleciester7277 2 ปีที่แล้ว +7

    "747 has been charged with homicide and vehicular manslaughter and will be serving 747 years in prison"

  • @bourbonbournvita
    @bourbonbournvita 2 ปีที่แล้ว +35

    This is great, I had learnt Miller Rabin test in my Cryptography class, but not so clearly with these Witness numbers.

  • @heisenberg_fisher2890
    @heisenberg_fisher2890 2 ปีที่แล้ว +3

    One of the best numberphile videos I have seen!! Well done to both of you.

  • @rjginsburg
    @rjginsburg 2 ปีที่แล้ว +5

    “I happen to know that below 91 there are 90 numbers”. Excellent

    • @KingLarbear
      @KingLarbear 2 ปีที่แล้ว +1

      This comment is definitely perfect

  • @Verlisify
    @Verlisify 2 ปีที่แล้ว +172

    Ooh. Actually throwing in the "Dun Dun"
    I feel like some aggressive content ID would try to claim the whole video over those .5 seconds

    • @DrGuppy-hg7xu
      @DrGuppy-hg7xu 2 ปีที่แล้ว +1

      Hi Verlis didn’t expect to see you here lol

    • @michaelavanessian8558
      @michaelavanessian8558 2 ปีที่แล้ว +1

      I know this is unrelated to your comment but can I say how cool your profile picture looks?
      It looks really nice.

    • @Qermaq
      @Qermaq 2 ปีที่แล้ว

      I think it's insufficient for a legal claim.

    • @executeorder6613
      @executeorder6613 2 ปีที่แล้ว +3

      @@Qermaq
      The bots aren’t smart enough to know that

    • @Qermaq
      @Qermaq 2 ปีที่แล้ว

      @@executeorder6613 Yeah but the bots aren't asked to match stuff like this.

  • @juandiaz3651
    @juandiaz3651 2 ปีที่แล้ว +7

    Professor: The test isn’t even that hard
    The test:
    Question 1: Guess the next number in the following sequence:
    2, 13, 23, …?

    • @richjhart
      @richjhart 2 ปีที่แล้ว +1

      687. That's my guess. Therefore I've done what you asked. Full marks, please!

  • @OzoneTheLynx
    @OzoneTheLynx 2 ปีที่แล้ว +7

    Wow. I'm studying computer science. I just found this exact thing in a footnote of one of my scripts (discrete mathematics). We were looking at groups, modular arithmetic and primes to understand RSA public-key encryption
    . This is just checking weather 1 is the greatest common divisor of a and n. If you check all possible dividers you will know wether it's prime. Well that and some awesome aspects of mathematics that keep computation feasible. We used it because a gcd of 1 is necessary for it to have an inverse in the groups we were using, breaking group axioms, so we'd either have to exclude them or just use a prime which had non of them (except for 0 which is equal to n). Damn this feels amazing understanding the math behind this.

  • @soranuareane
    @soranuareane 2 ปีที่แล้ว +1

    THANK YOU for finally covering Miller Rabin! I've always been fascinated with this particular primality test due to how incredibly simple it seems.

  • @choco_jack7016
    @choco_jack7016 2 ปีที่แล้ว +24

    never call 1 to the stand, it always gives 1

  • @holgerchristiansen4003
    @holgerchristiansen4003 2 ปีที่แล้ว +18

    With the way you explained the algorithm, the strongest liars would be 1 and (n-1). They lie for ALL non-primes. Which is exactly why the correct algorithm excludes them from the list of possible candidates

    • @Anonymous-df8it
      @Anonymous-df8it 2 ปีที่แล้ว

      Proof?

    • @holgerchristiansen4003
      @holgerchristiansen4003 2 ปีที่แล้ว +2

      @@Anonymous-df8it Well, 1 will always stay 1, no matter to which power you raise it. And (n-1) mod n is the same as -1, so it will be either 1 or -1 (mod n) when you raise it to any positive power. Those are exactly the "probably prime" results the algorithm is looking for, so using those will result in a false positive every time.

    • @Anonymous-df8it
      @Anonymous-df8it 2 ปีที่แล้ว

      @@holgerchristiansen4003 What would be the next strongest liars?

    • @holgerchristiansen4003
      @holgerchristiansen4003 2 ปีที่แล้ว

      @@Anonymous-df8it I have not tried to find that out yet, but some others in the comments have listed their results. Though the last time I checked only up to 100.000. You probably need a lot of calculations to go higher since you have to check n-3 numbers every time. So the algorithms time increases quadratically...

    • @Anonymous-df8it
      @Anonymous-df8it 2 ปีที่แล้ว

      @@holgerchristiansen4003 Why quadratically? Wouldn't that make it run exponentially with the number of digits?

  • @philipb4647
    @philipb4647 2 ปีที่แล้ว +2

    "Minimizing the mistakes, not eradicating but cutting back" (1:50) is henceforth known as the Parker Method. The Parker Method gave us the Parker Square.

  • @SKyrim190
    @SKyrim190 2 ปีที่แล้ว +2

    Amazing video! Informative and thoroughly entertaining as well

  • @hebl47
    @hebl47 2 ปีที่แล้ว +4

    You two really had a lot of fun in this episode. Well done!

  • @infinityinf1
    @infinityinf1 2 ปีที่แล้ว +19

    A Numberphile Classic!

  • @copperfield42
    @copperfield42 2 ปีที่แล้ว +7

    so I did the math and from all the odd numbers from 7 to 25326001 I found that:
    2 give false testimony to 255 numbers
    3 give false testimony to 314 numbers
    5 give false testimony to 280 numbers

  • @ace_falken5362
    @ace_falken5362 2 ปีที่แล้ว +16

    Off the top of my head, I wouldn't be surprised to see the strongest liar change as you test higher and higher numbers. For example: testing liars for all numbers up to 1001, you can't have 1001 having witnessed yet. But it could, by the time you've tested up to a million, be the strongest liar.

    • @johannesvanderhorst9778
      @johannesvanderhorst9778 2 ปีที่แล้ว

      Well, 1 is the strongest liar of all, because 1^a = 1 (mod n) for any numbers a and n.

  • @ringoferrer2343
    @ringoferrer2343 2 ปีที่แล้ว +3

    advanced congrats 4mil subs numberfile!

  • @TheXtrafresh
    @TheXtrafresh 2 ปีที่แล้ว +3

    16:45 Matt being super happy about 747 appearing, looking up at the camera all enthusiastic, and then realizing nobody in the room shares his level of number geekhood. This is me about 5 times every day. 🤣

  • @KpxUrz5745
    @KpxUrz5745 2 ปีที่แล้ว +1

    May I just interject a comment, please? I just adore Numberphile Matt and this channel. It is always fascinating beyond words, and exceptionally educational. Bravo, Numberphile! Superb content!

  • @ishmiel21
    @ishmiel21 2 ปีที่แล้ว +1

    This video made me so happy. It is so much fun

  • @countduckula9977
    @countduckula9977 2 ปีที่แล้ว +7

    I love the 12 Angry Men reference.

  • @Bodyknock
    @Bodyknock 2 ปีที่แล้ว +76

    Interestingly I can’t seem to find anything breaking down what the “strongest liars” are. My intuitive guess is the smaller the number the better the chance it lies so 2 might be the strongest, but I’m curious to see an answer to that question Matt had at the end.

    • @jamesharmon4994
      @jamesharmon4994 2 ปีที่แล้ว +2

      That makes sense.. it would seem 2 would lie half the time. This is just my guess, though.

    • @hirokiendo7380
      @hirokiendo7380 2 ปีที่แล้ว +6

      2 is the best witness yet the strongest liar lol

    • @keithbromley6070
      @keithbromley6070 2 ปีที่แล้ว +8

      Surely not 2? It was part of all the star witness groups! Perhaps the lowest non-prime? Dastardly number 4.

    • @AdamHill42
      @AdamHill42 2 ปีที่แล้ว +15

      @@keithbromley6070 star witnesses are only reliable if you query the whole group - it could be that 2 only covers 3's weaknesses but lies all the other times. Just a possibility, no idea if it's true but saying you can be a star witness and a frequent liar!

    • @keithbromley6070
      @keithbromley6070 2 ปีที่แล้ว +2

      @@AdamHill42 I guess I don’t understand it enough to be sure either way!

  • @UnrivaledLimit0500
    @UnrivaledLimit0500 11 หลายเดือนก่อน +2

    I loved this video and love matt parker. Great

  • @WaterCrane
    @WaterCrane 2 ปีที่แล้ว +1

    Though not quite the same, one probabilistic primality test I like is the Fermat primality test - it's kind of like a worse version of the Miller-Rabin primality test. It builds on Fermat's Little Theorem and states that if a^(p - 1) ≡ 1 (mod p) with 1 < a < p - 1, then p is probably prime. And if the congruence doesn't hold for a given a, then p is composite.
    However, there is a class of numbers where ALL coprimes of a between 1 and p - 1 are congruent to 1 (mod p) even though p is composite. These are known as Carmichael Numbers, and the smallest is 561 = 3 * 11 * 17. Indeed, the test only fails if a is set to one of its factors (which you can trivially divide p by to confirm it's compositeness).

  • @timothywhite8932
    @timothywhite8932 2 ปีที่แล้ว +6

    Hey Numberphile I love the channel. Is there a chance you could do a video on celestial navigation?

  • @heaslyben
    @heaslyben 2 ปีที่แล้ว +3

    I loved "primey". People assume that it's a strict primality test, but actually from a non-subjective viewpoint it's more like a big ball of wibbly-wobbly primey-wimey stuff.

  • @michael_aigner
    @michael_aigner 2 ปีที่แล้ว

    What i like most about Brady's style of interviewing is, that it is on such a personal level. Also for example when he says "Brilliant, they are great people"

  • @YossiSirote
    @YossiSirote 2 ปีที่แล้ว +1

    I’d Love more on this topic.

  • @donaldmiller1782
    @donaldmiller1782 2 ปีที่แล้ว +9

    The witness is providing an alibi for the number m. If m has an alibi (i.e., mod =1), he's not the thief (not prime). Not having an alibi doesn't make m the thief, call another witness to the stand.

    • @Starwort
      @Starwort 2 ปีที่แล้ว

      *mod ≠ ±1

  •  2 ปีที่แล้ว +7

    Excellent video, funny, interesting, well edited. 10/10.

  • @szymonrutyna166
    @szymonrutyna166 2 ปีที่แล้ว

    Love this channel.

  • @jaredeudell8953
    @jaredeudell8953 2 ปีที่แล้ว

    I didn't understand a word of this, but enjoyed it immensely.

  • @foodflare9870
    @foodflare9870 2 ปีที่แล้ว +19

    Having not looked into the numbers most prone to lying, my first instinct would be that it'd likely be related to the highly composite numbers.

  • @xenlol
    @xenlol 2 ปีที่แล้ว +4

    cant wait for the parker square numbers

  • @agargamer6759
    @agargamer6759 2 ปีที่แล้ว

    This is great!

  • @PunmasterSTP
    @PunmasterSTP 4 หลายเดือนก่อน +1

    I gotta agree; it’s pretty cool to be able to infer primality or compositness without actually doing any division!

  • @JavierSalcedoC
    @JavierSalcedoC 2 ปีที่แล้ว +23

    You know what does this video and the fed balance sheet have in common?
    Billions are missing

  • @mattasker1914
    @mattasker1914 2 ปีที่แล้ว +11

    Are these star numbers found by checking every number up to the limit and seeing that they do not lie for any or is there a proof that gives this limit without having to check? I'm assuming the former but would be cool to know.

  • @markiangooley
    @markiangooley 2 ปีที่แล้ว +1

    I saw 91 and something in my brain immediately said “it’s 70 plus 21 so 7 times 13”

  • @EnigmacTheFirst
    @EnigmacTheFirst 8 หลายเดือนก่อน +1

    13:34 “Just go through every single number.” Easier said than done.

  • @MrDowntemp0
    @MrDowntemp0 2 ปีที่แล้ว +5

    That's a nice Casio, Matt. Can we get a review?!

  • @PokeCastle
    @PokeCastle 2 ปีที่แล้ว +21

    Judge : 4 was found guilty and is sentenced to become a part of Collartz Conjecture loop.
    Lawyer : But almost all of the witnesses says 4 isn't guilty!
    Judge : But 1662803, 23, 13, and 2 said that he is guilty!

  • @Seltyk
    @Seltyk 2 ปีที่แล้ว +1

    As soon as I saw the title I knew this would be the Miller-Rabin test; I just happened to be working with it last week

  • @blackthedog6004
    @blackthedog6004 2 ปีที่แล้ว +1

    I really like this episode. That witness-cop description makes it really interesting(which is already interesting. A prime seeking method?)

  • @chrisrj9871
    @chrisrj9871 2 ปีที่แล้ว +4

    You need a video about 7 and 11, and have it be sponsored by 7Eleven :D

  • @davidgillies620
    @davidgillies620 2 ปีที่แล้ว +5

    The 4^-k probability of falsely declaring a number prime is a very pessimistic one as the number being tested gets bigger and the number of witnesses increases. And if you're worried, then iterate for 25 or 50 different witnesses. It's a sufficiently fast algorithm that you can afford to do that even for RSA-sized primes - 800 decimal digits or so - if you don't mind waiting a few milliseconds. Also, you can tweak Miller-Rabin to sometimes get a prime factor out of a number in addition to proving its compositeness.

    • @gregorymorse8423
      @gregorymorse8423 2 ปีที่แล้ว

      Apparently around 4 or 5 random tests is sufficient. 1/4 liars is an upper bound and when dealing with cryptographic sized numbers it's actually far less. So in practice my intuition to do like you say k of 50 or 100 is no needed at all. Although your choices must be random.

  • @coopergates9680
    @coopergates9680 2 ปีที่แล้ว

    The way the test is described in the video, it fails for Fermat primes like 257. When you subtract 1 and take out the 2s from what's left, the d value just becomes 1, so very few witnesses will yield a remainder of +-1 even though the test number is prime.
    It also fails for primes lying above multiples of large powers of 2, such as 193, where d becomes 3. For instance, with a witness of 3, of course its cube (27) is not +-1 (mod 193), so the supplemental task starting at 8:08 is necessary rather than optional.

  • @MATHSPreparations2090
    @MATHSPreparations2090 2 ปีที่แล้ว

    Thank you

  • @bazyt1
    @bazyt1 2 ปีที่แล้ว +21

    Such a cool concept. Those unreliable witnesses...🤣

  • @constantinburgi3995
    @constantinburgi3995 2 ปีที่แล้ว +3

    So extrapolating from the groups, just take the first k primes to get to 2^f(k) for some function f? Or has this be disproven? How does this algorithm compare to other ways to test for primes in efficiency?

  • @denfarc
    @denfarc 2 ปีที่แล้ว +1

    Great! Another amazing idea about numbers. Numbers are fun and interesting but crazy sometimes hahaha 👍👍

  • @JeroenBaxexm
    @JeroenBaxexm ปีที่แล้ว +1

    we need more Matt again :)

  • @UMosNyu
    @UMosNyu 2 ปีที่แล้ว +4

    I tried writing is myself and I am stuck on 673.
    673 is 2^5*21+1
    FIRST WITNESS: 2
    2 ^ 21 mod 673 is 84 -> not a prime.
    But 673 is a prime number ... Did I miss something?

    • @longtimenodotes2717
      @longtimenodotes2717 2 ปีที่แล้ว +1

      (2^21) * (2 ^ 3) mod 673 = -1
      We can multiply with 2^r where 0 < r < s.

    • @adamsbja
      @adamsbja 2 ปีที่แล้ว +2

      From 8:00, you can pull 2's off the first part. 2^21 mod 673 doesn't work, but 2^168 mod 673 [168 is 21*2*2*2] is -1.

    • @ghislainbugnicourt3709
      @ghislainbugnicourt3709 2 ปีที่แล้ว

      Same thing with the prime number 149 (picked randomly). If we test with a=2 or even a=23, they say it's not a prime because we don't get 1 or -1 mod 149.
      I suspect the rule given in the video is a Parker rule.

    • @jamesknapp64
      @jamesknapp64 2 ปีที่แล้ว

      @@adamsbja correct, I wish they did 17 as an example of why the power of 2 multiplication is important.

    • @tomashrazdira1766
      @tomashrazdira1766 2 ปีที่แล้ว +1

      I don't get it as well.
      37 = 2 ^ 2 x 9 + 1
      2 ^ 9 mod 37 = 512 mod 37 = 31 => not prime
      but 37 is prime...
      Edit:
      Ok, the part at 8:00 is important
      2 ^ (9 * 2^0) mod 37 = 512 mod 37 = 31 => not prime
      2 ^ (9 * 2^1) mod 37 = 262 144 mod 37 = 36 => prime

  • @egonmilanowski
    @egonmilanowski 2 ปีที่แล้ว +7

    I am looking forward to Legal Eagle's interpretation of this case.

  • @nuzayerov
    @nuzayerov 2 หลายเดือนก่อน +2

    That's a very Parker Prime Number test!

  • @bcullman
    @bcullman 2 ปีที่แล้ว +2

    Question: when using the “star witness” approach, which is more, start testing with the lower numbers first, the higher numbers first, or is there no difference?

  • @expomath9348
    @expomath9348 2 ปีที่แล้ว +7

    Contenu toujours intéressant et travail de grande qualité. Merci pour le partage.
    For non french speaker i translate : Hi how are you today. it's raining in my Paris. Thank you

  • @GRBtutorials
    @GRBtutorials 2 ปีที่แล้ว +6

    Something that wasn’t said in the video is that there’s a number that’s trivially always a strong liar if the number isn’t prime: 1, because 1 to the power of anything is 1, which is congruent to 1 modulo anything. 1 is the kind of witness who just wants to get out of the courtroom ASAP, so it’ll accuse anyone on the stand and leave.

  • @Sam-ey1nn
    @Sam-ey1nn 2 ปีที่แล้ว

    Matt’s videos are always funny but this is his funniest yet. Star Witness, celebrity numbers. :)

  • @KarlFarbman
    @KarlFarbman 2 ปีที่แล้ว

    Lawyer by trade, numberphile by hobby. This is SO up my alley.

  • @caderrabeth
    @caderrabeth 2 ปีที่แล้ว +7

    This is super cool and interesting, but I'm left to wonder why in the heck it works like it does.

    • @alexpotts6520
      @alexpotts6520 2 ปีที่แล้ว

      This looks very similar to Fermat's Little Theorem, I can't remember whether Numberphile's ever done a video on the topic but some other channels definitely have (I'd recommend Mathologer's)

    • @zanti4132
      @zanti4132 2 ปีที่แล้ว

      @@alexpotts6520 Numberphile does have a video on this topic called "Liar Numbers".

  • @kjdude8765
    @kjdude8765 2 ปีที่แล้ว +8

    When Matt talked about how large 23^373 was I was thinking: just punch it in Wolfram Alpha. Glad to see I was right.

    • @hexagonist23
      @hexagonist23 2 ปีที่แล้ว +2

      ...Or calculate it in python.

  • @Wmann
    @Wmann 9 หลายเดือนก่อน

    His upset sigh when he was told right away that 747 is indeed not prime… It’s a relatable feeling.
    Today I was counting primes from 1000 out of boredom, until I got to above 2000 and said “why not”. Sad that 2023 isn’t prime, but 2027 is, so we still have a few more years to go.

  • @PC_Simo
    @PC_Simo ปีที่แล้ว +1

    Also, for smaller numbers (like, 91), you can call over 1/4 of all witnesses (like, a half); and, if all of them say it’s prime, it’s definitely prime. Of course, it won’t work for bigger numbers (like, a trillion); so, for those, you’d better call up the star witnesses.

  • @raedev
    @raedev 2 ปีที่แล้ว +3

    is it a coicidence that all the star witnessses are prime as well? or at least the smaller ones seem to be

  • @shailushiritchie974
    @shailushiritchie974 2 ปีที่แล้ว +3

    actually, 18/90=1/5, not 1/4.

  • @MrMcCoyD4
    @MrMcCoyD4 2 ปีที่แล้ว

    LOVE IT

  • @thajobe4623
    @thajobe4623 2 ปีที่แล้ว

    Nice video, reminds me of the other primality test featured in the video with James Grime.

  • @mikaelkjericsson
    @mikaelkjericsson 2 ปีที่แล้ว +10

    Using the point sybol for multiplication is truly a Parker-notation...

    • @rosiefay7283
      @rosiefay7283 2 ปีที่แล้ว +1

      It really is used in some circs where there is no danger of confusion with decimal point.

    • @jaromir.adamec
      @jaromir.adamec 2 ปีที่แล้ว

      In many European countries this is the standard multiplication symbol taught at primary schools.

  • @p11111
    @p11111 2 ปีที่แล้ว +4

    The primes are the best witnesses because they know who's in their crime family

  • @Robi2009
    @Robi2009 2 ปีที่แล้ว

    I think that topic was already mentioned (or something very similar) in a video with Dr Grime about Carmichael Numbers

  • @matrefeytontias
    @matrefeytontias ปีที่แล้ว +1

    13:06 the number jumps from trillions to millions, I want justice for my boys the billions digit