The twisted floor sum for base b
Every base at once
| b | χ̄4(b) | twisted sum | (b − χ̄4(b))β |
|---|
Lesson 09 split ∑χ(n)n by the parity of n, which amounts to looking at ⌊2n/p⌋. Replace 2 by any base b and the same idea gives a whole family of identities: the character-twisted sums of ⌊bn/p⌋ are all simple multiples of β, and so is the "diagonal" sum of ⌊n2/p⌋. Then a second Gaussian integer appears, the Jacobi sum J = ∑χ4(x)χ4(1 − x). Its norm is exactly p, which gives a new proof that p is a sum of two squares.
Where this lesson is headed
In words: every twisted floor sum is β times a simple factor, and the Jacobi sum is a Gaussian integer of norm p. For χ = χ4 the first formula reads ∑χ4(n)⌊bn/p⌋ = (b − χ̄4(b))β; the second holds for any odd χ. Writing J = a + bi gives p = a2 + b2.
m = p⌊m/p⌋ + ⟨m⟩ (Lesson 03). Multiplication by a unit permutes 1, …, p − 1. β = B1,χ4 and the half-sum σ (Lessons 08 and 09). ∑χ(n) = 0 for χ ≠ χ0 (Lesson 06). Norms in ℤ[i] (Lesson 04).
p: a prime in P*; χ: an odd character mod p (mainly χ4)
θ(b; n) = ⌊bn/p⌋: the fixed-base quotient
twisted floor sum: ∑n=1p−1 χ(n) θ(b; n)
J(χ, ψ) = ∑x mod p χ(x)ψ(1 − x): the Jacobi sum
J = J(χ4, χ4) = a + bi
Start with p = 13 (β = −1 − i) and base b = 2. The table shows ⌊bn/p⌋ for each n, weighted by χ4(n). Their sum, −1 − 3i, is exactly (2 − χ̄4(2))β = (2 + i)β. Try other b, then look at the diagonal sum and the Jacobi sum on the right.
| b | χ̄4(b) | twisted sum | (b − χ̄4(b))β |
|---|
Do these in order. "Set this up" chooses p and b.
| p | J | a mod 4 | b mod 8 | a2 + b2 |
|---|
The norm is always p. And the normalization is always the same: a ≡ 3 (mod 4) and b ≡ 6 (mod 8).
Each step has the general argument on the left and your p and b from Stage 01 on the right.
For each n, bn = p⌊bn/p⌋ + ⟨bn⟩. Multiply by χ(n) and sum over n = 1, …, p − 1:
If p ∤ b, m = ⟨bn⟩ runs over 1, …, p − 1 as n does, and χ(m) = χ(b)χ(n), so χ(n) = χ̄(b)χ(m):
(If p | b, then ⟨bn⟩ = 0 and χ̄(b) = 0, so the formula still holds.)
Subtract and divide by p:
For b = 2, ⌊2n/p⌋ is 1 exactly for n > p/2, so the left side is the second-half sum −σ, and this is Lesson 09's σ = (χ̄(2) − 2)B1,χ again. For χ = χ4: ∑χ4(n)⌊bn/p⌋ = (b − χ̄4(b))β.
For ⌊n2/p⌋ the "base" changes with n, so step 2 does not apply. Instead: n2 = p⌊n2/p⌋ + ⟨n2⟩, and n, p − n have the same ⟨n2⟩ but opposite χ (χ odd), so ∑χ(n)⟨n2⟩ = 0. For ∑χ(n)n2, reindex n ↦ p − n:
so ∑χ(n)n2 = p·∑χ(n)n = p2B1,χ, and therefore
J(χ, ψ) = ∑x χ(x)ψ(1 − x). Only x ≠ 0, 1 contribute. For quartic χ each term is a power of i, so J(χ4, χ4) is a Gaussian integer a + bi. The substitution x ↦ 1 − x shows the terms come in equal pairs, apart from the middle term x = 1/2, where χ4(1/2)2 = χ̄4(2)2 = −1:
so a is odd and b is even.
Let χ, ψ and χψ be nontrivial. Expand |J|2 = ∑x,y χ(x)ψ(1 − x)χ̄(y)ψ̄(1 − y) and substitute x = cy (y ≠ 0):
For c ≠ 1, y ↦ (1 − cy)/(1 − y) is a bijection from {y ≠ 1} onto {z ≠ c} sending 0 to 1, so the inner sum is −ψ(c) − 1. For c = 1 it is p − 2. Hence
For χ = ψ = χ4, χψ = (·/p) is nontrivial. So N(J) = p.
J = a + bi with N(J) = a2 + b2 = p, a odd, b even. So every p ∈ P* is a sum of two squares, and by the uniqueness of Lesson 05, (|a|, |b|) is the representation. Unlike the pigeonhole proof, J picks out a definite sign and order: in the table of Stage 01 the pinned χ4 always gives a ≡ 3 (mod 4) and b ≡ 6 (mod 8). (These finer congruences are a classical fact about Jacobi sums; here they are checked for every prime of P* below 1000 rather than proved.)
Assemble the argument, then test it on every prime of P* below 1000.
Complete proof
Twisted floors. Summing χ(n)·(bn = p⌊bn/p⌋ + ⟨bn⟩) gives bpB = p∑χ(n)⌊bn/p⌋ + ∑χ(n)⟨bn⟩, and the last sum is χ̄(b)pB by the relabeling m = ⟨bn⟩. Hence ∑χ(n)⌊bn/p⌋ = (b − χ̄(b))B.
Diagonal. For odd χ, ∑χ(n)⟨n²⟩ = 0 by pairing n with p − n, and reindexing gives 2∑χ(n)n² = 2p∑χ(n)n (using ∑χ(n) = 0), so ∑χ(n)n² = p²B. Dividing n² = p⌊n²/p⌋ + ⟨n²⟩ through gives ∑χ(n)⌊n²/p⌋ = pB.
Jacobi. With x = cy, |J|² = ∑cχ(c)∑y≠0,1ψ((1 − cy)/(1 − y)). For c ≠ 0, 1 the map y ↦ (1 − cy)/(1 − y) is a bijection {y ≠ 1} → {z ≠ c} with 0 ↦ 1, so the inner sum is ∑z≠cψ(z) − 1 = −ψ(c) − 1. For c = 1 it is p − 2. Summing, and using ∑c≠0χ(c) = ∑c≠0χψ(c) = 0, gives |J|² = p. For χ4, the pairing x ↔ 1 − x shows J ≡ χ4(1/2)² = −1 (mod 2), so a is odd and b even. ∎
For each of the 42 primes of P* below 1000: the twisted floor-sum identity for χ4 and every base b = 1 to 60; the diagonal identity; N(J) = p; and the congruences a ≡ 3 (mod 4), b ≡ 6 (mod 8).
Use p = 29, where β = 1 − i.