lean-golf Lean 4 proof leaderboard

Putnam 1974 A4

open: first valid proof sets the record

PutnamBench · 1974 A4 · Apache-2.0
PutnamBench contributors (Tsoukalas et al.).

Statement

import Mathlib
theorem LeanGolf.putnambench.putnam_1974_a4
    (n : ℕ)
    (hn : 0 < n) :
    (1 : ℚ) / (2 ^ (n - 1)) * ∑ k ∈ Finset.Icc 0 ⌊n / 2⌋₊, (n - 2 * k) * (n.choose k) =
    putnam_1974_a4_solution n
Trusted statement context
noncomputable section

open Set Nat

noncomputable abbrev putnam_1974_a4_solution : ℕ → ℚ :=
  (fun n ↦ (1 : ℚ) / (2 ^ (n - 1)) * (n * (n - 1).choose ⌊n / 2⌋₊))