Rastući niz brojeva

sastoji se od svih potencija broja

i zbrojeva različtih potencija broja

. Nađi

-ti član niza.
The increasing sequence of numbers

consists of all powers of

and sums of distinct powers of

. Find the

th term of the sequence.
[lang=hr]
Rastući niz brojeva $1, 3, 4, 9, 10, 12, 13, \ldots$ sastoji se od svih potencija broja $3$ i zbrojeva različtih potencija broja $3$. Nađi $100$-ti član niza.
[/lang]
[lang=en]
The increasing sequence of numbers $1, 3, 4, 9, 10, 12, 13, \ldots$ consists of all powers of $3$ and sums of distinct powers of $3$. Find the $100$th term of the sequence.
[/lang]