OFFSET
1,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 3*a(n/6) if n == 0 (mod 6); otherwise a(n) = a(n-1)+1.
MATHEMATICA
Table[FromDigits[RealDigits[n, 6], 3], {n, 0, 100}]
PROG
(Magma) [n eq 1 select 1 else n mod 6 eq 0 select 3*Self(n div 6) else Self(n-1)+1: n in [1..72]]; // Bruno Berselli, Jan 25 2018
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Clark Kimberling, Aug 13 2012
STATUS
approved