Eric Rowland
Eric Rowland
  • 4
  • 3 448 550
Why Does this Generate Primes?
The recurrence R(n) = R(n - 1) + gcd(n, R(n - 1)) generates primes. But why? It turns out it's essentially implementing trial division in disguise.
Previous video on this sequence: ua-cam.com/video/OpaKpzMFOpg/v-deo.html
----------------
Reference:
Eric Rowland, A natural prime-generating recurrence, Journal of Integer Sequences 11 (2008) 08.2.8 (13 pages).
cs.uwaterloo.ca/journals/JIS/VOL11/Rowland/rowland21.html
----------------
0:00 Generating primes
1:26 Shortcut
4:42 What if 2 n - 1 is prime?
9:31 What if 2 n - 1 isn't prime?
14:46 Trial division
----------------
Animated with Manim. www.manim.community
Music by Callistio.
Audio recorded at the Lawrence Herbert School of Communication at Hofstra University. www.hofstra.edu/communication/
Web site: ericrowland.github.io
Twitter: ericrowland
Переглядів: 9 080

Відео

In 2003 We Discovered a New Way to Generate Primes
Переглядів 384 тис.Рік тому
There is a Fibonacci-like recurrence that seems to generate primes! It was discovered in 2003, but at the time no one understood why it worked. A few years later, I plotted the primes in a way that reveals some hidden structure. This is a tale of logarithmic scale. Followup video on this sequence: ua-cam.com/video/2y_6IIXAI_s/v-deo.html References: Fernando Chamizo, Dulcinea Raboso, and Serafín...
An Exact Formula for the Primes: Willans' Formula
Переглядів 1,3 млнРік тому
Formulas for the nth prime number actually exist! One was cleverly engineered in 1964 by C. P. Willans. But is it useful? References: Herbert Wilf, What is an answer?, The American Mathematical Monthly 89 (1982) 289-292. doi.org/10.1080/00029890.1982.11995435 C. P. Willans, On formulae for the nth prime number, The Mathematical Gazette 48 (1964) 413-415. doi.org/10.2307/3611701 Further reading:...
1 Billion is Tiny in an Alternate Universe: Introduction to p-adic Numbers
Переглядів 1,7 млнРік тому
The p-adic numbers are bizarre alternative number systems that are extremely useful in number theory. They arise by changing our notion of what it means for a number to be large. As a real number, 1 billion is huge. But as a 10-adic number, it is tiny! #SoME2 Notes and references: The last 30 digits of 2^1000000 and other large powers can be computed using modular arithmetic, by working modulo ...

