Possible Duplicate:
In how many ways can we colour $n$ baskets with $r$ colours?
There are n days and 4 types of dishes.Any 1 of 4 dishes is alloted to each day. And dishes of the consecutive days must be different.The dish of the first day and the dish of the last day must be different too.In how many ways can this be done.
For example,if n=2,then total number of ways is 4*3=12
if n=3,then total number of ways is 4*3*2=24
similarly for n=5,total number of ways should be 4*3*3*3*2=216 but 216 is not the correct answer,the correct answer is 240.What am I missing out here ? Please help.