  Let $b \geq 2$ be an integer base with prime factors $p_1, \ldots, p_s$. In
this paper we study sequences of "$b$-adic valuations" and last nonzero digits
in $b$-adic expansions of the values $f(n) = (f_1(n), \ldots, f_s(n))$, where
each $f_i$ is a $p_i$-adic analytic function. We give a complete classification
concerning $k$-regularity of these sequences, which generalizes a result for
$b$ prime obtained by Shu and Yao. As an application, we strengthen a theorem
by Murru and Sanna on $b$-adic valuations of Lucas sequences of the first kind.
Moreover, we derive a method to determine precisely which terms of these
sequences can be represented by certain ternary quadratic forms.
