Base-three numeral representation