If the final two digits of n written in base 3 are the same then this digit, otherwise mod 3-sum of these two digits.

A060588

If the final two digits of n written in base 3 are the same then this digit, otherwise mod 3-sum of these two digits.

Terms

    a(0) =0a(1) =2a(2) =1a(3) =2a(4) =1a(5) =0a(6) =1a(7) =0a(8) =2a(9) =0a(10) =2a(11) =1a(12) =2a(13) =1a(14) =0a(15) =1a(16) =0a(17) =2a(18) =0a(19) =2a(20) =1a(21) =2a(22) =1a(23) =0a(24) =1a(25) =0a(26) =2a(27) =0a(28) =2a(29) =1

External references