(With Don Zagier)

Lemma 1 Let X be the (affine) curve y^{2} = g(x). Then

∑_{X(𝔽_{p})} f(x) = ∑_{x=0}^{p−1} f(x) (\frac{g(x)}{p}) + ∑_{x=0}^{p−1} f(x)

Proof. The sum counts 2f(x) for every pair of points (x, ±y) in X(𝔽_{p}), counts f(x) for every point (x, 0) on X(𝔽_{p}), and counts zero otherwise.

Lemma 2 Let X be the (affine) curve u^{3} − 27v^{2} = 1. Let p = 1 + 4m. Then for r + 3s < 2m,

∑_{X(𝔽_{p})} u^{r}v^{2s} = −3^{2m−3s}\binom{2m + s}{(4m − r)/3}(−1)^{r+s−1}

Proof. v^{2s} = (u^{3} − 1)^{s}3^{−3s} is a function of u, so we may Apply Lemma 1. Note that (a/p) = a^{2m} and so (27/p) = 3^{2m}. Thus the sum equals

3^{2m} ∑_{u=0}^{p−1} u^{r}(u^{3} − 1)^{2m+s}3^{−3s} + ∑_{u=0}^{p−1} u^{r}(u^{3} − 1)^{s}3^{−3s}

A sum ∑_{t=0}^{p−1} t^{k} (for k > 0) is non trivial only when k ≡ 0 mod p−1 (and k ≠ 0) at which point the sum equals −1. Since r + 3s < 4m = p − 1, the second sum is zero. Since r + 3s + 6m < 8m, only the u^{4m} term counts towards the first sum (in both sums, we can disregard the constant term, since ∑_{u=0}^{p−1} 1 = 0). Evaluating the coefficient of u^{4m} in the first sum, we find the total sum to be equal to:

3^{2m−3s}\binom{2m + s}{(4m − r)/3}(−1)^{r+s−1}

Let p = 1 + 4m. Let E : y^{2} = 4x^{3} − ux − v be an elliptic curve. Then its Hasse invariant is given by the x^{4m} coefficient of (4x^{3} − ux − v)^{2m}, which is

a_{p}(E) = ∑_{3a+b=4m}^{a+b+c=2m} 4^{a}u^{b}v^{c}(−1)^{b+c}\binom{2m}{a}\binom{2m − a}{b}

One sees that c = 2a − 2m and b = 4m − 3a. Note that Δ_{E} := u^{3} − 27v^{2}. Summing over all elliptic curves of discriminant Δ_{E} = 1, we obtain the sum

A_{p} := ∑_{(u,v)}^{X(𝔽_{p})} ∑_{a=0}^{∞} 4^{a}u^{4m−3a}v^{2a−2m}(−1)^{a}\binom{2m}{a}\binom{2m − a}{4m − 3a}

This sum ranges over all a ∈ ℤ, but all terms are zero if 4m − 3a < 0, or a < m. We may therefore apply Lemma 2 with r = 4m − 3a ≥ 0 and s = a − m ≥ 0. We may apply this lemma since r + 3s = m < 2m. We arrive at the expression

A_{p} = (−1)^{m−1}3^{m} ∑_{a=0}^{∞} 4^{a}3^{−3a}(−1)^{a}\binom{a + m}{a}\binom{2m}{a}\binom{2m − a}{4m − 3a}

Since a ≥ m, we may let a = m + i, and the sum becomes:

A_{p} = −3^{2m}2^{2m} ∑_{a=0}^{∞} 2^{2i}3^{−3i}(−1)^{i}\binom{2m + i}{m + i}\binom{2m}{m + i}\binom{m − i}{m − 3i}

Theorem 1 Let

F (t) = ∑ \binom{2m + i}{m + i}\binom{2m}{m + i}\binom{m − i}{m − 3i}t^{i}

Then

F (t) = \binom{2m}{m}^{2}F (\frac{1}{12}, \frac{5}{12}, \frac{3}{4}; \frac{−27t}{4})

Proof. It suffices to show that F satisfies the differential equation

16t(4 + 27t)F′′ + 24(2 + 27t)F′ + 15F = 0

Then since this is of hypergeometric type, it has a unique polynomial solution (with non-zero constant term) at the critical point t = 0. The above is equivalent to the identity

F (t) = ∑ a_{n}t^{n}, \frac{a_{n+1}}{a_{n}} = \frac{−3}{16} \frac{(12n + 1)(12n + 5)}{(n + 1)(4n + 3)}

Explicitly, we find that

\frac{a_{n+1}}{a_{n}} = \frac{(2m + n + 1)(m − 3n)(m − 3n − 1)(m − 3n − 2)}{(2n + 1)(2n + 2)(m + n + 1)^{2}}

Using the fact that m ≡ −1/4 mod p, the result follows by computation.

Theorem 2 F (−t−4/27) = k·F (t) for some constant k, which we can evaluate.

Proof. This is equivalent to the identity

F (\frac{1}{12}, \frac{5}{12}, \frac{3}{4}; t) = k · F (\frac{1}{12}, \frac{5}{12}, \frac{3}{4}; 1 − t)

As is well known (and trivial to verify) both functions satisfy the same differential equation. However, since we are in characteristic p, they are both polynomials, and moreover at the critical points t = 0, 1 there is a unique power series which contains terms of degree < p. To evaluate k, we consider the highest order term of F (t) and F (−t − 4/27). This term differs (in ratio) by (−1)^{r}, where r is the order of F (t). One sees that r is the largest integer such that 3r ≤ m, or such that 12r ≤ p. Therefore r mod 2 is determined by p mod 24. One simply works it out, and finds that k = 1 if p ≡ 1, 5 mod 24 and (−1)^{r} = −1 if p ≡ 13, 17 mod 24. Thus (−1)^{r} = (6/p) = 6^{2m}, and thus

F (−t − 4/27) = 6^{2m}F (t)

Letting t = 0, we find that

F (−4/27) = 6^{2m}\binom{2m}{m}^{2}

Or, in otherwords,

A_{p} = −6^{2m}F (−4/27) = −\binom{2m}{m}^{2} ≡ −4a^{2} mod p

using the well known result of Gauss. Thus A_{p} ≡ 2(b^{2} −a^{2}) mod p. Determining A_{p} mod 4 is tedious and trivial. Showing |A_{p}| ≤ 2p is a dimension calculation plus Deligne. Thus A_{p} = 2(b^{2} − a^{2}).