OFFSET
1,8
MATHEMATICA
Accumulate[Which[#==1, 1, #==2, -1, True, 0]&/@Flatten[Table[ Reverse[ IntegerDigits[ n, 6]], {n, 0, 50}]]] (* Harvey P. Dale, Sep 15 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved