There are lots of ways of ways of fitting data to a member of a family of functions and lots of packages that will do the job. But that is not what you are asking. What you want is a method of identifying the pormula that produces the sequence: 1,4,13,40,121,364

Now such a formula will not be unique, but you can use the Online Encyclopedia of Integer sequences

CB