My first sequence predictor, written in C, could detect 5 types of sequences (arithmetic, geometric, fibonacci, quadratic, linear) and 3 types of numbers (triangular, square, cube). I have now added tetrahedral sequences and prime numbers. You can view the code here.

It is worth noting that all these sequences can be detected in both ascending and descending order.

The code contains at least one data sample per sequence. There are also a few SoloLearn challenges in there that I am still working on resolving programmatically.

The trickiest sequence type seems to be quadratic. A small sampling of a sequence might make it seem quadratic, even though a larger sampling would prove that it isn’t. I’ve already thought of a way to resolve that, and I’ll unveil it along with the next revision.