Blog Archives

Synchronizing cicadas with Python

Suppose you want to know when your great-grandmother was born. You can’t find the year recorded anywhere. But you did discover an undated letter from her father that mentions her birth and one curious detail:  the 13-year and 17-year cicadas

Tagged with: ,
Posted in Math, Python

Searching for Perrin pseudoprimes

A week ago I wrote about Perrin numbers, numbers Pn defined by a recurrence relation similar to Fibonacci numbers. If n is prime, Pn mod n = 0, and the converse is nearly always true. That is, if  Pn mod

Tagged with:
Posted in Math

Almost if and only if

The Perrin numbers have a definition analogous to Fibonacci numbers. Define P0 = 3, P1 = 0, and P2 = 2. Then for n > 2, define Pn+3 = Pn+1 + Pn+0. The Concrete Tetrahedron says It appears that n

Tagged with:
Posted in Math

Finding 2013 in pi

My youngest daughter asked me this morning whether you can find the number 2013 in the digits of pi. I said it must be possible, then wrote the following Python code to find where 2013 first appears. from mpmath import

Tagged with: ,
Posted in Python

Equivalent form of the Riemann hypothesis

The famous Riemann hypothesis is equivalent to the following not-so-famous conjecture: For every N ≥ 100, | log( lcm(1, 2, …, N) ) – N | ≤ 2 log(N) √N. Here “lcm” stands for “least common multiple” and “log” means

Tagged with: ,
Posted in Math

Digits in powers of 2

Does the base 10 expansion of 2^n always contain the digit 7 if n is large enough? As of 1994, this was an open question (page 196 here). I don’t know whether this has since been resolved. The following Python

Tagged with: ,
Posted in Math, Python

Open question turned into exercise

G. H. Hardy tells the following story about visiting his colleague Ramanujan. I remember once going to see him when he was ill at Putney. I had ridden in taxi cab number 1729 and remarked that the number seemed to

Tagged with:
Posted in Math

ABC vs FLT

There’s been a lot of buzz lately about Shinichi Mochizuki’s proposed proof of the ABC conjecture, a conjecture in number theory named after the variables used to state it. Rather than explaining the conjecture here, I recommend a blog post

Tagged with:
Posted in Math

Sociable numbers

A number is called perfect if it is the sum of its proper divisors, i.e. all divisors less than itself. For example, 28 is perfect because 1 + 2 + 4 + 7 + 14 = 28. Amicable numbers are

Tagged with:
Posted in Uncategorized

When do binomial coefficients have integer roots?

Binomial coefficients are hardly ever powers. That is, there are strong restrictions on when the equation has integer solutions for l ≥ 2. There are infinitely many solutions for k = 1 or 2. If k = 3 and l

Tagged with:
Posted in Math

Polynomial determined by two inputs

Suppose p(x) is a polynomial with integer coefficients. If all the coefficients are non-negative, I can tell you what p(x) is if you’ll tell me the value of p(x) at just two points. This sounds too good to be true.

Tagged with: ,
Posted in Math

Narcissus prime

This morning Futility Closet posted the following. Repeat the string 1808010808 1560 times, and tack on a 1 the end. The resulting 15601-digit number is prime, and because it’s a palindrome made up of the digits 1, 8, and 0,

Tagged with: ,
Posted in Math

2012 is prime …

… as a base-three number. 2012 in base 3 is 59 in base 10. 2012 is also prime as a base-five number. Update: Here’s some Mathematica code to find other bases where 2012 is prime. f[n_] := 2 n^3 +

Tagged with:
Posted in Music

Fermat’s unfinished business

Fermat’s last theorem is so named because it was the last of his asserted theorems to be proved or disproved. But there are variations on another conjectures of Fermat that remain unresolved. Fermat conjectured that numbers are always prime. We

Tagged with:
Posted in Math

Richard Feynman and Captain Picard try to prove Fermat’s Last Theorem

In 1989, Star Trek: The Next Generation aired The Royale. In this episode, we learn that Captain Picard tries his hand at proving Fermat’s Last Theorem (FLT) in his spare time. The writers must have believed that FLT would still

Tagged with:
Posted in Math