%I #13 Oct 24 2018 22:43:47
%S 0,1,3,2,9,4,6,10,27,5,12,7,11,28,18,13,30,8,81,15,29,19,36,14,31,21,
%T 82,16,33,20,84,37,54,32,22,83,39,17,90,34,24,85,243,38,55,45,23,87,
%U 40,57,91,35,108,25,86,244,42,56,93,46,63,88,246,41,58,92,48,109,26,99,245,43,60,94,252,47,111,64,89
%N Arrange ternary integers in lexicographic order. a(n) is the index of the n-th largest number in this sequence as interpreted in base 3/2 (starting from 0).
%C Every nonnegative integer appears exactly once.
%C The inverse is sequence A320274.
%e The ternary integers are: 0, 1, 2, 10, 11, 12, 20, 21, 22, 100 and so on. The values of these numbers interpreted in base 3/2 are 0, 1, 2, 1.5, 2.5, 3.5, 3, 4, 5, 2.25 and so on. The values in ascending order are: 0, 1, 1.5, 2, 2.25 and so on. They correspond to indices 0, 1, 3, 2, 9, and so on, which is our sequence.
%Y Cf. A320274, A024629.
%K nonn,base
%O 0,3
%A _Tanya Khovanova_ and PRIMES STEP Junior group, Oct 08 2018