Key idea of this section
rows 0 … 2ᵐ⁺¹ − 1 mod 2 = three copies of rows 0 … 2ᵐ − 1 + an inverted triangle of zeros #odd entries in rows 0 … 2ᵐ − 1 = 3ᵐ; limiting set: Sierpinski gasket, dimension log 3/log 2
Self-similarity from Lucas' theorem
Let Tₘ denote the array of residues C(n, k) mod 2 for 0 ≤ k ≤ n < 2ᵐ. Write a row index in the range 2ᵐ ≤ n < 2ᵐ⁺¹ as n = 2ᵐ + n′ with 0 ≤ n′ < 2ᵐ. By Lucas' theorem with the top binary digit separated:
k < 2ᵐ: C(n, k) ≡ C(1, 0) C(n′, k) = C(n′, k) k = 2ᵐ + k′: C(n, k) ≡ C(1, 1) C(n′, k′) = C(n′, k′)
In the first case C(n′, k) = 0 when n′ < k < 2ᵐ. Hence the rows 2ᵐ, …, 2ᵐ⁺¹ − 1 consist of a copy of Tₘ on the left (k ≤ n′), a copy of Tₘ on the right (k ≥ 2ᵐ), and between them the inverted triangle n′ < k < 2ᵐ of zeros. Together with Tₘ itself on top, Tₘ₊₁ is three copies of Tₘ arranged in a triangle around a hole. The same argument works for every prime p: Tₘ₊₁ mod p consists of p(p + 1)/2 blocks, the block in position (a, b), 0 ≤ b ≤ a < p, being C(a, b) · Tₘ (mod p), and the remaining p(p − 1)/2 blocks are zero.
Counting odd entries
Proposition 9.1. The number of odd entries in rows 0, …, 2ᵐ − 1 is 3ᵐ; more generally the number of entries not divisible by p in rows 0, …, pᵐ − 1 is (p(p + 1)/2)ᵐ. Proof. By Fine's theorem the count is ∑ over n < pᵐ of ∏ᵢ (nᵢ + 1), and since the digits n₀, …, nm−1 range independently over {0, …, p − 1}, this is (∑d=0p−1 (d + 1))ᵐ = (p(p + 1)/2)ᵐ. ∎
The total number of entries in the first 2ᵐ rows is 2ᵐ(2ᵐ + 1)/2, so the proportion of odd entries is about 2(3/4)ᵐ → 0: almost all binomial coefficients are even, and more generally, for any fixed modulus, almost all are divisible by it. For a general number N of rows, let f(N) be the number of odd entries in rows 0, …, N − 1. Then f(N)/Nθ with θ = log₂ 3 equals 1 whenever N is a power of 2 but oscillates otherwise; Harborth (1977) showed that lim sup f(N)/Nθ = 1 and lim inf f(N)/Nθ ≈ 0.812556. For example f(100) = 1251, while 100θ ≈ 1478.9.
The limiting fractal
Scale the first 2ᵐ rows into the unit triangle by sending the entry (n, k) to the point (k/2ᵐ − n/2ᵐ⁺¹, −n/2ᵐ) and replacing it by a small triangle of side 2⁻ᵐ. Let Kₘ be the union of the small triangles at odd entries. The self-similarity above says Kₘ₊₁ = φ₁(Kₘ) ∪ φ₂(Kₘ) ∪ φ₃(Kₘ), where φ₁, φ₂, φ₃ are the three similarities of ratio 1/2 fixing the vertices of the big triangle. By Hutchinson's theorem the iterated function system {φ₁, φ₂, φ₃} has a unique nonempty compact invariant set K, the Sierpinski gasket, and Kₘ → K in the Hausdorff metric. Because the open set condition holds (the open triangle is mapped onto three disjoint open subtriangles), Moran's equation 3 · (1/2)ˢ = 1 gives the Hausdorff dimension
dimH K = log 3 / log 2 ≈ 1.5850
For a prime p the same construction with p(p + 1)/2 maps of ratio 1/p gives a fractal of dimension log(p(p + 1)/2)/log p: for p = 3 this is log 6/log 3 ≈ 1.6309, for p = 5 it is log 15/log 5 ≈ 1.6826, and the dimension tends to 2 as p → ∞.
Cellular automata and generating functions
Pascal's rule modulo 2 says that each row is the exclusive-or of the previous row with its shift. In the staggered layout of the triangle this is Wolfram's elementary cellular automaton Rule 90 (each cell becomes the XOR of its two neighbours), started from a single live cell; Rule 90 is linear over F₂, and its space-time diagram is the Sierpinski pattern. Algebraically, the generating function of row n modulo 2 factors as (1 + x)ⁿ ≡ ∏ᵢ (1 + x2ⁱ)nᵢ, a product of s₂(n) sparse factors, which is Lucas' theorem once more.
Finer valuations
Kummer's theorem gives a nested family of patterns: the entries with vp C(n, k) ≥ j form a union of inverted triangles of all sizes, determined by the carry structure. The number of entries in row n with vp C(n, k) = j can be computed from the digit pattern of n (results of Carlitz and others), and the pictures modulo pᵉ are self-similar in a weaker, automatic-sequence sense: the residues C(n, k) mod pᵉ form a two-dimensional p-automatic sequence (Allouche and Shallit's book is the standard reference).
Exercise
- (a)How many odd entries are there in rows 0 through 63?
- (b)How many entries not divisible by 3 are there in rows 0 through 80?
- (c)Compute the fractal dimension of Pascal's triangle modulo 5 to four decimal places.
Show solution
Answers: (a) 64 = 2⁶, so 3⁶ = 729. (b) 81 = 3⁴, so (3 · 4/2)⁴ = 6⁴ = 1296. (c) log 15/log 5 = 1.6826 (to four places).