Optimize Powers of 3 and above