~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Sequences to Functions / 2010-10-31
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-

One bit of algebra that particularly fascinated me in high school is the theorem that for any set of N points in the cartesian plane with distinct x values, there is a polynomial curve with degree at most (N-1) that passes through each of them. For a set of points, you can find the relevant polynomial using a system of N equations with N variables.

A quick corollary is that for any finite sequence of N integers, there is a polynomial function which for input (1,2,…,N) produces that sequence.

A friend of mine is teaching high school math and seems to be on a somewhat related topic, so I made a little interactive doo-hicky that takes an input sequence and computes the polynomial function.

One thing I didn’t anticipate is that it looks like the resulting functions always map integers to integers. This certainly doesn’t seem obvious to me, and I don’t know how I would go about proving such a thing. I’m sure that if it’s true, it’s already been proven, likely hundreds of years ago. But it’s strange that I’ve never heard of it.

--------------------