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.

  • $\begingroup$ For that specific problem we could have used any one of the infinitely many p-adic fields where $p=1 \mod 5$, as they contain a fifth root of unity to carry out that argument. We could still extend the other p-adic fields too, but if we're going to talk about extensions, we could boil it down a bit further to $\mathbb{Q}(\zeta)$ with $\zeta$ a 5th root of unity, and not really bring in any real/complex or p-adic fields into it in the first place. To make use of p-adics we'd need to bring in some limits somewhere, like dealing with asymptotics of an infinite series for a generating function. $\endgroup$
    – Merosity
    Commented May 26, 2022 at 21:04
  • $\begingroup$ Sorry for being unclear in the question: i meant, use the $p$-adic in a way that the complex number could not be used. Could you explicit your example with asymptotics? $\endgroup$
    – ARG
    Commented May 27, 2022 at 3:35
  • $\begingroup$ Based on your previous comment, it seems your question has now drifted away from the 3b1b generating function argument (which uses no analysis at all) to ask how $p$-adic numbers can be used to do something that doesn't seem feasible with complex numbers. See math.stackexchange.com/questions/3951500/… or math.stackexchange.com/questions/873147/… $\endgroup$
    – KCd
    Commented May 28, 2022 at 3:06
  • $\begingroup$ An answer to the question on the page mathoverflow.net/questions/103565/… gives an application that uses all completions of $\mathbf Q$ to show that when ${\rm PSL}_2(\mathbf Q)$ acts on ${\mathbf P}^1(\mathbf Q)$ by linear fractional transformations, no element of ${\rm PSL}_2(\mathbf Q)$ acts with finitely many orbits. In the proof, you sometimes think about ${\mathbf P}^1(\mathbf Q)$ lying in ${\mathbf P}^1(\mathbf R)$ and sometimes think about it lying in ${\mathbf P}^1(\mathbf Q_p)$ for some prime number $p$. $\endgroup$
    – KCd
    Commented May 28, 2022 at 3:29
  • $\begingroup$ @KCd many thanks for all the links, but I did not want the question to "drift" in any way. 3b1b ends his video by saying that complex numbers are so useful because by using a larger input set (the complex number rather than just, say, the rationals) one gets more information. The motivation for the question is: what information could you get if you used the $p$-adics rather than the complex numbers? $\endgroup$
    – ARG
    Commented May 28, 2022 at 7:29

1 Answer 1


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$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .