top of page
Writer's pictureShashwat Sarawagi

2, 11, 101, 1009... hmmm, what comes next? An Online Encyclopedia of Integer Sequences


The legendary Neil Sloane

In one of the more mathy short-form content, I came across this amusing sequence: 1, 2, 4, 8, 16. 31. That is not a typo, it is indeed 31 and the video explored this odd situation. You take a circle, divide it using more and more line segments to then count up the regions making our sequence. Here's a quick run through using images for clarity:


With just one point, we cannot draw any lines, so we have one region (the entire circle),

With two points, we draw a line to divide into two regions.

With three points, we draw three lines forming four regions.

With four points and six lines, we have eight regions

Five points, ten lines, 16 regions

Six points, fifteen lines, 31 regions (31?!)

But I am not exploring this sequence in particular. Instead, I want to show you how I figured out the next few terms in this sequence without having to do the manual labour of another circle and drawing the lines. Introducing, the mathematicians' fingerprint database: The On-line Encyclopedia of Integer Sequence (OEIS).


How do you use it? See another example

Well, mathematics has a BUNCH of sequences. That means a wide range of patterns from geometric ones above to more complex, computer programmed ones. Here's another sequence I came across: 1, 0, 0, 2, 10, 4. This was the number of ways I could set up n queens on an n by n chessboard without them attacking each other. To demonstrate:


With 1 queen on a 1 by 1 board, there was just one option:

With 2 queens on a 2 by 2 board, I could not find any ways to set them up without them attacking each other. Similarly for 3 queens on a 3 by 3 board. However, with 4 queens on a 4 by 4 board, I had two ways of putting them together.




Soon, with 5 queens, I saw 10 ways of setting them up (one example below). This made me curious, but then how do you look up sequences?

This is when I came across a minefield of sequences. OEIS. I typed in my found sequence for queens and voila: It was as simple as that.


I plugged in my previous sequence from the circles too, and with no surprise but reasonable joy, this shows up:


I found the perfect sequence. That is the beauty of the OEIS. That is the goal of OEIS. Find the perfect sequence.


What is OEIS?

When you do mathematical research, as a formal academic or as a school student (IB students solidarity), you come across a lot of patterns. Historically, mathematicians spent a lot of brainpower and resources deciphering these sequences, possibly getting nowhere, even though some mathematician halfway around the world had already worked out the general formula for it.


N. J. A Sloane realised this. He put together, initially in print and shortly as a website, the Encyclopedia of Integer Sequences. Apart from its obvious functionality of inputting sequences to then output a list of potential matches, OEIS is a game-changer for a few reasons.


Beauty of the OEIS

You can pretty much find any answers you are looking for with regards to sequences (maybe some you have not even considered). How many handshakes can be made in a room of n people? See A000217. How many different ways can you put brackets around n letters? See A000108. What are the numbers of the jingle for a popular Ontario pizza chain's phone number (some sequences can get ridiculous)? See A157989. And so it goes on and on.


Wait, it gets better, you can HEAR the sequences. That is right, it lets you play the sequences as a sound file and you can "hear" the numbers. I know the file downloads as a MIDI File, but there are hundreds of online MIDI players and some are really interesting sounding sequences. Try out some random sequences (How do you think the Fibonacci numbers sound?). There are, naturally, some sequences that represent the classics: A123456 is Beethoven's Für Elise. This opens up an interesting avenue of encoding songs through numbers.


Bringing another dimension to sequences, Sloane also encoded graphical representations of sequences. These show scatterplots and bar graphs that represent the nth number through the height. Here's one of my favourites:


As a benefit, the website is extremely coder-friendly. For most sequences that have a general formula, the website gives a code snippet for common programming languages so one could incorporate these into their programs. You could try out the Sage language to query the database (see in bibliography).


Finally, the website is very comprehensively set up. It connects the same sequence's various applications across disciplines from chemistry to astrophysics and geometry to calculus. It has a very wide range of "comments" on each sequence that show the various applications of the same formula. Sometimes, an obvious series in mathematics might have a completely unrelated but equally fascinating application in chemistry that possibly has a connecting link. These are nuggets of fun-filled exploration.


The OEIS is the best database of sequences that is the brainchild of the mastermind, Sloane and his direct team alongside the various internet dwellers across the web that have contributed a gem to the mathematical community.


Conclusion

Honestly, the entire OEIS community is a thriving network of both: professional academics and hobbyists. They explore sequences and add entries regularly growing the potential of an expansive database. Maybe, you can find a sequence that is not on there? Or the next term of a sequence others are struggling to find? Maybe, give the question in the title a shot. Hop on and try your skill!


The best way, in my opinion, to explore the OEIS is through their random sequence generator that filters through a lot of sequences and gives you some interesting ones worth exploring.


Bibliography and Suggested Further Reading


94 views0 comments

Recent Posts

See All

コメント


bottom of page