Number-theoretic congruences with geometry and topology? There are many examples of $q$-series identities being proven by interpreting them as generating series of geometric invariants like the Donaldson invariants.  I would like to know if there are ways of establishing congruences among the coefficients of theta functions or other $q$-series using geometric invariants.  As an example, here's one relating $\mathrm{SO}(3)$ Donaldson invariants and mock theta functions.  Here's another one involving McMahon's enumeration of plane partitions.  These deal with infinite products or series.  I'd like to know if physical or geometric methods have been used to prove congruences
My naive opinion is that since physics deals mostly with "real" spaces, there's no way to get the "torsion" involved in number theory.
EDIT: Perhaps what I ask asking for is much simpler.  Are there number-theoretic congruences among invariants in topology or geometry?  Examples might be Bott periodicity or Adams' theorem on the number of independent vector fields on spheres.
 A: I'm not sure if this falls under "geometric method", but
Mike Hopkins obtained a mod 24 congruence among modular forms by using the theory of topological modular forms (see his 2002 ICM talk, Theorem 5.10). This result was originally proven by Borcherds here.
Hopkins' paper also contains another more "elementary" proof.
A: I came onto mathoverflow for a reference on an unrelated topic, but since I noticed this question I thought I would chime in:  the image of the J homomorphism in the stable homotopy groups of spheres, by the work of Adams, is dictated by the denominators of Bernoulli numbers $-B_n/n$ (i.e. $\zeta(1-2n)$) and it is these orders that are what are fundamentally related to the vector fields on spheres problem.
The image of $J$ is the $n = 1$ instance of some general $v_n$-periodic families in the stable stems called Greek letter elements (See Miller-Ravenel-Wilson's Annals paper "Periodic phemonena in the Adams-Novikov spectral sequence").  The n=2 analog is called the divided beta family.
Adams's identification of the Image of J with denomenators of Bernoulli numbers was through his "e"-invariant, which took values in Q/Z equal to the images of the Bernoulli numbers.
Gerd Laures, in his paper "The topological q-expansion paper" introduced a higher form of the "e" invariant called the "f"-invariant, which takes values in the quotient of the Katz's ring of divided congruences of modular forms by the sum of the integral q-expansions, and the classical modular forms over Q.  (A kind of higher analog of Q/Z)  He showed that his f invariant gave an injection from the divided beta family to this quotient, but did not characterize the image.
In my paper "congruences of modular forms and the divided beta family in homotopy theory" I showed that the divided beta family was actually in bijective correspondence with a set of congruence conditions between modular forms.  Gerd and I later showed in another paper that these congruences I wrote down were precisely the ones coming from his f invariant.
But what I do not know, and would be curious if any user had an idea concerning this, is if there is a natural family of modular forms, kind of like a higher form of Eisenstein series, which would realize these beta elements in its image in the quotient of the ring of divided congruences.
The phenomenon I describe is not unique to n = 2, abstractly there is some kind of "congruence condition" amongst holomorphic automorphic forms on U(1,n-1) that describes the nth Greek letter family in the stable homotopy groups of spheres - I just don't know how to express this congruence condition in classical terms.
A: I'm not an expert in this area, but I've heard that algebraic topologists run into congruences quite often.  For example, the stable homotopy groups of spheres are almost always finite abelian groups, and are often studied by examining the Sylow subgroups with $p$-specific toolsets.
On the subject of infinite series, one encounters congruences working with the spectrum $tmf$ of topological modular forms.  It admits a map from $\pi_0$ to the ring of level 1 modular forms with integer coefficients that is an isomorphism after 6 is inverted.  The image satisfies some congruences mod powers of 2 and 3 that are akin to the Borcherds congruences satisfied by theta functions.  For example, the cusp form $\Delta$ does not appear in the image, but $24\Delta$ and $\Delta^{24}$ do appear.
