@@jaredmiller1268 The code is visible in the screenshot. If you have mathematica you can run the code. Just copy paste: plot[x_, base_: 10, num_: 10000] := Graphics[Line[ AnglePath[ 2 Pi Select[RealDigits[x, base, num][[1]], NumericQ]/base]], ImageSize -> Large] If you hit enter, nothing will happen but then you can run 'plot[Pi,10,1000] and if you run that, it will create a graph. I dont know how to make an animation or a slider or anything. I just copied it from the video and luckily it worked
4:34 "If I gave you this picture, could you have worked out the digits of pi". Not if a line looks the same no matter how often it's drawn over. You said it yourself at 1:54: "If I see two 5s, it basically doesn't do anything". This means that any number with two consecutive 5s somewhere in it's digits draws the same picture as a number without those two 5s. As a result you can subtract from pi (or add to pi!) as many pairs of 5s as you like and you'll get a number that draws the same picture as pi. If all you have is a picture drawn from pi, you won't know how many 5s to include. There are also infinitely many other ways to return to a spot without drawing anything new. In short, the function from number to picture is not invertible. EDIT: Technically, since he coded the turtle to rotate before the first step forward, a number with a pair of 5s at the very start doesn't necessarily draw the same picture as the number with those 5s removed. Even more technically, you can add as many zeroes to the start or end (if it has one) of your number and this won't change the number but will change it's picture: It would be more correct to say this function maps from sequences of digits to pictures. Finally, if you want to be INCREDIBLY technical, the interpretation of the picture as digits requires contextual information such as where the turtle started drawing from and what direction it started pointing in. In fact, unless you mark where the turtle stops after each step or know the length it travels each step, you can't even tell whether any line segment isn't several lines with 0 rotation between each: This would mean every sequence of digits draws the same picture as the sequence you get from inserting a 0 between every digit.
The picture needs to be graphed in 3D with time as the Z-axis to be traceable. Or just use the golden ratio as the constant instead of time and see what pretty squiggles pop up.
If we, like in the first part of this short series, altered the size of a degree by a very small amount, and if that new angle, in radians, was now relatively irrational to pi, the picture should have a subtle deviation everywhere. The picture now should never have any overlap except for isolated points. Now any finite picture should be invertible. There would be the possibility that you could trace over the image backwards, except that an alteration to the size of a degree is asymmetric, so it'll deviate a great deal, and give a distinct answer.
0:37 "Wow, you know that many by heart?" As a high school sophomore in 1978 I had memorized pi to 26 decimal places. I wrote them out and a classmate saw them (we thus became friends) and we had a contest to see who could memorize the most digits of pi. I don't remember the details of the arrangement, but it was a relatively few number of days. I memorized 100 digits and was pretty confident in a victory. My friend (who I hope will see and respond to this post) memorized 250. There's always a bigger fish! When Matt said "You always need to know one more" I laughed because I now know 108 digits. The 100th digit is "9". After reciting 100 digits for whatever audience, they'd ask "what comes next?" Well, from studying whatever list you had at the time, you can't help but notice the next digit, which I did know was "8". So I guess I knew 101 digits. And over the years the "just one more" creep has reached 108. The last 8 digits I know are "8214808".
@@xnoelxtuneothday Funny! If my recollection of pi's digits is clear, my recollection of the details of the memorization process are not. My recitation today ends with "8214808" which is indeed 7 digits but that's how the first 108 end. That's my story and I'm sticking to it!
@@OscarCunningham Well played! 6 but only because I looked it up. I don't recite it much anymore, but when I see someone writing it, I always check them, sometimes you spot bluffers. In this video, Matt was correct of course.
Hah, i definitely recognize the need to know one more, because they're always going to ask that. Though in my head, it's not about knowing one more, it's about lying about how many i know and underreporting it by 1 :) I'm at about 50 digits right now, and have been inching that number up for years. I'm curious @Dennis Davis, when you recite the digits do you have any sort of, say, rhythm or pattern to how you say them? I group the digits into bundles of usually 4, but with some occasional deviations. The first number in the bundle then gets said with more stress, eg: " **one** four one five, **nine** two six five, **three** five eight nine, **seven** nine three" (That last bundle is one of the deviations, with only 3. I then do a pause, and put the stress on the next digit of "two").
The conjecture that pi is normal is actually much stronger than simply "each sequence of digits will appear somewhere". First of all it works in every base, not just base 10. Secondly, it says that every sequence of digits has roughly the same chance to come up. So if you throw away the first bunch of digits, the remaining ones are distributed like uniformly random digits - and the more digits you throw away from the start the better the fit is.
Formally, we say a number is b-normal if the frequency of a length-k string of base-b digits appearing in the first n digits of the number tends towards b^-k as n increases. A normal number is one that is b-normal for all b.
The first digits have a negligibly small influence on the asymptotic dustribution, no matter how finitely many you have of them, so no need to throw anything away.
@@PLKSSB well, for example pi definitely starts with 3, so if you look at the first 1 digits it's not a uniform distribution. But I think your comments and others are right, you don't need to throw anything away if you're happy to talk asymptotically (I.e. look at all digits from 1 onwards, in which case the first 10 digits contribute almost nothing to the distribution). Maybe forget the bit about throwing digits away.
So many years, still one of the most fascinating channels on TH-cam. I know almost nothing about maths and I feel lucky to see those who can do so much with numbers. Thanks.
My immediate thought was what would happen if you used all known prime numbers instead of Pi? Would extrapolating the resulting pattern give some insight into the next prime number?..
Pasted here, so you don't have to look for it: Really cool. Here's a suggestion for a teeshirt. Choose a prime base like 11 so 1/p never ends for any prime and create a taxonomy of the first set of primes. The sequence of pictures may look quite intriguing.
also remember: we have a lot of base X to test as well. i have a feeling base 10 will always look rather messy, but base 8 might be interesting? base 3, 4 and 6 kinda look too regular; but with the heat map idea from another comment, the overlaps might start to look like something as well.
What do you mean by "all known prime numbers"? We know that there are infinitely many prime numbers and, however many we know, we can always find more.
Amazing stuff. Questions just started to pop like: what if, instead of turning on every digit, every other digit is the length? 3 angle, 1mm line, 4 angle, 1mm line, etc? The 1/7 pattern looks pretty too, like a snowflake ❄
Not much changes, qualitatively. Rationals remain leading to closed curves, irrationals do not. For rationals, every rational in your scheme has a rational in the original scheme that results in the same plot, and vice versa. For irrationals, for large numbers of digits, the scale of the figure becomes so big you can't discern individual steps and then it all looks the same: random walks.
@@landsgevaer actually, 1/43 goes in a straight line instead of a closed curve (I guess it happened to have a repeating whose sum of angles is 0) hahahah
119 is in the middle of a pretty large prime gap. The previous prime is 113 and the next 127. 119 is quite a useful semiprime for doing things like working through a toy version of RSA.
It'S interesting how you remember different things based on your interests. This person remembers more digits of Pi, I remember that 119 is "First hard to spot not-prime". It's not divisible by 2/3/5, and it does not have "clue" it's predecessors have - 49 everyone knows and 77 is easy to factor. A also know that 10_ is always prime (that is 101, 103, 107, 109 are prime, others are even or end in 5), and 20_ is the first "decade" with no prime at all.
Someone please please pretend to send this man the number sequence to draw himself but actually send the sequence to plot Rick Astley for the ultimate Rick roll.
this is the type of thing i enjoy seeing... hidden patterns of math revealing themselves. This is surely a very powerful tool Matt Henderson has created for making discoveries about math and the nature of the universe. I would love to fool around with it and plug in some numbers myself.
I love these kinds of videos where a complicated series of numbers or angles is visually represented. The Collatz Conjecture video from 2017 is another one of my favorites. Keep these coming Numberphile! Also, anything with Cliff Stoll I will like. He is cool squared.
To get a visible Mona Lisa, I think you'd need more than just the sequence of digits required to draw it - you'd also need to make sure you don't draw on top of it further down the line.
which is impossible, since for every mona lisa drawn with pi, there is some sequence of digits that will eventually make its way towards the mona lisa and ruin it
@@alexboiiii Are you sure? That would mean if you let this program run forever every spot would be visited... although I'm not sure if that's true or not.
@@Pheonix1328 It doesn't mean that every spot would be visited. For example, using base 3 means you only visit the triangular grid -- none of the interior points of the triangles can ever be touched.
I like to think this as a function with the input is one real number and the output is 2d-picture (picture that was introduced in the video) My conjecture was this: All rational numbers are produced shapes such as loop-shapes (shape that does have symmetry patterns like squares, triangular, pentagal, hexagonal...) and all irrational numbers are produce irregular shapes (shapes that doesn't have any particular symmetry patterns) To show that the conjecture is false, either there's a rational number that can produced shapes that doesn't have symmetry or irrational that can produced shapes that does have symmetry
Although 119 is not a prime number, its plot appears to say nothing about its factors. I wonder whether some other form of move-then-turn mechanism might quickly reveal at least some of a composite number's factors.
@@Justin-tp1mx Indeed, but I don't mean just varying the parameters of this specific technique. Rather, I mean devising a different technique that reveals factors, perhaps irrespective of the base. I realize that my description is very vague, but that is why I posed a query rather than presenting a working mechanism. It's important to bear in mind, however, that factorization is in no way dependent on base, although expressing a number in a base that corresponds to one of its factors _does_ reveal that factor. For example, 119 in base 7 is 230, and the final zero means that 119 is divisible by 7. Similarly, 119 in base 17 is 70, which means that 119 is divisible by 17. (17 in base ten, that is.)
Wow, cool video! My guess is that almost every irrational number in every base will essentially produce a 2D random walk, which will eventually fill up any region. I believe this is true because almost every rational number is a normal number in every base, although in order to prove this conjecture, one would need to define what is meant by "random". I also believe that almost every irrational number will produce any pattern you like in every base, such as the Mona Lisa. In fact, if I'm not mistaken, this is true by definition for every normal number, since these numbers contain every possible string of digits in any base, which translates to every possible pattern. I also like the patterns produced by rational numbers, which are all necessarily finite and symmetric. It seems like one could write a research paper on these patterns!
The music of the calming and melancholic piano while on the context of finding Mona Lisa using a self-made computer code that generates an image just hits different to me.
After watching a bit of numberphile (and I do mean a little bit) I made my first mathematical paradox Basically it's a rectangle that is limited on the X axis and infinite on the Y axis (or the other way around) These are the parts to the paradox: 1- a vertical rectangle split into two right triangles and since the slope is infinite (not zero) it just creates two lines the triangles are impossibly thin (from our perspective at least) but still slanted either way 2- these impossibly thin triangles put back together would create a width that is wider then the two triangles combined should be 3- if you just given the two separated triangles without the width there's a one out of infinity chance you can guess the answer and get it right and zero percent chance you can actually solve it and it right 4- if we take one of the impossibly thin triangles and try to find the tan of the triangle ( infinity/N ) we gat a hypotenuse that is infinitely small while the leg is infinitely larger
Since both base 6 and base 3 in this type of plotting turn the plan into triangles I think it would be interesting to compare plots for the same number in each of those bases.
I wonder... if you take the digits of pi, and for each even digit you move 1 step left, and for each odd digit, 1 step right.... will you eventually move an infinite amount in both directions?
assuming that Pi is normal: For every number N (that can be as large as you want) there exists a M so that after M digits you are N step to the right of your origin (and obviously the same is true for the left side). You will not reach infinity itself, but you will pass every point of the line at some time.
If the current assumption that the digits of pi are uniformly distributed holds true, you will move an arbitrary amount in each directionat some point. That means no matter how large of a number you choose you will at some point be further away from the origin then that number. On the otherhand you will never trend infinitely far in one direction because that would require that there are more even numbers than odd ones (or the other way around), which would violate our assumption of uniformly distributed digits.
Methinks that that would depend upon the ratio of even and odd digits of pi -- whether there's an equal number of even and odd digits or if there's a bias towards one or the other
@@nathanmcduck2999 "you will never trend infinitely far in one direction because that would require that there are more even numbers than odd ones" I mean, you'll never trend infinitely far in any direction because at any point in time you've only moved a finite number of steps.
A visualization of a number like this is already (kind of) common in cryptography to get something a human might quickly recognize. So if a hash value of something known (like a certain remote computer's cryptographic id) suddenly changes, it might trigger a warning bell in the human who is always shown the visualization on each connection attempt. The algorithm used there is called drunken-bishop and basically does a similar thing. Each digit determines a step in a walking path.
I think there's an easier way to send pi as an image. Like a drawing with a radius and a circumference would be enough info, like just send them a circle and two lines max
So many thoughts and questions. The golden ratios ones are definitely where youre going to find a mona lisa. Also, I actually tried something similar, with the turtle pen, where it draws in 3d space projected onto 2d. I used the fibonacci sequence to generate a list of directions. Was genuinely hoping it would draw the universe, no luck yet.
So here's a question. If you did a normal irrational number like Pi in base 4 (so that we're drawing on a tessellated grid), with an infinite-sized grid and an infinite number of steps, in the limit, would we cover every single grid-point? If so, would we touch every single grid-point with the same frequency?
Can you imagine if you plot some other universal constant like the Golden Ratio at some random base and the figure that shows up is a message or something 😳
There was a 3blue1brown video about prime spirals that talks about approximations and their similarities. I think it was called Why do prime numbers make spirals? Or something
Considering that some of them tile the plane and can go over lines multiple times in whatever direction, can’t we conclude that there are an infinite set of values that will produce his face?
Thinking about the problem of finding a given image within a number, it seems like a deceptively simple question at first. Obviously you just look at it from an information theory point of view. The target image requires some number of bits to encode its information, the digits store so much information, so how many digits are needed to represent the image and how likely are we to observe a random sequence of digits that matches a target pattern of a given length? Of course you have to account for the fact that you don't really need to be perfect to loosen the criteria up a bit, and boom, you're done (with an analysis of how hard it is). Right? Wrong! There's no reason that any section of the formed image had to be drawn by consecutive digits, or even digits near each other. If we're guaranteed to completely blacken the paper eventually, then we are also guaranteed that any given sequence of digits would later be overwritten by another sequence of digits. So it's not just a question of where in Pi to look for the image, it's also a question of which range to plot. Perhaps you need to plot only a very small local section to avoid distant digits stomping all over your beautiful image. Or maybe you need to plot huge, gigantic sections so that you can draw your image in several parts. It really is a fascinating rabbit hole to fall down.
Yeah, it's a really interesting problem. Even if you encode your picture as a subsequence and find it in the digits of pi, there's no guarantee that the canvas wouldn't be already drawn into or even completely blacked by the time the turtle arrives to start drawing your picture. I wonder if the fact that pi is a normal number means not only that any sequence of digits occurs somewhere in its expansion, but that any NxM *picture* (consistent with the base and the plotting rules) can be found somewhere in its infinite plot, completely pristine as given?
This is like playing with a computer assisted etch a sketch but with an excuse. Absolutely loved it I wonder how some music pieces would look like if the notes could be converted into a number string. Maybe base 12 and plot the semitone interval between notes. I bet bach stuff would look funky
Could you theoretically pixelize or vector an image in a way that converted it into a string of numbers that would make that shape when input into this algorithm, and then search the digits of pi (or any other irrational number) to find that string of digits?
Can you add numbers together by just overlaying two plots that were done in the same base? I guess the first questions would be can you decode a given plot to get a number if you know the base?
As a musician, this reminds me of the (earlier) works of Iannis Xenakis (also a mathematician, philosopher and architect), which involve "arcs" which are notes which slide from one pitch to another (glissando). These form "clouds" of sound. The first problem with using this method to create music, especially in base 12 with arcs separated by 30°, would be that 12°clock and 6°clock would be straight up or down, and therefore not have any pitch vs time content. There might be two solutions: have the first direction at say 7°, then 37°, 67° etc, or have the straight up/down as unpitched percussion. The next problem would be the potentially huge numbers of performers needed, but that might be solved by making the piece a purely electronic one. See Xenakis: Pithoprakta (String orchestra) or his electronic works featuring the UPIC computer.
I'm thinking back to the Sierpinski triangle from earlier... There would be a number like this for base 6, which forever expands to larger and larger versions of the triangle. It should be easy to generate that number algorithmically to some finite number of digits. The number would obviously be irrational, but it seems like it should also be provably transcendental.
Seriously though, I think you should introduce Matt to Neil Sloane and get them to start thinking of crazy ways to combine Matt's programming with OEIS sequences. And then we can watch it with intent the first time, and then fall asleep to both of their soothing voices from then on.
Can't we just reverse the problem? Starting from the Mona Lisa, we draw lines to sketch it out and build up the number, for a given base ? Easiest would be to start with base 4 and a pixel art version of it.
That would work, yes. There are infinitely many numbers that correspond to any given image (because two 180° turns are the same as not moving at all), but that just means you can't reconstruct the number from the image.
I like how humble he is, regardless of his intellect. Normally those two qualities run apart instead of together. He's what I call a puppy-person, lol. There's just some people who you can imagine being reincarnated *from* a puppy
Here is a question I am curious about: how does the size of the largest enclosed white region (as compared to the total area enclosed by the black lines) grow as you take the step size to infinity? Some of those white areas look pretty big, but that might be an artifact of early noise or something.
That is interesting! It behaves like a random walk (except for some special cases, like in base 2, or for rational numbers). So the root-mean-square distance from the starting point increases proportional to the number of steps, so the area of the region that is covered increases proportional to the number of steps. Not entirely sure, but I suspect that the ratio of the largest enclosed region to the total covered region tends towards a constant.
Someone please plot this: - Take pi in base 2. Have the current digit of pi be the first one. - Have the turtle draw a segment 1 unit long. - If the current digit of pi is a 1, have the turtle turn 90º to the right and draw a segment 1 unit long. If it is a 0, have it turn 90º to the left and draw a segment 1 unit long. Then select the next digit of pi as the current one. - Keep doing this indefinitely with the following added condition: if, after turning, the turtle sees a segment at any distance (such that, if it kept walking in a straight line, it would touch that segment), have it undo the turn and keep drawing 1-unit segments in a straight line until it can turn again in the direction indicated by the current digit of pi without seeing any segments. When that is finally the case, turn in that direction and draw a segment 1 unit long. This generates a clean path without superpositions.
The picture will start looking like huge squares/spirals. The distance of the turtle from the starting point then increases linearly with the number of digits, instead of as the square root.
Really cool. Here's a suggestion for a teeshirt. Choose a prime base like 11 so 1/p never ends for any prime and create a taxonomy of the first set of primes. The sequence of pictures may look quite intriguing.
In the turtle graph, for some values of fixed theta (like 1/1.01/1.02), the trajectory drawn is periodic. I would like to know how to measure how many steps are required to draw a single period by knowing a theta value.
After each step, you turn around the centre an amount equal to 180° minus theta (think of the triangle formed by connecting each end of a segment with the center). So for a Given theta, you must go around n turns, where n times (180°-theta) is a multiple of 360. The equation is (180°-theta)n = 0 mod 360
@@germaindesloges5862 thank you, i do not fully understand your answer, fortunately i already found a less refined solution. I would like you to clarify your method for me if you don't mind :)
Please a whole serie on this What happened with the higher bases ? We need to do research on this, what about comparison between bases. We could increase the hue of a segment everytime it overlaps to see in colours We could make a complexe number sequence out of it seeing where on the complexe plan each iterations lands. Then the complexe version of it ,with the imaginary and real digits being orthogonal ...
Wow! I initially overlooked this video but decided to look it now. I have to say this is one the most fascinating videos in Numberphile! It must be due to the simple idea of anyone being able to plot it, but even the most wise perhaps not understanding what it's going to look like. I mean that is there something out there? Are there patterns to be found or common themes across numbers? Can you learn something profound about numbers this way? Anyone can be the pioneer! And that is awsome.
Check out a little bit of "Mona Merch" from this video: numberphile.creator-spring.com/listing/36-degree-mona-numberphile
He's boring
Is this programn available? I think this is amazingly beautiful and would love to be able to make some decorative pieces with this.
My question is, how many digits of pi do you need to make the whole gorilla picture?
wow so you CAN find the number to draw some particular image 🤔🤔
@@jaredmiller1268 The code is visible in the screenshot. If you have mathematica you can run the code. Just copy paste:
plot[x_, base_: 10, num_: 10000] :=
Graphics[Line[
AnglePath[
2 Pi Select[RealDigits[x, base, num][[1]], NumericQ]/base]],
ImageSize -> Large]
If you hit enter, nothing will happen but then you can run 'plot[Pi,10,1000] and if you run that, it will create a graph.
I dont know how to make an animation or a slider or anything. I just copied it from the video and luckily it worked
I think it would be really cool to see this with a heat map to visualize how much it overlaps.
Yes someone please do this !
Also, slowly change the color of the line.
My first thought as well. Another cool thing would be base 3 with 0 as blue, 1 as green and 2 red.
I was thinking this would be a great way to make fantasy maps, and the heat map idea would be an awesome visual for elevation.
@@rhoddryice5412 I like this one better but in the end both would just be a dark brown-ish gray-ish color
I'd like to see progressively better rational approximations of π, since they presumably would start like pi but build patterns.
yess, that’d be so cool
That sounds like it should and would be very cool to see comparisons!
and have each approximation be in a different color (perhaps scaled from light to dark as it gets to a closer and closer approximation.
Great idea. Numberphile 2 maybe?
or ratios of consecutive Fibonacci numbers...
perhaps one could find a geometric update rule to go from one to the next
4:34 "If I gave you this picture, could you have worked out the digits of pi". Not if a line looks the same no matter how often it's drawn over. You said it yourself at 1:54: "If I see two 5s, it basically doesn't do anything". This means that any number with two consecutive 5s somewhere in it's digits draws the same picture as a number without those two 5s. As a result you can subtract from pi (or add to pi!) as many pairs of 5s as you like and you'll get a number that draws the same picture as pi. If all you have is a picture drawn from pi, you won't know how many 5s to include. There are also infinitely many other ways to return to a spot without drawing anything new. In short, the function from number to picture is not invertible.
EDIT: Technically, since he coded the turtle to rotate before the first step forward, a number with a pair of 5s at the very start doesn't necessarily draw the same picture as the number with those 5s removed. Even more technically, you can add as many zeroes to the start or end (if it has one) of your number and this won't change the number but will change it's picture: It would be more correct to say this function maps from sequences of digits to pictures. Finally, if you want to be INCREDIBLY technical, the interpretation of the picture as digits requires contextual information such as where the turtle started drawing from and what direction it started pointing in. In fact, unless you mark where the turtle stops after each step or know the length it travels each step, you can't even tell whether any line segment isn't several lines with 0 rotation between each: This would mean every sequence of digits draws the same picture as the sequence you get from inserting a 0 between every digit.
The picture needs to be graphed in 3D with time as the Z-axis to be traceable. Or just use the golden ratio as the constant instead of time and see what pretty squiggles pop up.
But if you had an arrow between each vertex....
If we, like in the first part of this short series, altered the size of a degree by a very small amount, and if that new angle, in radians, was now relatively irrational to pi, the picture should have a subtle deviation everywhere. The picture now should never have any overlap except for isolated points. Now any finite picture should be invertible. There would be the possibility that you could trace over the image backwards, except that an alteration to the size of a degree is asymmetric, so it'll deviate a great deal, and give a distinct answer.
@@YawnGod that would still leave something like 125534 indistinguishable from 12555534 or 1255555534.
It would be if you used some depth-measurement possibility- like if going over the same spot twice made it 2x as deep.
0:37 "Wow, you know that many by heart?"
As a high school sophomore in 1978 I had memorized pi to 26 decimal places. I wrote them out and a classmate saw them (we thus became friends) and we had a contest to see who could memorize the most digits of pi. I don't remember the details of the arrangement, but it was a relatively few number of days.
I memorized 100 digits and was pretty confident in a victory. My friend (who I hope will see and respond to this post) memorized 250. There's always a bigger fish!
When Matt said "You always need to know one more" I laughed because I now know 108 digits. The 100th digit is "9". After reciting 100 digits for whatever audience, they'd ask "what comes next?" Well, from studying whatever list you had at the time, you can't help but notice the next digit, which I did know was "8".
So I guess I knew 101 digits. And over the years the "just one more" creep has reached 108. The last 8 digits I know are "8214808".
...but that's only 7 digits. Don't leave us hanging like that.
@@xnoelxtuneothday Funny! If my recollection of pi's digits is clear, my recollection of the details of the memorization process are not. My recitation today ends with "8214808" which is indeed 7 digits but that's how the first 108 end. That's my story and I'm sticking to it!
@@DennisDavisEdu What comes next?
@@OscarCunningham Well played! 6 but only because I looked it up. I don't recite it much anymore, but when I see someone writing it, I always check them, sometimes you spot bluffers. In this video, Matt was correct of course.
Hah, i definitely recognize the need to know one more, because they're always going to ask that. Though in my head, it's not about knowing one more, it's about lying about how many i know and underreporting it by 1 :)
I'm at about 50 digits right now, and have been inching that number up for years. I'm curious @Dennis Davis, when you recite the digits do you have any sort of, say, rhythm or pattern to how you say them? I group the digits into bundles of usually 4, but with some occasional deviations. The first number in the bundle then gets said with more stress, eg: " **one** four one five, **nine** two six five, **three** five eight nine, **seven** nine three" (That last bundle is one of the deviations, with only 3. I then do a pause, and put the stress on the next digit of "two").
I absolutely LOVE this concept. One of my favorite numberphile videos ever
my favorite part of these videos is the presenters always remembering the digits of pi and brad always being equally impressed
The conjecture that pi is normal is actually much stronger than simply "each sequence of digits will appear somewhere". First of all it works in every base, not just base 10. Secondly, it says that every sequence of digits has roughly the same chance to come up. So if you throw away the first bunch of digits, the remaining ones are distributed like uniformly random digits - and the more digits you throw away from the start the better the fit is.
Could you explain why is necessary to throw away the first digits? It is known they are not random?
@@PLKSSB No, it's because we can't attempt to predict which digits are there, as we already know them.
Formally, we say a number is b-normal if the frequency of a length-k string of base-b digits appearing in the first n digits of the number tends towards b^-k as n increases. A normal number is one that is b-normal for all b.
The first digits have a negligibly small influence on the asymptotic dustribution, no matter how finitely many you have of them, so no need to throw anything away.
@@PLKSSB well, for example pi definitely starts with 3, so if you look at the first 1 digits it's not a uniform distribution.
But I think your comments and others are right, you don't need to throw anything away if you're happy to talk asymptotically (I.e. look at all digits from 1 onwards, in which case the first 10 digits contribute almost nothing to the distribution). Maybe forget the bit about throwing digits away.
So many years, still one of the most fascinating channels on TH-cam. I know almost nothing about maths and I feel lucky to see those who can do so much with numbers.
Thanks.
This is one of the coolest videos I have seen in the channel
Please do more videos with Matt Henderson. It's so comforting how humble he is.
My immediate thought was what would happen if you used all known prime numbers instead of Pi? Would extrapolating the resulting pattern give some insight into the next prime number?..
I wonder that too can someone do this?
Snap. I should have read forward before creating my own comment on this.
Pasted here, so you don't have to look for it:
Really cool. Here's a suggestion for a teeshirt. Choose a prime base like 11 so 1/p never ends for any prime and create a taxonomy of the first set of primes. The sequence of pictures may look quite intriguing.
also remember: we have a lot of base X to test as well. i have a feeling base 10 will always look rather messy, but base 8 might be interesting? base 3, 4 and 6 kinda look too regular; but with the heat map idea from another comment, the overlaps might start to look like something as well.
What do you mean by "all known prime numbers"? We know that there are infinitely many prime numbers and, however many we know, we can always find more.
To appear in numberphile its mandatory to know at least one hundred digits of pi
No, only last 5 digits are required
@@QuantumHistorian
Easy. 951413.
Next time, define _last_ ;-)
It's also mandatory to declare 119=7*17 a prime number.
@@renerpho
I'll go one step further: define pi=3.2 and get done with it (see the proposed Indiana bill -in 1897).
@@MaGaO In a couple of years, you'll be wrong. The forever last.
Matt’s video are great, some of my Numberphile faves ☺️ Lovely and chill, just enjoying the beauty of mathematics with a soft Scottish accent.
I would LOVE to see the set of rotationally symmetric drawings made by plotting the turns in 1/primes
If you can't afford Mathematica this wouldn't be hard to code in Python, or R.
@@davidgillies620
If only I was better at python graphics.... OK, now I have to try this.
@@kindlin python has a package called turtle that does just this.
@kindlin if you do make this would you share?!
@@hvok99 I made it but it shadowbanned my link! (thought I had shared it yesterday and apparently it's gone)
Amazing stuff. Questions just started to pop like: what if, instead of turning on every digit, every other digit is the length? 3 angle, 1mm line, 4 angle, 1mm line, etc? The 1/7 pattern looks pretty too, like a snowflake ❄
Nice! Or instead use the digits of e.g. e for length, combining pi and e.
Not much changes, qualitatively. Rationals remain leading to closed curves, irrationals do not.
For rationals, every rational in your scheme has a rational in the original scheme that results in the same plot, and vice versa.
For irrationals, for large numbers of digits, the scale of the figure becomes so big you can't discern individual steps and then it all looks the same: random walks.
@@ambrosiustorgelspitter5913 That's even better mate. How close can we get to the Mona Lisa? 😅
@@landsgevaer actually, 1/43 goes in a straight line instead of a closed curve (I guess it happened to have a repeating whose sum of angles is 0) hahahah
@@rusca8 Yeah, I read that in another thread too, is correct. Base 2 stays on a line, haha
Matt is one of my new favourites!
...better than Matt Parker?
This plotting extravaganza follows on from this earlier video: th-cam.com/video/kMBj2fp52tA/w-d-xo.html
Hes boring
This is quite a work of art. I feel more moved by this math stuff than by the actual Mona Lisa.
Matt: I guess 119 is prime
All its non trivial divisors: Am I a joke to you ?
I mean, the Grothendieck prime is a thing :D
119 is in the middle of a pretty large prime gap. The previous prime is 113 and the next 127. 119 is quite a useful semiprime for doing things like working through a toy version of RSA.
He knows that many digits of pi, but he doesn't know 7x17.
It'S interesting how you remember different things based on your interests. This person remembers more digits of Pi, I remember that 119 is "First hard to spot not-prime". It's not divisible by 2/3/5, and it does not have "clue" it's predecessors have - 49 everyone knows and 77 is easy to factor. A also know that 10_ is always prime (that is 101, 103, 107, 109 are prime, others are even or end in 5), and 20_ is the first "decade" with no prime at all.
It would be great to do the pi base 4, but when 2 lines overlap they disappear,
Would be super simple to do. Just use an XOR pen. (Well, on a computer, not so easy on paper.)
??
This dude does the absolute coolest visualizations
The video series with matt probably is the most theurapetic ones in the numberphile's playlist
Don't forget Ayliean ;)
Someone please please pretend to send this man the number sequence to draw himself but actually send the sequence to plot Rick Astley for the ultimate Rick roll.
This is the path I follow when I return from college to my room.
The fast drawing sequencies are so calming with that music. Excellent video!
this is the type of thing i enjoy seeing... hidden patterns of math revealing themselves. This is surely a very powerful tool Matt Henderson has created for making discoveries about math and the nature of the universe. I would love to fool around with it and plug in some numbers myself.
This was one of the more relaxing videos I've watched in a while. Great stuff as always!
Top tier numberphile content
thanks
There gotta be a sistematic way to convert any plot into a number. Then its just about searching that number on PI
This was really beautiful to watch, its art to me
It's existence itself
Best part2 video in numberphile history!
This is so satisfying and calming to watch.
I love these kinds of videos where a complicated series of numbers or angles is visually represented. The Collatz Conjecture video from 2017 is another one of my favorites. Keep these coming Numberphile! Also, anything with Cliff Stoll I will like. He is cool squared.
These drawings are a perfect visual representation of how I see numbers!
To get a visible Mona Lisa, I think you'd need more than just the sequence of digits required to draw it - you'd also need to make sure you don't draw on top of it further down the line.
Yeah you'd need like a really long string of 0s before
which is impossible, since for every mona lisa drawn with pi, there is some sequence of digits that will eventually make its way towards the mona lisa and ruin it
The Mona Lisa would get drawn an infinite number of times so one would think there would be at least one that doesn't get covered.
@@alexboiiii Are you sure? That would mean if you let this program run forever every spot would be visited... although I'm not sure if that's true or not.
@@Pheonix1328 It doesn't mean that every spot would be visited. For example, using base 3 means you only visit the triangular grid -- none of the interior points of the triangles can ever be touched.
Matt seems to be a really kind guy, I love listening to his voice. Great work by all of you!
I like to think this as a function with the input is one real number and the output is 2d-picture (picture that was introduced in the video)
My conjecture was this: All rational numbers are produced shapes such as loop-shapes (shape that does have symmetry patterns like squares, triangular, pentagal, hexagonal...) and all irrational numbers are produce irregular shapes (shapes that doesn't have any particular symmetry patterns)
To show that the conjecture is false, either there's a rational number that can produced shapes that doesn't have symmetry or irrational that can produced shapes that does have symmetry
Did anyone else notice the bath in the background in Matt's office? Weird
Although 119 is not a prime number, its plot appears to say nothing about its factors. I wonder whether some other form of move-then-turn mechanism might quickly reveal at least some of a composite number's factors.
I doubt it, the plot is radically different for different bases so there shouldn't be any overarching meaning to any of it
@@Justin-tp1mx Indeed, but I don't mean just varying the parameters of this specific technique. Rather, I mean devising a different technique that reveals factors, perhaps irrespective of the base. I realize that my description is very vague, but that is why I posed a query rather than presenting a working mechanism. It's important to bear in mind, however, that factorization is in no way dependent on base, although expressing a number in a base that corresponds to one of its factors _does_ reveal that factor. For example, 119 in base 7 is 230, and the final zero means that 119 is divisible by 7. Similarly, 119 in base 17 is 70, which means that 119 is divisible by 17. (17 in base ten, that is.)
Wow, cool video! My guess is that almost every irrational number in every base will essentially produce a 2D random walk, which will eventually fill up any region. I believe this is true because almost every rational number is a normal number in every base, although in order to prove this conjecture, one would need to define what is meant by "random". I also believe that almost every irrational number will produce any pattern you like in every base, such as the Mona Lisa. In fact, if I'm not mistaken, this is true by definition for every normal number, since these numbers contain every possible string of digits in any base, which translates to every possible pattern. I also like the patterns produced by rational numbers, which are all necessarily finite and symmetric. It seems like one could write a research paper on these patterns!
The golden ratio has my vote for favorite turtle plot. Reminds me of trees with their leaves in full bloom!
Good sound editing. Makes it a really satisfying vid.
It immediately got weird when it started to look like a World MAP
true
The music of the calming and melancholic piano while on the context of finding Mona Lisa using a self-made computer code that generates an image just hits different to me.
After watching a bit of numberphile (and I do mean a little bit) I made my first mathematical paradox
Basically it's a rectangle that is limited on the X axis and infinite on the Y axis (or the other way around)
These are the parts to the paradox:
1- a vertical rectangle split into two right triangles and since the slope is infinite (not zero) it just creates two lines the triangles are impossibly thin (from our perspective at least) but still slanted either way
2- these impossibly thin triangles put back together would create a width that is wider then the two triangles combined should be
3- if you just given the two separated triangles without the width there's a one out of infinity chance you can guess the answer and get it right and zero percent chance you can actually solve it and it right
4- if we take one of the impossibly thin triangles and try to find the tan of the triangle ( infinity/N ) we gat a hypotenuse that is infinitely small while the leg is infinitely larger
Using this as a visualization of the difference between rational and irrational numbers is brilliant
One of the most beautiful videos ever.
Since both base 6 and base 3 in this type of plotting turn the plan into triangles I think it would be interesting to compare plots for the same number in each of those bases.
Matt's work in math is playful, yet it reveals deep beauty of mathematics
I vomited reading that
@@potatobutter141 glad I could help with your constipation
@@feynmandirac7575 wrong hole but thanks
@@potatobutter141 well topologically it's the same hole
@@feynmandirac7575 you couldn't be more right.
Reminds me of the large scale distribution of galaxies, with the dense walls and the voids.
You can easily work in reverse to determine which digits you need for drawing the mona lisa
I wonder... if you take the digits of pi, and for each even digit you move 1 step left, and for each odd digit, 1 step right.... will you eventually move an infinite amount in both directions?
assuming that Pi is normal: For every number N (that can be as large as you want) there exists a M so that after M digits you are N step to the right of your origin (and obviously the same is true for the left side). You will not reach infinity itself, but you will pass every point of the line at some time.
If the current assumption that the digits of pi are uniformly distributed holds true, you will move an arbitrary amount in each directionat some point. That means no matter how large of a number you choose you will at some point be further away from the origin then that number. On the otherhand you will never trend infinitely far in one direction because that would require that there are more even numbers than odd ones (or the other way around), which would violate our assumption of uniformly distributed digits.
Methinks that that would depend upon the ratio of even and odd digits of pi -- whether there's an equal number of even and odd digits or if there's a bias towards one or the other
@@nathanmcduck2999 "you will never trend infinitely far in one direction because that would require that there are more even numbers than odd ones"
I mean, you'll never trend infinitely far in any direction because at any point in time you've only moved a finite number of steps.
A visualization of a number like this is already (kind of) common in cryptography to get something a human might quickly recognize. So if a hash value of something known (like a certain remote computer's cryptographic id) suddenly changes, it might trigger a warning bell in the human who is always shown the visualization on each connection attempt.
The algorithm used there is called drunken-bishop and basically does a similar thing. Each digit determines a step in a walking path.
I think there's an easier way to send pi as an image. Like a drawing with a radius and a circumference would be enough info, like just send them a circle and two lines max
So many thoughts and questions. The golden ratios ones are definitely where youre going to find a mona lisa. Also, I actually tried something similar, with the turtle pen, where it draws in 3d space projected onto 2d. I used the fibonacci sequence to generate a list of directions. Was genuinely hoping it would draw the universe, no luck yet.
So here's a question. If you did a normal irrational number like Pi in base 4 (so that we're drawing on a tessellated grid), with an infinite-sized grid and an infinite number of steps, in the limit, would we cover every single grid-point? If so, would we touch every single grid-point with the same frequency?
I strongly bet "yes".
In 2d, random walks on a square grid are recurrent, i.e. guaranteed to revisit a starting point with p->1. That should nail it.
03:08 Definitely resemblances to the world map here. Very cool!
"Less interesting sequence would be just rational number"
And shows very interesting shape immediately.
Can we access this plotter?
couldn't sleep, so glad you just uploaded this for me to watch
Is there any way we can get his code? I want to try it out for myself.
The code is goimg to be easy to work out, what language is it?
@@mataloger pretty sure it's mathematica
Can you imagine if you plot some other universal constant like the Golden Ratio at some random base and the figure that shows up is a message or something 😳
I would have liked to see comparisons of rational approximations of pi like 355/113 to see if there's a pattern. Great video.
There was a 3blue1brown video about prime spirals that talks about approximations and their similarities. I think it was called Why do prime numbers make spirals? Or something
Considering that some of them tile the plane and can go over lines multiple times in whatever direction, can’t we conclude that there are an infinite set of values that will produce his face?
Thinking about the problem of finding a given image within a number, it seems like a deceptively simple question at first. Obviously you just look at it from an information theory point of view. The target image requires some number of bits to encode its information, the digits store so much information, so how many digits are needed to represent the image and how likely are we to observe a random sequence of digits that matches a target pattern of a given length? Of course you have to account for the fact that you don't really need to be perfect to loosen the criteria up a bit, and boom, you're done (with an analysis of how hard it is). Right?
Wrong!
There's no reason that any section of the formed image had to be drawn by consecutive digits, or even digits near each other. If we're guaranteed to completely blacken the paper eventually, then we are also guaranteed that any given sequence of digits would later be overwritten by another sequence of digits. So it's not just a question of where in Pi to look for the image, it's also a question of which range to plot. Perhaps you need to plot only a very small local section to avoid distant digits stomping all over your beautiful image. Or maybe you need to plot huge, gigantic sections so that you can draw your image in several parts.
It really is a fascinating rabbit hole to fall down.
Yeah, it's a really interesting problem. Even if you encode your picture as a subsequence and find it in the digits of pi, there's no guarantee that the canvas wouldn't be already drawn into or even completely blacked by the time the turtle arrives to start drawing your picture.
I wonder if the fact that pi is a normal number means not only that any sequence of digits occurs somewhere in its expansion, but that any NxM *picture* (consistent with the base and the plotting rules) can be found somewhere in its infinite plot, completely pristine as given?
This is like playing with a computer assisted etch a sketch but with an excuse. Absolutely loved it
I wonder how some music pieces would look like if the notes could be converted into a number string. Maybe base 12 and plot the semitone interval between notes. I bet bach stuff would look funky
Different dynamics could also change colour, or perhaps put it in 3d
This indeed definitely looks like a fun way to generate islands, continents, mountain ranges, for fantasy setting maps.
This guy is awesome
Could you theoretically pixelize or vector an image in a way that converted it into a string of numbers that would make that shape when input into this algorithm, and then search the digits of pi (or any other irrational number) to find that string of digits?
Can you add numbers together by just overlaying two plots that were done in the same base? I guess the first questions would be can you decode a given plot to get a number if you know the base?
The 10,000 digits of Pi looks like an awesome fantasy world map
As a musician, this reminds me of the (earlier) works of Iannis Xenakis (also a mathematician, philosopher and architect), which involve "arcs" which are notes which slide from one pitch to another (glissando). These form "clouds" of sound. The first problem with using this method to create music, especially in base 12 with arcs separated by 30°, would be that 12°clock and 6°clock would be straight up or down, and therefore not have any pitch vs time content. There might be two solutions: have the first direction at say 7°, then 37°, 67° etc, or have the straight up/down as unpitched percussion. The next problem would be the potentially huge numbers of performers needed, but that might be solved by making the piece a purely electronic one. See Xenakis: Pithoprakta (String orchestra) or his electronic works featuring the UPIC computer.
I'm thinking back to the Sierpinski triangle from earlier... There would be a number like this for base 6, which forever expands to larger and larger versions of the triangle. It should be easy to generate that number algorithmically to some finite number of digits.
The number would obviously be irrational, but it seems like it should also be provably transcendental.
Brady being impressed by somebody knowing 2 phone number's worth of PI is very cute
I love you used the brown paper for this
Do you know a simple proof of the following :
If a, b, and c are natural numbers, then the expression
4abc - b - c cannot be a square integer ?
Seriously though, I think you should introduce Matt to Neil Sloane and get them to start thinking of crazy ways to combine Matt's programming with OEIS sequences. And then we can watch it with intent the first time, and then fall asleep to both of their soothing voices from then on.
In this video: two dudes look at clouds
I’d do it all again.
Can't we just reverse the problem? Starting from the Mona Lisa, we draw lines to sketch it out and build up the number, for a given base ? Easiest would be to start with base 4 and a pixel art version of it.
They did draw a Mona Lisa but didn't explain how.
That would work, yes. There are infinitely many numbers that correspond to any given image (because two 180° turns are the same as not moving at all), but that just means you can't reconstruct the number from the image.
Seems like a sequence fit for OEIS
I like how humble he is, regardless of his intellect.
Normally those two qualities run apart instead of together.
He's what I call a puppy-person, lol. There's just some people who you can imagine being reincarnated *from* a puppy
Beautiful! But as an industrial guy, I keep thinking this little plotter needs some igus cable track for the wiring!
I'm going to make this myself to play around with. It seems really cool.
What language and system is it?
@@mataloger just using python. Going to also compute the numbers myself to the high precision needed for this.
Here is a question I am curious about: how does the size of the largest enclosed white region (as compared to the total area enclosed by the black lines) grow as you take the step size to infinity? Some of those white areas look pretty big, but that might be an artifact of early noise or something.
That is interesting!
It behaves like a random walk (except for some special cases, like in base 2, or for rational numbers).
So the root-mean-square distance from the starting point increases proportional to the number of steps, so the area of the region that is covered increases proportional to the number of steps.
Not entirely sure, but I suspect that the ratio of the largest enclosed region to the total covered region tends towards a constant.
Someone please plot this:
- Take pi in base 2. Have the current digit of pi be the first one.
- Have the turtle draw a segment 1 unit long.
- If the current digit of pi is a 1, have the turtle turn 90º to the right and draw a segment 1 unit long. If it is a 0, have it turn 90º to the left and draw a segment 1 unit long. Then select the next digit of pi as the current one.
- Keep doing this indefinitely with the following added condition: if, after turning, the turtle sees a segment at any distance (such that, if it kept walking in a straight line, it would touch that segment), have it undo the turn and keep drawing 1-unit segments in a straight line until it can turn again in the direction indicated by the current digit of pi without seeing any segments. When that is finally the case, turn in that direction and draw a segment 1 unit long.
This generates a clean path without superpositions.
The picture will start looking like huge squares/spirals. The distance of the turtle from the starting point then increases linearly with the number of digits, instead of as the square root.
Really cool. Here's a suggestion for a teeshirt. Choose a prime base like 11 so 1/p never ends for any prime and create a taxonomy of the first set of primes. The sequence of pictures may look quite intriguing.
In the turtle graph, for some values of fixed theta (like 1/1.01/1.02), the trajectory drawn is periodic. I would like to know how to measure how many steps are required to draw a single period by knowing a theta value.
After each step, you turn around the centre an amount equal to 180° minus theta (think of the triangle formed by connecting each end of a segment with the center). So for a Given theta, you must go around n turns, where n times (180°-theta) is a multiple of 360. The equation is (180°-theta)n = 0 mod 360
@@germaindesloges5862 thank you, i do not fully understand your answer, fortunately i already found a less refined solution. I would like you to clarify your method for me if you don't mind :)
Aww, this ended too soon!
Mesmerizing.
I’d like to see this plotted on 3D.
That was friggin' awesome, hypnotic
I would love a second part to this
Would be nice to know what music is used in this video? Quite calm and pleasant for study
Please a whole serie on this
What happened with the higher bases ? We need to do research on this, what about comparison between bases. We could increase the hue of a segment everytime it overlaps to see in colours
We could make a complexe number sequence out of it seeing where on the complexe plan each iterations lands. Then the complexe version of it ,with the imaginary and real digits being orthogonal ...
Such an emotionally exciting video! Loved it.
I want to build such a plotter-type device...the problem would be that if it was finished, i would spend my whole life generating lines and dots :D
That’s the thing about randomness. It’s lumpy!
- Simon P
I could do this for weeks on end. If this was a paying job I'd b the happiest geek on earth.
Math is beautiful. Thanks for sharing. We need to able to buy prints of these!
This is going to be my Saturday morning programming project.
Wow! I initially overlooked this video but decided to look it now. I have to say this is one the most fascinating videos in Numberphile!
It must be due to the simple idea of anyone being able to plot it, but even the most wise perhaps not understanding what it's going to look like. I mean that is there something out there? Are there patterns to be found or common themes across numbers? Can you learn something profound about numbers this way?
Anyone can be the pioneer! And that is awsome.