Hi there,
I guess that you should be a bit more specific about what you mean. Finding a formula that produces any given sequence of numbers is trivial, see:
http://community.wolfram.com/groups/-/m/t/320638
In fact it is easy to see that there is an infinite number of possible solutions. Heres is one. For any given sequence, e.g.
seq={26,25,192}
you can define:
f[list_List, t_] := Floor[InterpolatingPolynomial[list, t]]
That reproduces the entries of the input sequence and then calculates as many further entries as you wish.
Table[f[seq, t], {t, 1, 5}]
(*{26, 25, 192, 527, 1030}*)
It also gives you a formula if you want:
26 + Floor[(-1 + 84 (-2 + t)) (-1 + t)]
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:
FindSequenceFunction[{1, 1, 2, 3, 5, 8}]
(*Fibonacci*)
Another way to identify a common sequence is to look it up in The Online Encyclopaedia of Integer Sequences. Here is a function which does it for you:
identifySeq[list_List] :=
Module[{out}, serchstrg = StringJoin[Join[{ToString[list[[1]]]}, "%2C" <> ToString[#] & /@ list[[2 ;;]]]];
out = Import["https://oeis.org/search?q=" <> serchstrg <> "&language=english&go=Search", "Data"];
If[Length[out[[2]]] == 2, Print["No sequence identified."], Print[{out[[2, 3, 1]], ToExpression[StringSplit[out[[2, 3, 2]], ","][[1 ;; -2]]]}]]]
It gives two elements of output, e.g.
identifySeq[{1, 1, 2, 3, 5, 8, 13}]
gives:
{{ A000045 ,Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1. (Formerly M0692 N0256) , +20 3332 },{0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817}}
The first element gives a short description, e.g. Sloan's identification, etc. The second one is a sample of the sequence.
My function is certainly far from perfect and I suspect that the built in function does better.
Cheers,
M.