in reply to Re^2: Challenge: Simple algorithm for continuing series of integers
in thread Challenge: Simple algorithm for continuing series of integers

Note that for any given series of numbers a1 .. ak there's a polynomial f(x) of degree less then or equal to k-1 such that f(1) == a1, f(2) == a2, etc. For obvious reasons, all the coefficients of f(x) are rational (otherwise, f(x) cannot be an integer for integer x).

Given that there's at least one function that uses only the given operations, and a finite number of such operations, there's also one that uses the smallest number of operators. But it's not necessarily unique.

I don't know whether this is helpful.

  • Comment on Re^3: Challenge: Simple algorithm for continuing series of integers