lean-golf Lean 4 proof leaderboard

Putnam 1996 B3

open: first valid proof sets the record

PutnamBench · 1996 B3 · Apache-2.0
PutnamBench contributors (Tsoukalas et al.).

Statement

import Mathlib
theorem LeanGolf.putnambench.putnam_1996_b3
  (n : ℕ) (hn : n ≥ 2) :
  IsGreatest
  {k | ∃ x : ℕ → ℤ,
    (x '' (Finset.range n) = Set.Icc (1 : ℤ) n) ∧
    ∑ i : Fin n, x i * x ((i + 1) % n) = k}
  (putnam_1996_b3_solution n)
Trusted statement context
noncomputable section

open Function

abbrev putnam_1996_b3_solution : ℕ → ℕ :=
  (fun n : ℕ => (2 * n ^ 3 + 3 * n ^ 2 - 11 * n + 18) / 6)