March 10, 2010

Deciphering Integer Sequences

Regularly compiling the NumberADay blog for the MAA website has made me more aware than ever of how much we are surrounded by numbers, from street addresses and highway signs to serial numbers and other identifiers. Curious sequences of numbers may also pop up unexpectedly.

While visiting Madison, Wis., for example, I happened to notice that each bus shelter lists, in numerical order, the numbered bus routes serving that particular stop. I couldn’t help wondering whether a given list of numbers has any mathematical significance.

Many bus lines serve this stop near the state capitol in Madison, Wis.

To find out, I turned to one of my favorite resources on the web: Neil Sloane’s On-Line Encyclopedia of Integer Sequences (OEIS). Sloane has spent more than 40 years amassing a vast database of known integer sequences, now totaling close to 200,000 entries.

Entering the sequence 2, 3, 4, 6, 7, 8, 11, 12 in the search box, for example, yields five results—known sequences that contain this particular string of consecutive integers. One is the sequence defined as follows: If n is in the sequence, then so are 2n and 4n – 1. Sloane’s entry provides information on how that particular sequence arose, along with comments, formulas, references to the literature, links to other websites, related sequences, and computer programs. You can even graph or listen to it!

However, if I were to extend the sequence by one term, adding 13, no match turns up.

Bus shelters in different parts of town are sure to show different sequences, so I’m now tempted on my next visit to Madison to collect more examples, just to see what sorts of integer sequences come up.

I also use Sloane’s database to find interesting properties of individual numbers, just by entering a single number in the search box. Entering 2658, for instance, generates 42 results. One result reveals that 2658 is the number of 8-digit numbers in base 6 with adjacent digits differing by 1 or less. I’m not sure why anyone would want to know that, but there it is.

Sloane was at the Joint Mathematics Meetings in January, promoting the transition of his indispensible database from essentially a one-man operation to a wiki format at, giving each sequence its own web page. A board of 50 associate editors will moderate submissions, relieving Sloane of much of the burden of checking new sequence submissions, which come in at a rate of more than 50 a day, and making all the necessary changes to web pages.

Sloane has set up the non-profit OEIS Foundation as owner of the database.


Cipra, B. 2010. What comes next? Science 327(Feb. 19):943.

Peterson, I. 2003. Sequence puzzles. Ivars Peterson’s MathTrek (May 19).

______. 2002. The EKG sequence. Ivars Peterson’s MathTrek (April 8).


Adriana said...

Your blog is soooo interesting, just found it yesterday doing some research on fractals. is good that you are there

Pacha said...

Dear Mr. Petersen,

I have also looked at the bus numbers at bus stops in the Seattle area. But the problem here, the metro seems to change some of the numbers of buses or discontinue running them if the numbers of passengers taking a specific bus drops below a critical value. So, at least in Seattle, the bus numbers change frequently at some bus stops.