DigitCount[n,b] function "counts the gives a list of the numbers of $1, 2, \ldots, b-1, 0$ digits in the base-$b$ representation of $n$".
I want to extend this to negative bases, for instance when $b=-2$. Is there already a function for this is Mathematica? Or perhaps a "quick" solution?
How to extend
DigitCount[n,b] for negative
Wikipedia's Negative base article provides code examples to calculate negative base representation in various languages, but no Wolfram Language.
IntegerLength explicitly state in their error messages that the bases must be integers larger than $1$, so it seems that current versions of Mathematica do not have built-in implementations for negative basis.
BaseForm::intpm: Positive machine-sized integer expected at position 2 in
IntegerDigits::ibase: Base -2 is not an integer greater than 1.
IntegerLength::ibase: Base -2 is not an integer greater than 1.