Rereading an older article on Fermat-quotients in which I'd applied some p-adic-rationale I find now, that my method for the representation of bases $b$ which allow high fermat-quotients $b_{p,m}^{p-1} \equiv 1 \pmod {p^m}$ as digit-string in the numbersystem to base $p$ is just the "Teichmüller-character" (or "-representation"(?)).
Because I wanted to analyze things further I thought to apply that procedures to composites numbers $n$ as well instead only to primes $p$ - at least so far as possible. However, the Teichmüller-character is only defined for prime modules $p$ (and for instance its implementation in Pari/GP gives wrong results for non-prime arguments). So my question (to prevent attempts to reinvent the wheel or trying to quadrature the circle) is
Q1: Is there a generalization of the Teichmüller-character to non-prime arguments known/possible?
and optimally:
Q2: how could I implement this algorithmically?
Comment: I've a basic routine for this for the prime-arguments which seems to work even for composite (but squarefree) bases, but for composite $n$ containing primefactors to second or higher powers this method runs sometimes in impossible inversion in the modular computation (and also not all residue-classes can be used). So likely any generalization has some limitations/restrictions, but I hope that this might come out to be systematic with a not too complicated pattern.
Background: the discussion of the fermat-quotient-computation with a p-adic analogy can be seen here (mathematical derivation see pg 9)
Ps.: I don't know whether the tag "teichmueller-theory" is really appropriate here, feel free to remove this if it is misleading