Pythagorean Triples

24/11/2015

The Pythagorean theorem, linking the sides of a right triangle, is one of the most useful basic mathematical identities. It is also one of the more entertaining. Loomis, in his book The Pythagorean Proposition (1968), gives 370 different proofs of the theorem. However, we’ll more often interested in computing the length of the hypotenuse, or finding triples—three natural numbers that makes the theorem hold—than finding a new proof for it.

There is, of course, the smallest possible triple (defined as involving the smallest possible numbers) 3, 4, 5. But there are infinitely more triples. Let’s see how we can generate them.

Read the rest of this entry »


…And a Good One (Hash functions, part VI)

17/11/2015

In the previous entries, we learned that a good hash function for look-ups should disperse bits as much as possible as well as being unpredictable, that is, behave more or less like a pseudo-random number generator. We had a few failed attempts, a few promising ones, and now, a good one.

Read the rest of this entry »


Rational approximations of π (Divertimento)

10/11/2015

While reading on the rather precise approximation 355/113 for π, I’ve wondered how many useful approximation we could find.

pi-pie

Read the rest of this entry »


Busy doing Science

03/11/2015

Sorry, no entry for this week… I’ve been busy doing science ¯\_(ツ)_/¯