code: def number_to_lower_endian(n, base):
    
    if n < base:
      return [n]
    return [n % base] + number_to_lower_endian(n // base, base)
docs: Helper function: convert a number to a list of digits in the given base.