Generating functions are very useful tool to solve various counting problems. One way in which this is done, is to evaluate the generating function at complex values (see e.g. this video of 3b1b). Are there cases where one can evaluate a generating function at $p$-adic numbers to gain information about a combinatorial problem?
PS: there is famously a $p$-adic analogue of the Riemann zeta function, but I'm looking at simpler instances.
I remember having answered this kind of questions on MathOverflow.
One example is that the partial sums $S_n = \sum_{i = 1}^n\frac{2^i}i$ have $2$-adic valuations tending to infinity. This is proved by evaluating $\log(1 - x) = -\sum_{i = 1}^\infty \frac{x^i}i$ at $x = 2 \in \Bbb Q_2$, which gives $\log(-1) = \frac12\log1 = 0$.
More interestingly the dilogarithm $\sum_{i = 1}^\infty \frac{x^i}{i^2}$ also evaluates to $0$ at $x = 2 \in \Bbb Q_2$.