3 hundred sixty four is the answer
1st = 1
2nd = 1x3+1
3rd = 4x3+1
4th = 13x3+1
5th = 40x3+1
so
6th = 121x3+1 = 363+1 = 364