Could you find the equation that gives the following number sequence : 1, 4, 13, 40, 121, 364, etc.