Calculate Pi with Python

Intro to Computer programming worked at calculating digits of pi today. The actual algorithms aren’t too bad, but getting more than the standard number of digits from a double is a bit trickier. Here’s a program that calculates pi using: Bailey–Borwein–Plouffe formula Bellard’s formula and Chudnovsky algorithm Holy smokes is Chudnovsky algorithm’s fast! Plouff Bellard Chudnovsky Iteration […]

Powers of 2 without a Zero

2^86 is largest known pwr of 2 that does not contain 0.What about other digits?Does each non-zero digit occur inf often among the pwrs of 2? — James Tanton (@jamestanton) March 6, 2013 Interesting. The Intro to Programming Students gave a crack at this one; and after 30 minutes all were close and half had […]

Reducing Prime

Number theory nugget: 357686312646216567629137 is a prime number which remains prime after removing any number of digits from the left side! — Maths World UK (@MathsWorldUK) March 4, 2013 Otherwise known as left-truncating primes with every suffix prime and no digit are zero. Here is the whole sequence. It was proven that 357686312646216567629137 is the last […]

Oreo: Original vs. Double vs. Mega

[edit 8/20/13: New post with more data on the weights of Oreos and Double Stuf Oreos.] [edit 8/21/13: And Part 3.] Are Double Stuf Oreos really double stuffed? Some disagreement here: Chris Danielson in part 1 2 and 3 versus Chris Lusto in part 1 and 2. Enter in the Mega Stuf Oreo. Is the Mega Stuf double stuffed, triple stuffed, more???? […]