Random Fibonacci Numbers - Numberphile
Vložit
- čas přidán 7. 03. 2020
- Dr James Grime on random Fibonacci Sequences...
Extra footage: • Random Fibonacci Numbe...
More links & stuff in full description below ↓↓↓
Fibonacci Numbers in the Mandelbrot Set: • Fibonacci Numbers hidd...
More James Grime videos: bit.ly/grimevideos
Our podcast interview with James Grime:
• The Singing Banana (wi...
or apple.co/2HsUMKb
James Grime website: www.singingbanana.com
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 Math For America - www.mathforamerica.org/
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 - Věda a technologie
Extra footage: czcams.com/video/F0C4U7Q5yXU/video.html
Fibonacci Numbers in the Mandelbrot Set: czcams.com/video/4LQvjSf6SSw/video.html
More James Grime videos: bit.ly/grimevideos
I find your videos really fascinating
Welcome back Dr. Grime. Hope you're well. Have a great start into the coming week :)
Bro I got an idea if any prime number squared itself and subtract 2 can be a prime.
(Prime)^2-2 =may be prime
which video did that framed brown paper come from?
How about a link to the paper?
Every year, I throw a fibonacci party.
Each party is as big as the last two combined.
Rohan Sastry lol
I do the same, but the first two had zero attendees so I'm not getting anywhere :(
@@miramosa7768 You take the factorial of them and proceed ;)
@@miramosa7768 You didn't show up to your own party?
XDDD
I'm a simple man. I see James on Numberphile, I'm in.
Came scrolling here for this
I see a new Numberphile video and I'm N 😋
Me too
@@TheExoplanetsChannel me to also.
I signed in to like this comment
James Prime is back 🙂
He's in his prime.
Yay
yeah what had happened with that?
Prime is my ship name for Parker + Grime. It's the perfect mathematical ship (of Theseus).
false.
the way he said "do you wanna hear about applications of fibonacci sequences?" at the end was so precious
And I am wondering why he isn't calling it 'RANDOMACCI NUMBERS'!
Fun fact: The author of the paper at 9:20 discovered a proof that there are infinitely many primes using basic topology.
A proof that there are infinitely many primes ysing basic TOPOLOGY? I need to see this!
No Idea Yes, a proof that there are infinitely many primes using basic topology. You are correct
No Idea Yes! Look up "Furstenberg's proof" on Wikipedia. You'll need to know the definition of a topology.
@@johnchessant3012 is there a proof that there are infinitely many primes using basic topology?
Read it. Neat
James on thumbnail = instant click
Me tooooooooo! Hahaha
Yaaasss😂 Why do I find this so fascinating 😅
Agreed
Yes
??
I was about to say something funny about this but then I tried it, and it's actually impossible for the sequence to have 2 zeroes in a row, because there will always be at least a 1, 2, -1, or -2 somewhere behind or in front of the zero due to zero not being able to change the value of the previous number in the list to zero since the sequence starts with 1.
Oh well, I guess there CAN'T be a list that's a few numbers then just infinite zeroes...
a slightly higher level explanation of this: the vector (a_n, a_(n+1)) is the product of a 2x2 matrix A = (0, 1; +1 or -1, 1) by the nonzero vector (a_(n-1), a_n). Since A is invertible, the result can never be the zero vector
Unless it's all zeroes.
Easier: Two zeroes in a row would mean the number before those were a zero and the number before that was a zero and so on...
@@alvarol.martinez5230 Wow, beautiful explanation. Thanks!
Álvaro L. Martínez as someone who is just learning linear algebra rn my mind is blown. I thought matrix algebra was just a boring strategy to compute stuff but once again math blows my mind
i haven't checked this channel in a long while (a few years) and i'm glad to see james is still doing videos with you. he was my favorite part of your channel back when i watched your videos regularly
Surprised James didnt say anything about the 1/sqrt(5) in the first few minutes. It would have made his approximation extremely accurate.
(1+sqrt(5))/2*
@@kaaiplayspiano7200 probably I should have clarified, because I assumed everyone knew this. The formula for large n for fibonacci is phi^n/sqrt(5). If you watched the first few minutes of the video, then there is a moment when he takes Phi to a power and compares it to the actual value and then hand waves the differences although notes the magnitude is the same. That's what would have been a lot closer if he divided by root 5.
@@fmakofmako it took me a bit to figure out what phi was. Also, for that you need to round to the nearest integer.
fmakofmako it works perfectly!! Now, im wondering if the 5 from sqrt(5) may have any relation with the golden ratio that appears in PENTAgons (i dont remember in which exact video i saw this). I might be setting my expectations a bit too high on this one, but who knows??!! 🧐🧐
@@luisliquete9027 I assume the square root of 5 is coming from the fraction representation of the golden ratio, which (1+sqrt(5))/2
The “almost surely” looks a lot like the “almost all” in the video about how almost all numbers contain the digit 3.
That was some exemplary handwaving, I hope the original paper is more rigorous.
@@karapuzo1 Actually, something happening "almost surely" is a rigorous mathematical phrase. It means the odds of it happening are 100%. Even though it is somewhat counterintuitive, this is not the same as saying that it will always happen, hence the "almost".
@@calculator7774 Yes, I am aware. This still requires rigorous proof that the probability of the examples where the ratio does not converge is 0.
"Almost all" in terms of real numbers means that the set of counterexamples have a measure of zero. Since probability theory is usually formulated in terms of measure theory too, I suspect the analogy is that "almost surely" means that the probability measure of the inverse statement approaches zero?
@@OlliWilkman If the cases in which it does not converge to Viswanath's constant are those and only those with patterns, those can be equated to rational numbers in binary, which have measure 0 in the set of the reals ("all" random binary digit numbers between 0 and 1)
Audrey: 🐶 *casually enters room
James, excitedly: *Do you want to hear about applications of the Fibonacci sequence?*
.
??
9:53 I love that they defined an IEEE double float in a mathematical paper
"Nobody will make a computer simulation."
I'll take that as a challenge.
I got some results:
I did 45000 random sequences, and ended up with 0,98721748
It seems like 64 bits are not enough for enough terms, and enough precision for calculating averages
And I can't be bothered to code more.
BUT! While doing that I figured out some cool identities:
( F(2^k) )² + ( F(2^k+1) )² = F(2^(k+1)+1)
F(2^k) * (2*F(2^k+1) - F(2^k)) = F(2^(k+1))
Example:
(F9)²+(F8)²=F17; F8*(2*F9-F8)=F16
Where Fn is the nth Fibonacci number, of course
how did you do the program, I was going to start when I realized the second I try to find the value of something divided by 0 the program will crash
@@giladkay3761 Why would you divide by zero? You can use the nth root. Also, you can check if the value you're dividing by is zero before doing so.
Is it the nth term, nnd term or nst term?
@MauLob, Would you reckon 128 bits are enough? How many bits do you think are necessary?
@@DehimVerveen I do not know. With 64 bits you can, worst case, only get to about 90 terms. With 128 terms you could do a little more than double.
For the normal fibonacci sequence, 90 terms is enough to hit the golden ratio with double precision.
However, I am starting to think that the problem is not integer over/underflow, but floating point precision.
And at that point, I have absolutely no clue.
I see the word “random” and James, I click instantly.
it had me at Fibonacci
Why. James is not just a random guy :D
I see Euler, I like instantly.
Jay N Who?
Jay N but not as proficient.
Yes!!! Please *MORE JAMES GRIME* & *MATT PARKER* & *TONY PADILLA* !!!
*& Hannah Fry & Tadashi Tokieda & Cliff Stoll & Holly Krieger & Simon Pampena & Zvezdalina Stankova & Ben Sparks & ...*
Yes!
Was just watching James Grime! Always look forward to his videos :>
For a moment I thought there was some likelihood of getting a tail of all 0s. Because James only needed to hit 0 once more, and after that he's always adding or subtracting two 0s and getting 0. But on reflection, that's impossible. Once you have a nonzero X followed by a 0, the next one is either X or -X and never 0.
oh that’s fascinating! i thought it would end up as 0,0,0,... too.
You're moving into the ratio of what defines a dimension
To get a (random) sequence of this in excel: Put 1s in cells A1 and A2 and put "=A1+A2*(-1)^round(rand(),0)" in A3 and pull it down.
What I have been thinking while watching this video is: what would happen if the probability between getting a plus or a minus is not 50:50?
I think that will be interesting to find a formula/algorithm to find what number the growth rate approach depending on the probability.
This vid is just like classic Numberphile. James Grime, brown paper, and no fancy graphics with silly sounds. Thumbs up. :)
I’m curious as to whether or not the growth rate is transcendental or algebraic for the random Fibonacci.
Damn Dr. Jimmy hasn’t aged a day in 10 years
Fun fact: The nth Fibonacci number is given exactly by rounding (phi)^n / sqrt(5).
Ah, yes. Of course you can exactly figure out what the answer almost is.
@@shambosaha9727 no, you can figure out what it is EXACTLY. It's (phi)^n / sqrt(5) rounded to nearest whole number
@@andywright8803 But you're still rounding
Yeah, but (phi)^n/sqrt(5) isn't exactly F_n. The closest integer to (phi)^n/sqrt(5) is exactly F_n
@@CauchyIntegralFormula That's what I said.
Divakar Viswanath
It's rare to see a Mathematician with an Indian name on Numberphile. And I'm happy to know about his finding 😊
You mean any Indian mathematician besides Ramanujan. That guy really made his impression in the mathematical world.
and an awesome sounding name on top of that
And what about Kaprekar who gave the Kaprekar constant?
@@harikishanrakhade6108 alright calm down this isn't a contest
Off the top of my head I can think of Bose (Bose-Einstein distribution), Chandrashekar (white dwarfs), Varadarajan (supersymmetry) and Agrawal (AKS primality test). India is rightly celebrated for the calibre of mathematicians it turns out.
I've been binge watching the James Grime playlist
I love his passion and his way of communicate things
Love the Grahams number paper on the wall :)
Yay!! A Grimy video!!
Love James Grimes!
He's back... Love his passion
Are those framed pictures in the background (which has been standing on the floor for many years, it seems) ever going to be hung on a wall? That's what I want to know.
Love your videos as always!
I could listen to James explain anything for hours.
I love how "almost surely" is a techincal mathematical expression. Great vid as usual!
I swear if JG was my math professor, I would be front row, every clad and turn in every assignment.
0:08 "We have to recap the Fibonacci sequence first". Didn't Numberphile do hundred of videos about this sequence, did it?
Alain Rogez
Just in case this is someone’s first Numberphile video about Fibonacci numbers.
Each Numberphile video about the Fibonacci sequence is equal to the sum of the previous two
James is so amazing!
This Viswanath’s constant kind of reminds me of Mills’ constant θ, being hard to calculate and also being based on integer sequences.
You can also apply this random fib sequences to one dimensional random walks of particular step patterns rules. Pretty cool stuff 👍
Good to see Dr. Grime is still alive... haven't seen him in a while lol
That is the most beautiful shirt he has ever had 😮
Feels similar to a 1D random walk, but random walks are usually just 1 unit.
It's amazing how quickly Fibonacci tends towards the Golden Ratio: 1, 2, 1.5, 1.667, 1.6, 1.625, 1.615...
google binet's formula if you wanna see why
yes, because the growth is exponential
pick 2 random numbers and use them as your starting point, then do the same thing as you would do in the fibonacci sequence, it will still converge to the golden ratio.
It actually doesn't approximate it all that quickly. The golden ratio has the simplest continued fraction, making it the most irrational number.
To those writing programs: Look at the expression at time 6:45. |R_n|^(1/n). I believe this is what you want to average. By averaging this over many random series, already with n=40 you should get around 1.125. Going up to n=1000, the result is starting to look familiar: 1.13174.. (400000 series averaged).
7:45 is a little misleading. "Almost surely" means the probability is _exactly_ 100%, not "almost" 100%. The catch is that, for infinite sequences of events, 100% probability ≠ guaranteed.
Aaron Rotenberg
This is explained very well in “3 is everywhere”, one of the first videos on this channel.
I was thinking of the explanation involving a dart board that explained some things are "possible but have 0% probability." *brain starts smoking*
James Grime yessssss
Is there a curve to know what’s the ratio for any randomnacci sequence (i mean for the regular fibonacci it’s (0;1)->1,6180339887... and for (0,5;0,5)->Viswanathan’s constant) and we can try to understand the pattern and maybe find a formula for these constants
You have to divide phi^1000000 by sqrt(5) to get the 1000000th fibonacci number. (By an error of only 0.618^1000000, so the formula gets extremely accurate!)
"And thats as far as we got" - - Amazing ending, for a moment I thought he was going to say they discovered hundreds more digits!
The fibonacci number Fn = (φ^n + φ'^n) /sqrt(5), where φ/φ' = (1 ± sqrt(5))/2. This is the exact formula
Correction
The nth term of the Fibonacci sequence is φ^(n-1)
Fibonacci series is also known as Hemachandra series in India since Hemachandra proposed this series very much earlier with fantastic application in music and architecture of statues.
1, i, 1+i, 1+2i, 2+3i, 3+5i, 5+8i....creates 2 fib sequences simultaneously as the real and imaginary parts follow the fib sequence. this could be seen as the sum of 2 separate fib sequences, fib real+fib imaginary which is (f_n+1)+(f_n+1)i=((f_n-1)+(f_n)+(i*f_n+1)+(i*f_n)). The cool thing about this is we get a+bi format which can be represented as re^i*t and the limit of the respective sequences is phi and i*phi so we have a system that combine 3 of the most important constants in math phi, e and i.
Yay!!!! Hi Dr James, great video
Has this something to do with kolmogorov's zero-one law? Is the radius converging to a given value a tail event?
I wouldn't be surprised. I would expect an argument to go something along the lines of how a Fibonacci series with any starting pair of whole numbers would tend towards the golden ratio, and then use that to justify how the end ratio would be independent of the initial terms.
It makes intuitive sense that the sequence will (almost) always grow because only very specific patterns will keep the values low, and if the values ever get larger, they compound. So only a tiny sliver of the possible results don't result in growth.
Apparently i am the thirteenth viewer....
I wonder where the 1st, 1st, 2nd, 3rd, 5th and 8th is?
7290 here
Because having two people who are "first!" is just normal.
Tehom it really is, though with the number of people exclaiming “First” in comment sections these days.
:O
Your comment had 89 likes before I got to it
What if the chance of a + was 2/3 and - was 1/3? What would the new growth rate be? Is there a way to generalize the growth rate for different probabilities?
This concept of quasi certitude is interesting from an epistemological point of view.
Never heard of it before, yet it's quite intuitive.
6:55 What's the back story behind this pigeon?
No. phi^1000000 gives the 1000000th _lucas number,_ not fibonacci number. In order to get the fibonacci number, you have to divide by root 5.
Your comment isn't completely correct
phi^1000000 isn't equal to the 1000000th Lucas number, it gives the 1000001th Lucas number instead.
1.618 x 1.618 x 1.618 x 1.618 for example, doesn't give as result the fourth Lucas number, but the fifth.
So in order to get the 1000000th Fibonacci number, you need to divide the 1000001st Lucas number by √5.
Your asnwer is true only if we assure that 0 is included in Fibonacci sequence (but the video doesn't include
it).
This is not correct. phi^1000000 is L_1000000 - phi^(-1000000) which is approximately L_1000000.
Do we know if the number is algebraic or transcendental?
This makes so much sense
coding this up in python with matplotlib was so fun. thanks for this.
Can you use this as a measure to quantify how "random" a random generator can be?
In theory, yes. In practice... there are tons of ways to do that, and a lot of them can pick up a lot finer patterns.
How would you calculate the variance (as a percentage) of the mean absolute value of the 1,000,000th randomized fibonacci number? I have a feeling this is going to involve probability generating functions.
I find it most interesting that the sequence forks between positive or negative and will follow a channel along one leg of the V. I would have been curious to see what the odds are that it would switch sides as n grows larger.
I can't decide if James or Holly has the most infectious enthusiasm for math.
2:16 Of course, it has to be a rough estimate; since, for any finite n (i.e. any n that you can actually pick), F(n+1)/F(n) ≠ φ. That’s, because φ = (√5 + 1)/2 is an irrational number, and F(n+1)/F(n), by definition, is rational.
How about a histogram depicting the possibilities at the nth iteration?
Played around with this in a spreadsheet (yeah I know) and was fascinated how incredibly variable these can be in how quickly these blow up from one run to another...
I was just wondering, what would happen if we'd gradually modify the probability of the occurrence of the operators (eg.0.6, 0.7,...) . Would we get some other constants? And if so, is there any relationship between these constants?
I’m going to code this :D
Give us some examples of what you get for n=1999,999 and 200,000 and how close it is to the constant!?
@@gonzalogarcia6517 bro what are you on about
@@gonzalogarcia6517 * visible confusion *
@@gonzalogarcia6517 this comment is pristine
**shook**
So you should be able to discern whether a growth pattern is natural/random or artificial/manufactured by comparing which growth curve is actually followed?
Does the sequence hower around ± constant^n or is that just the magnitude of the peaks? I would imagine that it howers around 0 the entire time.
8:53
There's your answer
I wasn't sure at first, but you're right. The sign is expected to change frequently, regardless of the magnitude. If the previous two terms are a and b and two consecutive minuses appear, the next two become (b-a) and (-a). That has a 1-in-4 chance of occurring for any given pair of consecutive terms, so it won't ever settle on either sign (almost certainly).
Great to see the enthusiasm. The problem is captivating. I would have liked more detail about the proof but maybe it’s just too hard!
Fibonacci ; I can do this all the day
I have a question related to this and another one of your videos
In one video you showed up that no matter with which numbers you start if you stick to the fibonacci sequence's rule, you will still get the golden ratio.
My question is: does it work with random fibbonacci too? Do you get the same ratio?
I ran this in a script, and picked the numbers 54 , 78 as starting points and the ratio still seemed to converge towards 1.131
Wish they would have more formally mentioned:
Fib(n) = Round(Phi ^ n / Sqr(5))
which gives the nth Fibonacci number.
round() is a python function.
@@bobbycraig2583 It is not just a python function, it is a function in almost all programming languages [in one form or another], the point is that it is the common round function/procedure which in text is hard to represent the mathematical symbolism in an unambiguous way, so by representing it as a function called "Round()" is the simplest most unambiguous way to represent it.
@@jillkitten5388 i know but i only know python. i use [ ] to show rounding
after coding this and running the numbers, I can reasonably assume that these sequences almost surely switch signs just shy under a fifth of the time
could only do this until roughly the 6000th's random Fibonacci number, after which the numbers get so big R refuses to give proper results
I wish James Grime was my math teacher at school.
I used to code all sorts of fun graphics simulations with fibonnacci when learning python. You can print out very complex patterns and shapes by applying fib sequence or phi in various ways. For ex. combining fib with modulo operators or Egyptian fractions. I'm not a mathematician so I don't know the theory, but I would draw out many strange patterns within Fibonacci using computer graphics.
It would be interesting to see what the ratios are when we change the probability, say x% for getting + and 100-x% for getting -
Can you please make a vedio to explain why X^n+X^n=a tends to a square as n tends to infinity.
2:23 The approximation with F can be a lot more accurate. Phi^x becomes proportional to the golden ratio, but doesnt approach it. If you multiply by (phi + 2) / 5, the approximation will be incredibly close.
Isn't it growing because we start from the +1? Maybe the reversed procedure witha start point will produce a lowering tend
Hello Numberphile team, could you make a video about "minimal covering of pairs by triplets" may be work your way up to "minimal covering of pairs by octets".
A fun puzzle with Fibonacci numbers. If you take the Fibonacci recurrence and start with two positive numbers, it goes to infinity. If you start it with two negative numbers it goes to zero. However there are numbers you can start the sequence with and have it go to zero. Finding them is a fun way to practice computing recursion limits.
Very interesting. If the terms are all one, this is essentially a random walk. By a vague argument of similarity, it seems like the length in this case should be [some constant] ^ N. However it turns out to be N ^ (0.5) .
Its the original singingbanana. We are blessed.
So any binary number can be made into one of these sequences. And each number has a growth ratio (if you take the rear most element or the moving average).
That means you can map integers to real numbers? But you can't as every integer has a limited number of binary digit so it's not an infinite sequence. But if you inverse numbers, you can map reals to reals using this and find some interesting bits of bijictives.
5:28 great name! reminds me of Ben Finegold xD
it turns out that, if you continue this sequence a million times, you get Vishwanathin' :P
I THINK YOU WERE LOOKING FOR AN AGADMATOR VIDEO
Hey, I really want that portrait of the pigeon in the background, what’s it called and who’s it by?
Does James have the brown paper from Ron Graham explaining Graham's Number framed on his wall? Or is this not filmed at James's place?
I still wanna know about that pigeon photo!
Easily the most mindblowing fact in this video to me is that 1999 was twenty years ago...
what if we use only -, could we get the oppostite of the golden ratio?
In the computations how did they guarante that the plus and the minus were randomly chosen? Like how does a computer decide what's random?
Did you forget to divide by root5 there at the beginning?