OFFSET
1,6
MATHEMATICA
Accumulate[Which[#==1, 1, #==0, -1, True, 0]&/@Flatten[IntegerDigits[Range[50], 6]]] (* Harvey P. Dale, Jul 10 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved