A sequence {S(n)} consists entirely of the digits 0,1, 2, or 6 and all permutations and combinations thereof. For example, any of 0, 2, 6, 26, 162, 12060, 6611120 etc are valid terms of the sequence. None of the other six digits occur in the said sequence.
All the terms of {S(n)} are now arranged in strictly ascending order of magnitude.
What is the 2016th term of the above sequence?