## Posts Tagged ‘fibonacci’

## Happy Pi Day 2016!

Has it really been a whole year?

On Pi Day 2015 hack-r.com posted a tribute to Pi (π) Day, published on GitHub, wherein we created fractals in R based on π, scraped and displayed information on Pi and other fun stuff.

This year, find out how Fibonacci numbers, which are sequences of *integers, *have a freaky relationship with π! View the entire script on GitHub.

# Pi Fibonacci Sequence --------------------------------------------------- cat("This year, we'll look at the relationship between Pi and Fibonacci sequences. \n") cat("Until very recently there were just two methods used to compute pi (π), one invented by the Greek mathematician Archimedes, and the other by the Scottish mathematician James Gregory. \n") cat("If we use Sir Gregory's arc tangent method, you'll notice a pattern...") pi/4 atan(1) pi/4 == atan(1) atan(1/3) atan(1/5) + atan(1/8) atan(1/8) atan(1/13) + atan(1/21) cat("We can combine what we saw above") pi/4 atan(1/2) + atan(1/3) atan(1/2) + atan(1/5) + atan(1/8) atan(1/21) atan(1/34) + atan(1/55) cat("You'll notice that the pattern is a Fibonacci sequence! \n") cat(" We have just seen that there are infinitely many formulae for π using the Fibonacci numbers!")