I\'m looking form a programatic way to take an integer sequence and spit out a closed form function. Something like:
Given: 1,3,6,10,15
Return: n(n+1)/2
I think your problem is ill-posed. Given any finite number of integers in a sequence with no generating function, the next element can be anything.
You need to assume something about the sequence. Is it geometric? Arithmetic?