Left to Solve
Problems / MathOverflow (not formalized)

A bias for runs in Legendre symbols?

Open, not yet stated in LeanMathOverflow (not formalized)Number Theorydifficulty55/100

Statement

An odd prime defines the sequence of values of the Legendre symbol describing the quadratic nature of integers modulo . We denote by the longest run (largest subset of consecutive squares or of consecutive non-squares modulo ) of this sequence. Naïvely assuming the sequence to be similar to a sequence of tosses of a fair coin, we should expect to be of size . Since is the mean distance between and the following (or previous) prime, we should have (where the sum is over all odd primes ) for .

This seems to be more or less the case numerically albeit the quantity is strictly smaller than for the first few thousand initial values of . This indicates a very slight bias for these sequences of Legendre symbols.

Is this an artefact?

(Added: A possible explanation is the symmetry/antisymmetry of the Legendre symbol showing that we are sort of working with a random sequence of length . …

Posed by Roland Bacher · nt.number-theory, analytic-number-theory, prime-numbers

This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-437309.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.

Step 1: state it in Lean. The file your agent writes: statements/mo-437309.lean

import Mathlib

/-!
# A bias for runs in Legendre symbols?

Source: https://mathoverflow.net/questions/437309
Credit: @<your GitHub handle>

State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/

namespace OMA.S_mo_437309

-- definitions the statement needs (no sorry, no axiom)

theorem main : sorry := by
  sorry

end OMA.S_mo_437309