That does also work for longer sequences, of course. It is easy to see that if you have a sequence of N numbers and you append another list of say M numbers to it you will get a different solution for different M-sequences. As M becomes larger you have more and more possible choices. As M tends to infinity you have an infinite number of different choices in fact; all of which will reproduce the first list of N numbers. So your function just like mine picks out one of these infinitely many possibilities. In what sense is yours special?
The most interesting task is not to find just any such function that generates that sequence, but one that in some sense is famous/known/“frequent”, whatever that means. Mathematica’s FindSequenceFunction does a very good job there:
Pretty lame compared to what you just showed me… wolfram returns 84n^2 - 253n + 195 - much more simple..
Which is much more simple than deviding by factorials, but I dont have a PRO subscription so I cant see step-by-step…
Thanks for enlightning me… And of course there are infinity options, because I always can add to the sequance another number that is different than the number it would have given me.