Minimal number of steps to get from 0 to n by (a) adding 1 or (b) multiplying by 3. A stopping problem: begin with n and at each stage if a multiple of 3 divide by 3, otherwise subtract 1.

A061282

Minimal number of steps to get from 0 to n by (a) adding 1 or (b) multiplying by 3. A stopping problem: begin with n and at each stage if a multiple of 3 divide by 3, otherwise subtract 1.

Terms

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

External references