The increasing sequence 1,3,4,9,10,12,13, \ldots consists of all those positive integers which are powers of 3 or sums of distinct powers of 3 . Find the 100^{\text {th }} term of this sequence (where 1 is the 1^{\text {st }} term, 3 is the 2^{\text {nd }} term, and so on).