КОМЕНТАРІ

  • @elnico5623
    @elnico5623 2 дні тому

    The floor functions are doing a LOT of hard work here

  • @GERARD590
    @GERARD590 5 днів тому

    Can't you just take the nth root instead of raising it to 1/n? Also (cos(any value))² is just cos²(any value)

    • @EricRowland
      @EricRowland 2 дні тому

      Yes, those are different notations for the same operation.

  • @draido-dev
    @draido-dev 11 днів тому

    noticed this pattern while solving project euler #443, lovely video!

  • @runway4970
    @runway4970 17 днів тому

    I love the fact this is a thing that somehow make sense

  • @soyezegaming
    @soyezegaming 17 днів тому

    1 is the 0th prime

  • @kroon275
    @kroon275 19 днів тому

    Its like theres a secret language in maths that we are just learning about but dont quite understand. Maybe intelligences far greater than ours are waiting for us to crack the code before they come say hi or something lol

    • @miloszforman6270
      @miloszforman6270 18 днів тому

      There is nothing scecret about math, or is it? Unfortunaly, it tends to get complicated at some point so that many cannot follow pace. But that's the same in technological fields, and worse in physics.

  • @jamesmoore8994
    @jamesmoore8994 20 днів тому

    The exact equations that define the Prime Number Sequence were found and proven 11 years ago: ua-cam.com/video/BDUv0KzjUn4/v-deo.html

  • @kpaasial
    @kpaasial 28 днів тому

    0:44 Just sum together 2^1000 terms to get the 1000th prime number. It shouldn't take that long, right?

  • @debmalyalodh1
    @debmalyalodh1 29 днів тому

    Welcome back

  • @susa4727
    @susa4727 Місяць тому

    Great video and explanation, loved it. I'm a mechanical engineer but I also love computer science and math so this video was perfect for me

  • @JeremyCaron
    @JeremyCaron Місяць тому

    That's not a formula, that's a program

  • @gigachad6844
    @gigachad6844 Місяць тому

    Can't we use Sieve of Eratosthenes instead for prime detection?

  • @heathertilton3056
    @heathertilton3056 Місяць тому

    1/3=⅓=0.33333333333

    • @miloszforman6270
      @miloszforman6270 28 днів тому

      No. 0.33333333333 = 1/3 - 1/300000000000 according to "Windows Calculator" (calc.exe).

  • @heathertilton3056
    @heathertilton3056 Місяць тому

    1÷∞=0.00000000000000000000...1 there is infinity zeros

    • @miloszforman6270
      @miloszforman6270 28 днів тому

      Are there numbers which have a decimal expansion with infinitely many zeros, followed by a 1?

  • @Honorary_Redneck
    @Honorary_Redneck Місяць тому

    Alternate/parallel/multi universes require zero actual evidence but are treated as a forgone conclusion..cause math can literally be made to say anything you like.

    • @d.paradyss8791
      @d.paradyss8791 23 дні тому

      Exacto

    • @Honorary_Redneck
      @Honorary_Redneck 23 дні тому

      However IF other universes existed they would still be bound by the law of conservation of energy and so there would not be a lot and they would be temporary.. constantly being recycled into either new universes or a prime universe. I.e. Parallel universes would exist long enough to solidify the events that caused them with their prime being the constant. This would explain "Mandela effects" as the prime universe and parallel universe balance when recombined. The reason people would even remember events differently is because the core memory of humans is extra spacial via the pituitary gland.. information (can't be destroyed) is thus superpositioned and thus outside the "rewrite" function of universe recombination. This storage of information outside time-space via superposition allows echos of alternate events to be accessed

    • @d.paradyss8791
      @d.paradyss8791 23 дні тому

      @@Honorary_Redneck Tengo algunas teorías algo diferentes pero aprecio profundamente tu punto de vista, podríamos contactar por algún sitio para conversar?

  • @uggupuggu
    @uggupuggu Місяць тому

    how is ...4444+1=0? 14:59

    • @miloszforman6270
      @miloszforman6270 Місяць тому

      In the 5-adic numbers, or even in standard numbers denoted in base-5, we have 4 + 1 = 10. - Did you even notice that 14:59 handles the case of 5-adics?

  • @-PeterAndrewNamoraMarpaung
    @-PeterAndrewNamoraMarpaung Місяць тому

    C.P Willans = Calculating primes Willans

  • @henrikljungstrand2036
    @henrikljungstrand2036 Місяць тому

    The floor function is not a continuous function for real numbers. Therefore it is to be expected not to work properly in any algorithmic implementation for non-integer rational or floating point numbers close enough to an integer.

  • @trapkat8213
    @trapkat8213 Місяць тому

    Wow. Brilliant work and brilliant presentation.

  • @monkeymathematician5896
    @monkeymathematician5896 Місяць тому

    What is said from 8:04 prevents from looping over all values of a cluster and sets its boundaries. It also means that the last value's index of the cluster is enough to describe it and averaging the values or the indexes could be unnecessary. It also says that there might be something hidden in the gap between two clusters. This saved me weeks, maybe months of work and much CPU time. Deserves the Fields to me. Thank you Professor 😁

  • @ght0076
    @ght0076 Місяць тому

    Me realising sums are basically for loops and floors are basically if statements 🤯

  • @jalma9643
    @jalma9643 Місяць тому

    This feel like mathematic in a programming language because of how it work with 0 and 1

  • @BurningShipFractal
    @BurningShipFractal Місяць тому

    It still seems to work for n = log base 2 of 3 Or other numbers that can be expressed by log base 2

  • @hootowlme
    @hootowlme Місяць тому

    I don’t get it. We don’t use it just because it’s too slow? But it DOES give us the nth prime?

    • @_bhargav229
      @_bhargav229 Місяць тому

      Yes it does, it only relies on Wilson's theorem being true.

  • @playgpgame
    @playgpgame Місяць тому

    A new theorem on primes ua-cam.com/video/rjmwlKKayDg/v-deo.htmlsi=z2aSMITtVvQfWE5G Using the product of consecutive odd numbers (rather than the factorial product), the theorem provides a necessary and sufficient condition for whether an odd number n ≥ 9 is prime.

  • @bruce_invincible
    @bruce_invincible Місяць тому

    my brain got rewired into spaghetti... gotta watch this again :P

  • @EliasMheart
    @EliasMheart Місяць тому

    Most common is 3, mostly it's every other prime. (Though it differences get larger further down) If there's a 5, it's followed by a 3. (Could be an artifact from the previous one) ... Otherwise, not sure.

  • @hiramanchaudhari4485
    @hiramanchaudhari4485 Місяць тому

    You just copied 3Blue1Brown

    • @miloszforman6270
      @miloszforman6270 Місяць тому

      It covers the same topic, but I would not say that it is a copy. You might watch this video, and the one by 3B1B, and the one by Veritasium altogether, and this may be helpful for understanding, as each one has a slightly different point of view.

  • @bijousmith1021
    @bijousmith1021 Місяць тому

    @15:30 has the last word been written on this? Summing divergent series in the Reals can be analytically continued, and does anyone know for sure there is not some divergent series that sums to _i$? (Cesàro, Abel, or Ramanujan summation?) justaskin'. Seems no less contrived than p-adics.

    • @miloszforman6270
      @miloszforman6270 Місяць тому

      _"@__15:30__ has the last word been written on this?"_ What's "this"? I can't see a context relating to the video. And what's "_i$"?

  • @aperinich
    @aperinich Місяць тому

    It's a system BASED ON THE REAL NUMBERS. It's not an alternative, it's a subsidiary.

    • @miloszforman6270
      @miloszforman6270 Місяць тому

      We'd better say that it is based on the rational numbers, as by far not all irrational numbers are part of the p-adic numbers, if any. And of course, the p-adic numbers are not an alternative to the real numbers. There are probably not many applications in the real world. There might be some in connection with encryption theory, but I'm not sure about that.

    • @aperinich
      @aperinich Місяць тому

      sorry you're right in correcting on rational vs. real, as obviously there are real numbers which have no right-most decimal value@@miloszforman6270

  • @aperinich
    @aperinich Місяць тому

    so 10-adic is like some inverse real log-10 base. I damn well hope we get to some useful applications.

  • @aperinich
    @aperinich Місяць тому

    When you use real addition, it proceeds from right to left too - just in a real and geometric sense. Who adds from the left? WTF??!

  • @aperinich
    @aperinich Місяць тому

    You can't rebuild your intuition.

  • @aperinich
    @aperinich Місяць тому

    Why isn't 78000 ten-adic = 78/1000 ? Why is it equal to 35000 ten-adic? If it's just the trailing zeroes in the value, then why represent it as a fraction at all? What a crock of shit!

    • @miloszforman6270
      @miloszforman6270 Місяць тому

      What are you talking about? 10-adic 78000 isn't equal to 10-adic 35000, or is it??? Perhaps you have failed to notice the "absolute value strokes" "|...|" ? And yes, |78000|₁₀ = |35000|₁₀ = |999000|₁₀ = 1/1000, where 1/1000 = 0.001 is a genuine _real_ number, as absolute values are always non-negative real numbers.

    • @aperinich
      @aperinich Місяць тому

      My question was based on the claim in the video... I may have gotten the notation wrong, but if you watch the video and the clear point I'm referencing, ... I'm sure you;ll get what I mean. The real point I'm driving at is why represent these concerns in the same notation as a fraction. They aren't rational equivalents. 78000, 35000 and 999000 aren't equivalent . It's not that I failed to notice the absolute value strokes, I don't see their relevance nor do I see why these are notated as rational fractions when they are only related through the facet of their 1/1000-ness. I find the whole thing annoying and not useful in terms of notation @@miloszforman6270

    • @aperinich
      @aperinich Місяць тому

      all of the examples are positive integers, for which the absolute value gate does nothing, all positive values are positive values. That is self-evident. So is the absolute value gate used to represent the adic operation, or does it actually have anything to do with absolute value? @@miloszforman6270 Maybe the examples in the video could have been better in terms of explaining why the notation is used, and perhaps an example of an adic operation being done on a negative value to show if/how absoluteness of value even comes into the matter.

    • @miloszforman6270
      @miloszforman6270 Місяць тому

      @@aperinich There are no negative numbers in the p-adic numbers. _"So is the absolute value gate used to represent the adic operation"_ "Gate"? Sorry, I can't understand this kind of complicated language. These p-adic numbers are kind of weird, and they are abstract. It took me quite a time - and several repetitions - to understand what this is all about. And actually I do have a mathematical background. If you want to understand all of this, you have to proceed thoroughly, and you can't expect that it's easy. There are other videos on YT giving introductions. You may try those of Veritasium and 3B1B. There is also a lengthy Wikipedia article. Unfortunately, such Wikpedia articles tend to be very concise and shortform, not well suited as an introduction. Nevertheless, they are a valuable support.

    • @aperinich
      @aperinich Місяць тому

      Yeah I absolutely devalue Wikipedia Mathematics! I think for now I will stick to the practical, and the syllabus I'm studying in Mathematics before going into complex analysis and still that before p-adic anything, as I want to fully formalise my maths (yes, we pluralise 'math' in Australia) a step at a time .. Anyhow it's not that this is all that complicated, I'm just previously entirely unfamiliar with it before seeing this video, and still haven't yet seen or heard of one useful application.. so I'm curious and annoyed @@miloszforman6270

  • @TheAscendedMaster
    @TheAscendedMaster Місяць тому

    Numbers are an idea that isn't real and never will be. Of course they will converge or match or find a series or set. You have to realize that the only options for these numbers you are giving are 0123456789. That's it. No matter what length,size or randomization eventually with such few choices they will randomly line up.

    • @miloszforman6270
      @miloszforman6270 Місяць тому

      This sounds quite lika a pointless, or nonsense comment. Maybe I'm missing the hidden deeper meaning.

  • @nyxcode2818
    @nyxcode2818 Місяць тому

    Reminds me of Tupper's self-referential formula from 2001. When graphed, you get a 16x106px image of the formula. Basically a quine in the language of math.

  • @alaazingi5784
    @alaazingi5784 Місяць тому

    what programming language do you use? Math++

  • @nicopb4240
    @nicopb4240 Місяць тому

    What a beautiful video! Very well explained and illustrated, thank you 🙏🏻

  • @Adrian-me4qz
    @Adrian-me4qz Місяць тому

    That trick with pi and cosine is insanely clever...

  • @betanapallisandeepra
    @betanapallisandeepra Місяць тому

    Awesome explanation and very nice formula… Initially I thought this formula seems so complex and how did he get to that. But after listening to the explanation of the breakdown it’s easy to understand how the formula has been developed… good job… 😊

  • @dcterr1
    @dcterr1 Місяць тому

    Incidentally, for those interested, a few months ago I discovered the formula 4*.5!^2 for pi, which involves just six characters limited to the decimal digits 0 through 9, the arithmetic operations +, -, *, /, factorial notation (!), and exponentiation (shown as superscripts, which I didn't do here!).

  • @dcterr1
    @dcterr1 Місяць тому

    You make a very interesting point at the end that our functional notation involves computation in disguise, so it seems that with rich enough arithmetic notation, which I assume we already have, we could in principle write down a formula for any computable quantity, though it might be completely useless! Has any result like this ever been proven? If not, I wouldn't mind working on this problem!

  • @dcterr1
    @dcterr1 Місяць тому

    I learned a long time ago that there are several formulas for generating all primes or only primes, but that they're all useless like this one in the sense that they either involve the Sieve or Eratosthenes or less efficient algorithms for computing primes in their formulations.

  • @JustAnotherSomebody001
    @JustAnotherSomebody001 Місяць тому

    This reminded me of a Phyics problems regarding counting the no. of collisions between the blocks of mass 'm' and '(100^(n-1))m' (and the no. of collisions between the lighter block and the wall used for rebounding) to calculate the first 'n' digits of π. By the way, your explanation regarding the formula was great (couldn't understand anything initially, but slowly grasped on the ideas used here).

  • @j.jwhitty5861
    @j.jwhitty5861 Місяць тому

    Excellent presentation of p-adic Numbers, the only time I have actually heard of them being used in the real word was by Computer programmers using Quantum Computers for cryptographic security and I honestly have no idea how successful them have been.

  • @simongross3122
    @simongross3122 Місяць тому

    Excellent. Remarkably clever even if it is "useless" as you say.

  • @ronhutcherson9845
    @ronhutcherson9845 Місяць тому

    That was very enlightening. 👍

  • @red.508
    @red.508 Місяць тому

    Centillion

  • @SpinnyDisk
    @SpinnyDisk Місяць тому

    Manim! (Or whatever it's called)!

  • @wyattstevens8574
    @wyattstevens8574 Місяць тому

    "Did we discover the secret digits of infinity?"