If the final digit of n in base 3 is the same as a([n/3]) then this digit, otherwise a(n)= mod 3-sum of these two digits, with a(0)=0.

A060582

If the final digit of n in base 3 is the same as a([n/3]) then this digit, otherwise a(n)= mod 3-sum of these two digits, with a(0)=0.

Terms

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

External references