ChristianZ97/PutnamBench-lean4 huggingface dataset:
Problem: putnam_2013_b2
Tags: algebra

Let $C = \bigcup_{N=1}^\infty C_N$, where $C_N$ denotes the set of those `cosine polynomials' of the form
\[
f(x) = 1 + \sum_{n=1}^N a_n \cos(2 \pi n x)
\]
for which:
\begin{enumerate}
\item[(i)]
$f(x) \geq 0$ for all real $x$, and
\item[(ii)]
$a_n = 0$ whenever $n$ is a multiple of $3$.
\end{enumerate}
Determine the maximum value of $f(0)$ as $f$ ranges through $C$, and
prove that this maximum is attained.

Solution: The maximum value of $f(0)$ is $3$.

Lean 4 formal statement:
abbrev putnam_2013_b2_solution : ℝ := sorry
theorem putnam_2013_b2
  (CN : ℕ → Set (ℝ → ℝ))
  (hCN : ∀ N : ℕ, CN N =
    {f : ℝ → ℝ |
      (∀ x : ℝ, f x ≥ 0) ∧
      ∃ a : List ℝ, a.length = N + 1 ∧ (∀ n : Fin (N + 1), 3 ∣ (n : ℕ) → a[n]! = 0) ∧
      ∀ x : ℝ, f x = 1 + ∑ n ∈ Finset.Icc 1 N, a[(n : ℕ)]! * Real.cos (2*Real.pi*n*x)}) :
  IsGreatest {f 0 | f ∈ ⋃ N ∈ Ici 1, CN N} putnam_2013_b2_solution :=
sorry
Problem: putnam_2013_b3
Tags: set_theory

Let $\mathcal{P}$ be a nonempty collection of subsets of $\{1,\dots, n\}$ such that: \begin{enumerate} \item[(i)] if $S, S' \in \mathcal{P}$, then $S \cup S' \in \mathcal{P}$ and $S \cap S' \in \mathcal{P}$, and \item[(ii)] if $S \in \mathcal{P}$ and $S \neq \emptyset$, then there is a subset $T \subset S$ such that $T \in \mathcal{P}$ and $T$ contains exactly one fewer element than $S$. \end{enumerate} Suppose that $f: \mathcal{P} \to \mathbb{R}$ is a function such that $f(\emptyset) = 0$ and \[f(S \cup S') = f(S) + f(S') - f(S \cap S') \mbox{ for all $S,S' \in \mathcal{P}$.} \] Must there exist real numbers $f_1,\dots,f_n$ such that\[f(S) = \sum_{i \in S} f_i\] \n for every $S \in \mathcal{P}$?

Solution: None.

Lean 4 formal statement:
abbrev putnam_2013_b3_solution : Prop := sorry
theorem putnam_2013_b3
: (∀ (n : ℕ) (P : Finset (Finset (Fin n))) (f : Finset (Fin n) → ℝ),
      P ≠ ⊥ → (∀ S ∈ P, ∀ S' ∈ P, S ∪ S' ∈ P ∧ S ∩ S' ∈ P) →
      (∀ S ∈ P, S ≠ ⊥ → ∃ T ∈ P, T ⊂ S ∧ Finset.card T + 1 = Finset.card S) →
      f ⊥ = 0 → (∀ S ∈ P, ∀ S' ∈ P, f (S ∪ S') = f S + f S' - f (S ∩ S')) →
      ∃ r : Fin n → ℝ, ∀ S ∈ P, f S = ∑ i ∈ S, r i)
      ↔ putnam_2013_b3_solution :=
sorry
Problem: putnam_2013_b4
Tags: analysis

For any continuous real-valued function $f$ defined on the interval $[0,1]$, let $\mu(f)=\int_0^1 f(x)\,dx,\text{Var}(f)=\int_0^1 (f(x)-\mu(f))^2\,dx,M(f)=\max_{0 \leq x \leq 1} |f(x)|$. Show that if $f$ and $g$ are continuous real-valued functions defined on the interval $[0,1]$, then $\text{Var}(fg) \leq 2\text{Var}(f)M(g)^2+2\text{Var}(g)M(f)^2$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2013_b4
    (μ Var M : C(Icc (0 : ℝ) 1, ℝ) → ℝ)
    (hμ : ∀ f, μ f = ∫ x, f x)
    (hVar : ∀ f, Var f = ∫ x, (f x - μ f) ^ 2)
    (hM : ∀ f : C(Icc (0 : ℝ) 1, ℝ), IsGreatest (range <| abs ∘ f) (M f))
    (f g : C(Icc (0 : ℝ) 1, ℝ)) :
    Var (f * g) ≤ 2 * Var f * (M g) ^ 2 + 2 * Var g * (M f) ^ 2 :=
sorry
Problem: putnam_2013_b5
Tags: algebra

Let $X=\{1,2,\dots,n\}$, and let $k \in X$. Show that there are exactly $k \cdot n^{n-1}$ functions $f:X \to X$ such that for every $x \in X$ there is a $j \geq 0$ such that $f^{(j)}(x) \leq k$. [Here $f^{(j)}$ denotes the $j$\textsuperscript{th} iterate of $f$, so that $f^{(0)}(x)=x$ and $f^{(j+1)}(x)=f(f^{(j)}(x))$.]

Solution: None.

Lean 4 formal statement:
theorem putnam_2013_b5
  (n : ℕ) (hn : n ≥ 1)
  (k : Set.Icc 1 n)
  (fiter : (Set.Icc 1 n → Set.Icc 1 n) → Prop)
  (hfiter : ∀ f, fiter f ↔ ∀ x : Set.Icc 1 n, ∃ j : ℕ, f^[j] x ≤ k) :
  {f | fiter f}.encard = k * n ^ (n - 1) :=
sorry
Problem: putnam_2014_a1
Tags: analysis, number_theory

Prove that every nonzero coefficient of the Taylor series of \[(1 - x + x^2)e^x\] about $x=0$ is a rational number whose numerator (in lowest terms) is either $1$ or a prime number.

Solution: None.

Lean 4 formal statement:
theorem putnam_2014_a1
(f : ℝ → ℝ)
(hf : ∀ x : ℝ, f x = (1 - x + x ^ 2) * Real.exp x)
(hfdiff : ContDiff ℝ ⊤ f)
(c : ℕ → ℝ)
(hc : ∀ k : ℕ, c k = taylorCoeffWithin f k Set.univ 0)
: ∀ k : ℕ, c k ≠ 0 → ∃ q : ℚ, c k = q ∧ (q.num = 1 ∨ Prime q.num.natAbs) :=
sorry
Problem: putnam_2014_a2
Tags: linear_algebra

Let $A$ be the $n \times n$ matrix whose entry in the $i$-th row and $j$-th column is $\frac{1}{\min(i,j)}$ for $1 \leq i,j \leq n$. Compute $\det(A)$.

Solution: Show that the determinant is $\frac{(-1)^{n-1}}{(n-1)!n!}$.

Lean 4 formal statement:
abbrev putnam_2014_a2_solution : ℕ → ℝ := sorry
theorem putnam_2014_a2
(n : ℕ)
(A : Matrix (Fin n) (Fin n) ℝ)
(npos : n > 0)
(hA : ∀ i j : Fin n, A i j = 1 / min (i.1 + 1 : ℚ) (j.1 + 1))
: A.det = putnam_2014_a2_solution n :=
sorry
Problem: putnam_2014_a3
Tags: algebra

Let \( a_0 = \frac{5}{2} \) and \( a_k = a_{k-1}^2 - 2 \) for \( k \geq 1 \). Compute \( \prod_{k=0}^{\infty} \left(1 - \frac{1}{a_k}\right) \) in closed form.

Solution: Show that the solution is 3/7.

Lean 4 formal statement:
noncomputable abbrev putnam_2014_a3_solution : ℝ := sorry
theorem putnam_2014_a3
(a : ℕ → ℝ)
(a0 : a 0 = 5 / 2)
(ak : ∀ k ≥ 1, a k = (a (k - 1)) ^ 2 - 2)
: Tendsto (fun n : ℕ => ∏ k ∈ Finset.range n, (1 - 1 / a k)) atTop (𝓝 putnam_2014_a3_solution) :=
sorry
Problem: putnam_2014_a4
Tags: probability, analysis

Suppose $X$ is a random variable that takes on only nonnegative integer values, with $E\left[X\right]=1$, $E\left[X^2\right]=2$, and $E\left[X^3\right]=5$. (Here $E\left[Y\right]$ denotes the expectation of the random variable $Y$.) Determine the smallest possible value of the probability of the event $X=0$.

Solution: Show that the answer is $\frac{1}{3}$.

Lean 4 formal statement:
noncomputable abbrev putnam_2014_a4_solution : ℝ := sorry
theorem putnam_2014_a4
(Xrandvar : (ℕ → ℝ) → Prop)
(hXrandvar : Xrandvar = (fun X : ℕ → ℝ => (∀ n : ℕ, X n ∈ Set.Icc 0 1) ∧ ∑' n : ℕ, X n = 1))
(E : (ℕ → ℝ) → (ℕ → ℝ) → ℝ)
(hE : E = (fun (X : ℕ → ℝ) (f : ℕ → ℝ) => ∑' n : ℕ, f n * X n))
: sInf {X0 : ℝ | ∃ X : ℕ → ℝ, Xrandvar X ∧ E X (fun x : ℕ => x) = 1 ∧ E X (fun x : ℕ => x ^ 2) = 2 ∧ E X (fun x : ℕ => x ^ 3) = 5 ∧ X0 = X 0} = putnam_2014_a4_solution :=
sorry
Problem: putnam_2014_a5
Tags: algebra

Let \[ P_n(x) = 1 + 2 x  + 3 x^2 + \cdots + n x^{n-1}.\] Prove that the polynomials $P_j(x)$ and $P_k(x)$ are relatively prime for all positive integers $j$ and $k$ with $j \neq k$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2014_a5
(P : ℕ → Polynomial ℂ)
(hP : ∀ n, P n = ∑ i ∈ Finset.Icc 1 n, i * Polynomial.X ^ (i - 1))
: ∀ (j k : ℕ), (j > 0 ∧ k > 0) → j ≠ k → IsCoprime (P j) (P k) :=
sorry
Problem: putnam_2014_a6
Tags: linear_algebra

Let \( n \) be a positive integer. What is the largest \( k \) for which there exist \( n \times n \) matrices \( M_1, \ldots, M_k \) and \( N_1, \ldots, N_k \) with real entries such that for all \( i \) and \( j \), the matrix product \( M_i N_j \) has a zero entry somewhere on its diagonal if and only if \( i \neq j \)?

Solution: Show that the solution has the form k \<= n ^ n.

Lean 4 formal statement:
abbrev putnam_2014_a6_solution : ℕ → ℕ := sorry
theorem putnam_2014_a6
(n : ℕ)
(kex : ℕ → Prop)
(npos : n > 0)
(hkex : ∀ k ≥ 1, kex k = ∃ M N : Fin k → Matrix (Fin n) (Fin n) ℝ, ∀ i j : Fin k, ((∃ p : Fin n, (M i * N j) p p = 0) ↔ i ≠ j))
: (putnam_2014_a6_solution n ≥ 1 ∧ kex (putnam_2014_a6_solution n)) ∧ (∀ k ≥ 1, kex k → k ≤ putnam_2014_a6_solution n) :=
sorry
Problem: putnam_2014_b1
Tags: algebra

A \emph{base $10$ over-expansion} of a positive integer $N$ is an expression of the form
\[
N = d_k 10^k + d_{k-1} 10^{k-1} + \cdots + d_0 10^0
\]
with $d_k \neq 0$ and $d_i \in \{0,1,2,\dots,10\}$ for all $i$. For instance, the integer $N = 10$ has two base $10$ over-expansions: $10 = 10 \cdot 10^0$ and the usual base $10$ expansion $10 = 1 \cdot 10^1 + 0 \cdot 10^0$. Which positive integers have a unique base $10$ over-expansion?

Solution: Prove that the answer is the integers with no $0$'s in their usual base $10$ expansion.

Lean 4 formal statement:
abbrev putnam_2014_b1_solution : Set ℕ := sorry
theorem putnam_2014_b1
(overexpansion : ℕ → List ℕ → Prop)
(hoverexpansion : overexpansion = fun N d ↦ N = ∑ i : Fin d.length, (d.get i) * 10 ^ i.1 ∧ d.getLastI ≠ 0 ∧ ∀ a ∈ d, a ∈ Finset.range 11)
(S : Set ℕ)
(hS : ∀ N : ℕ, N ∈ S ↔ N > 0 ∧ ∃! d : List ℕ, overexpansion N d)
: (S = putnam_2014_b1_solution) :=
sorry
Problem: putnam_2014_b2
Tags: analysis

Suppose that \( f \) is a function on the interval \([1,3]\) such that \(-1 \leq f(x) \leq 1\) for all \( x \) and \( \int_{1}^{3} f(x) \, dx = 0 \). How large can \(\int_{1}^{3} \frac{f(x)}{x} \, dx \) be?

Solution: Show that the solution is log (4 / 3).

Lean 4 formal statement:
noncomputable abbrev putnam_2014_b2_solution : ℝ := sorry
theorem putnam_2014_b2 :
  IsGreatest {t | ∃ f : ℝ → ℝ,
    (∀ x : Set.Icc (1 : ℝ) 3, -1 ≤ f x ∧ f x ≤ 1) ∧
    (∫ x in Set.Ioo 1 3, f x = 0) ∧
    (∫ x in Set.Ioo 1 3, (f x) / x) = t}
  putnam_2014_b2_solution :=
sorry
Problem: putnam_2014_b3
Tags: linear_algebra, number_theory

Let $A$ be an $m \times n$ matrix with rational entries. Suppose that there are at least $m+n$ distinct prime numbers among the absolute values of the entries of $A$. Show that the rank of $A$ is at least 2.

Solution: None.

Lean 4 formal statement:
theorem putnam_2014_b3
(m n : ℕ)
(A : Matrix (Fin m) (Fin n) ℚ)
(mnpos : 0 < m ∧ 0 < n)
(Aprime : {p : ℕ | p.Prime ∧ ∃ (i : Fin m) (j : Fin n), |A i j| = p}.encard ≥ m + n)
: A.rank ≥ 2 :=
sorry
Problem: putnam_2014_b4
Tags: algebra

Show that for each positive integer \( n \), all the roots of the polynomial $ \sum_{k=0}^{n} 2^k(n-k)x^k $ are real numbers.

Solution: None.

Lean 4 formal statement:
theorem putnam_2014_b4
(n : ℕ)
(P: Polynomial ℂ)
(npos : n > 0)
(Px : P.degree = n ∧ ∀ k ∈ Set.Icc 0 n, P.coeff k = 2 ^ (k * (n - k)))
: ∀ r ∈ P.roots, r.im = 0 :=
sorry
Problem: putnam_2014_b6
Tags: analysis, number_theory

Let $f: [0,1] \to \mathbb{R}$ be a function for which there exists a constant $K>0$ such that $\left| f(x) - f(y) \right| \leq K \left| x - y \right|$ for all $x,y \in [0,1]$. Suppose also that for each rational number $r \in [0,1]$, there exist integers $a$ and $b$ such that $f(r) = a + br$. Prove that there exist finitely many intervals $I_1, \dots, I_n$ such that $f$ is a linear function on each $I_i$ and $[0,1] = \bigcup_{i=1}^n I_i$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2014_b6
(f : ℝ → ℝ)
(hlip : ∃ K > 0, ∀ x ∈ Icc 0 1, ∀ y ∈ Icc 0 1, |f x - f y| ≤ K * |x - y|)
(hrat : ∀ r ∈ Icc (0 : ℚ) 1, ∃ a b : ℤ, f r = a + b * r)
: (∃ I : Finset (Interval ℝ), (∀ Ii ∈ I, ∃ m c : ℝ, ∀ x ∈ coeHom Ii, f x = c + m * x) ∧ Icc 0 1 = ⋃ Ii ∈ I, coeHom Ii) :=
sorry
Problem: putnam_2015_a1
Tags: geometry, analysis

Let $A$ and $B$ be points on the same branch of the hyperbola $xy=1$. Suppose that $P$ is a point lying between $A$ and $B$ on this hyperbola, such that the area of the triangle $APB$ is as large as possible. Show that the region bounded by the hyperbola and the chord $AP$ has the same area as the region bounded by the hyperbola and the chord $PB$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2015_a1
  (hyperbola : Set (Fin 2 → ℝ))
  (hhyperbola : hyperbola = {p | p 1 = 1 / p 0 ∧ p 0 > 0})
  (A B P : Fin 2 → ℝ)
  (PPline : (Fin 2 → ℝ) → (Fin 2 → ℝ) → (ℝ → ℝ))
  (hAB : A ∈ hyperbola ∧ B ∈ hyperbola ∧ A 0 < B 0)
  (hP : P ∈ hyperbola ∧ A 0 < P 0 ∧ P 0 < B 0 ∧ (∀ P', (P' ∈ hyperbola ∧ A 0 < P' 0 ∧ P' 0 < B 0) → MeasureTheory.volume (convexHull ℝ {A, P', B}) ≤ MeasureTheory.volume (convexHull ℝ {A, P, B})))
  (hPPline : ∀ P1 P2, P1 0 ≠ P2 0 → PPline P1 P2 = (fun x : ℝ => ((P2 1 - P1 1) / (P2 0 - P1 0)) * (x - P1 0) + P1 1)) :
  ∫ x in Set.Ioo (A 0) (P 0), (PPline A P) x - 1 / x = ∫ x in Set.Ioo (P 0) (B 0), (PPline P B) x - 1 / x :=
sorry
Problem: putnam_2015_a2
Tags: number_theory

Let $a_0=1$, $a_1=2$, and $a_n=4a_{n-1}-a_{n-2}$ for $n \geq 2$. Find an odd prime factor of $a_{2015}$.

Solution: Show that one possible answer is $181$.

Lean 4 formal statement:
abbrev putnam_2015_a2_solution : ℕ := sorry
theorem putnam_2015_a2
(a : ℕ → ℤ)
(abase : a 0 = 1 ∧ a 1 = 2)
(arec : ∀ n ≥ 2, a n = 4 * a (n - 1) - a (n - 2))
: Odd putnam_2015_a2_solution ∧ putnam_2015_a2_solution.Prime ∧ ((putnam_2015_a2_solution : ℤ) ∣ a 2015) :=
sorry
Problem: putnam_2015_a3
Tags: number_theory, algebra

Compute $\log_2 \left( \prod_{a=1}^{2015}\prod_{b=1}^{2015}(1+e^{2\pi iab/2015}) \right)$. Here $i$ is the imaginary unit (that is, $i^2=-1$).

Solution: Show that the answer is $13725$.

Lean 4 formal statement:
abbrev putnam_2015_a3_solution : ℂ := sorry
theorem putnam_2015_a3 :
    Complex.log (∏ a : Fin 2015, ∏ b : Fin 2015, (1 + Complex.exp (2 * Real.pi * Complex.I * (a.1 + 1) * (b.1 + 1) / 2015))) / Complex.log 2 = putnam_2015_a3_solution :=
sorry
Problem: putnam_2015_a4
Tags: analysis

For each real number $x$, let
\[
f(x) = \sum_{n\in S_x} \frac{1}{2^n},
\]
where $S_x$ is the set of positive integers $n$ for which $\lfloor nx \rfloor$ is even. What is the largest real number $L$ such that $f(x) \geq L$ for all $x \in [0,1)$? (As usual, $\lfloor z \rfloor$ denotes the greatest integer less than or equal to $z$.)

Solution: Prove that $L = \frac{4}{7}$.

Lean 4 formal statement:
noncomputable abbrev putnam_2015_a4_solution : ℝ := sorry
theorem putnam_2015_a4
(S : ℝ → Set ℤ)
(f : ℝ → ℝ)
(p : ℝ → Prop)
(hS : S = fun (x : ℝ) ↦ {n : ℤ | n > 0 ∧ Even ⌊n * x⌋})
(hf : f = fun (x : ℝ) ↦ ∑' n : S x, 1 / 2 ^ (n : ℤ))
(hp : ∀ l, p l ↔ ∀ x ∈ Set.Ico 0 1, f x ≥ l)
: IsGreatest p putnam_2015_a4_solution :=
sorry
Problem: putnam_2015_a5
Tags: number_theory

Let $q$ be an odd positive integer, and let $N_q$ denote the number of integers $a$ such that $0< a< q/4$ and $\gcd(a,q)=1$. Show that $N_q$ is odd if and only if $q$ is of the form $p^k$ with $k$ a positive integer and $p$ a prime congruent to $5$ or $7$ modulo $8$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2015_a5
(q : ℕ)
(Nq : ℕ)
(qodd : Odd q)
(qpos : q > 0)
(hNq : Nq = {a : ℕ | 0 < a ∧ a < (q : ℝ) / 4 ∧ Nat.gcd a q = 1}.encard)
: Odd Nq ↔ ∃ p k : ℕ, q = p ^ k ∧ k > 0 ∧ p.Prime ∧ (p % 8 = 5 ∨ p % 8 = 7) :=
sorry
Problem: putnam_2015_a6
Tags: linear_algebra

Let $n$ be a positive integer. Suppose that $A$, $B$, and $M$ are $n \times n$ matrices with real entries such that $AM = MB$, and such that $A$ and $B$ have the same characteristic polynomial. Prove that $\det(A-MX)=\det(B-XM)$ for every $n \times n$ matrix $X$ with real entries.

Solution: None.

Lean 4 formal statement:
theorem putnam_2015_a6
(n : ℕ)
(A B M : Matrix (Fin n) (Fin n) ℝ)
(npos : n > 0)
(hmul : A * M = M * B)
(hpoly : Matrix.charpoly A = Matrix.charpoly B)
: ∀ X : Matrix (Fin n) (Fin n) ℝ, (A - M * X).det = (B - X * M).det :=
sorry
Problem: putnam_2015_b1
Tags: analysis

Let $f$ be a three times differentiable function (defined on $\mathbb{R}$ and real-valued) such that $f$ has at least five distinct real zeros. Prove that $f+6f'+12f''+8f'''$ has at least two distinct real zeros.

Solution: None.

Lean 4 formal statement:
theorem putnam_2015_b1
(f : ℝ → ℝ)
(nzeros : (ℝ → ℝ) → ℕ → Prop)
(fdiff : ContDiff ℝ 2 f ∧ Differentiable ℝ (iteratedDeriv 2 f))
(hnzeros : ∀ f' : ℝ → ℝ, ∀ n : ℕ, nzeros f' n = ({x : ℝ | f' x = 0}.encard ≥ n))
(fzeros : nzeros f 5)
: nzeros (f + 6 * deriv f + 12 * iteratedDeriv 2 f + 8 * iteratedDeriv 3 f) 2 :=
sorry
Problem: putnam_2015_b2
Tags: number_theory

Given a list of the positive integers $1,2,3,4,\dots$, take the first three numbers $1,2,3$ and their sum $6$ and cross all four numbers off the list. Repeat with the three smallest remaining numbers $4,5,7$ and their sum $16$. Continue in this way, crossing off the three smallest remaining numbers and their sum, and consider the sequence of sums produced: $6,16,27,36,\dots$. Prove or disprove that there is some number in the sequence whose base $10$ representation ends with $2015$.

Solution: Show that such a number does exist.

Lean 4 formal statement:
abbrev putnam_2015_b2_solution : Prop := sorry
theorem putnam_2015_b2
(sets : ℕ → Set ℕ)
(Smin3 : Set ℕ → (Fin 3 → ℕ))
(sums : ℕ → ℕ)
(hsets0 : sets 0 = Set.Ici 1)
(hmin3 : ∀ S : Set ℕ, S.encard ≥ 3 → ((Smin3 S) 0 = sInf S ∧ (Smin3 S) 1 = sInf (S \ {(Smin3 S) 0}) ∧ (Smin3 S) 2 = sInf (S \ {(Smin3 S) 0, (Smin3 S) 1})))
(hsums : ∀ n : ℕ, sums n = (Smin3 (sets n)) 0 + (Smin3 (sets n)) 1 + (Smin3 (sets n)) 2)
(hsetsn : ∀ n : ℕ, sets (n + 1) = sets n \ {(Smin3 (sets n)) 0, (Smin3 (sets n)) 1, (Smin3 (sets n)) 2, sums n})
: (∃ n : ℕ, List.IsPrefix [5, 1, 0, 2] (Nat.digits 10 (sums n))) ↔ putnam_2015_b2_solution :=
sorry
Problem: putnam_2015_b3
Tags: linear_algebra

Let $S$ be the set of all $2 \times 2$ real matrices $M=\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ whose entries $a,b,c,d$ (in that order) form an arithmetic progression. Find all matrices $M$ in $S$ for which there is some integer $k>1$ such that $M^k$ is also in $S$.

Solution: Show that matrices of the form $\alpha A$ or $\beta B$, where $A=\left(\begin{smallmatrix} 1 & 1 \\ 1 & 1 \end{smallmatrix}\right)$, $B=\left(\begin{smallmatrix} -3 & -1 \\ 1 & 3 \end{smallmatrix}\right)$, and $\alpha,\beta \in \mathbb{R}$, are the only matrices in $S$ that satisfy the given condition.

Lean 4 formal statement:
abbrev putnam_2015_b3_solution : Set (Matrix (Fin 2) (Fin 2) ℝ) := sorry
theorem putnam_2015_b3
  (M : Matrix (Fin 2) (Fin 2) ℝ)
  (S : Set (Matrix (Fin 2) (Fin 2) ℝ))
  (hS : S = {M' | (M' 0 1 - M' 0 0 = M' 1 0 - M' 0 1) ∧ (M' 1 0 - M' 0 1 = M' 1 1 - M' 1 0)}) :
  (M ∈ S ∧ (∃ k > 1, M ^ k ∈ S)) ↔ M ∈ putnam_2015_b3_solution :=
sorry
Problem: putnam_2015_b4
Tags: algebra

Let $T$ be the set of all triples $(a,b,c)$ of positive integers for which there exist triangles with side lengths $a,b,c$. Express
\[
\sum_{(a,b,c) \in T} \frac{2^a}{3^b 5^c}
\]
as a rational number in lowest terms.

Solution: The answer is $17/21$.

Lean 4 formal statement:
abbrev putnam_2015_b4_solution : ℤ × ℕ := sorry
theorem putnam_2015_b4
(quotientof : ℚ → (ℤ × ℕ))
(hquotientof : ∀ q : ℚ, quotientof q = (q.num, q.den))
: quotientof (∑' t : (Fin 3 → ℤ), if (∀ n : Fin 3, t n > 0) ∧ t 0 < t 1 + t 2 ∧ t 1 < t 2 + t 0 ∧ t 2 < t 0 + t 1
then 2^(t 0)/(3^(t 1)*5^(t 2)) else 0) = putnam_2015_b4_solution :=
sorry
Problem: putnam_2015_b5
Tags: algebra

Let $P_n$ be the number of permutations $\pi$ of $\{1,2,\dots,n\}$ such that
\[
|i-j| = 1 \mbox{ implies } |\pi(i) -\pi(j)| \leq 2
\]
for all $i,j$ in $\{1,2,\dots,n\}$. Show that for $n \geq 2$, the quantity
\[
P_{n+5} - P_{n+4} - P_{n+3} + P_n
\]
does not depend on $n$, and find its value.

Solution: Prove that answer is $4$.

Lean 4 formal statement:
abbrev putnam_2015_b5_solution : ℕ := sorry
theorem putnam_2015_b5
(P : ℕ → ℕ)
(hP : P = fun n ↦ {pi : Finset.Icc 1 n → Finset.Icc 1 n | Bijective pi ∧ ∀ i j : Finset.Icc 1 n, Nat.dist i j = 1 → Nat.dist (pi i) (pi j) ≤ 2}.ncard)
: (∀ n : ℕ, n ≥ 2 →
    (P (n + 5) : ℤ) - (P (n + 4) : ℤ) - (P (n + 3) : ℤ) + (P n : ℤ) = putnam_2015_b5_solution) :=
sorry
Problem: putnam_2015_b6
Tags: analysis, number_theory

For each positive integer $k$, let $A(k)$ be the number of odd divisors of $k$ in the interval $[1,\sqrt{2k})$. Evaluate $\sum_{k=1}^\infty (-1)^{k-1}\frac{A(k)}{k}$.

Solution: Show that the sum converges to $\pi^2/16$.

Lean 4 formal statement:
noncomputable abbrev putnam_2015_b6_solution : ℝ := sorry
theorem putnam_2015_b6
    (A : ℕ → ℕ)
    (hA : ∀ k > 0, A k = {j : ℕ | Odd j ∧ j ∣ k ∧ j < Real.sqrt (2 * k)}.encard) :
    Tendsto (fun K : ℕ ↦ ∑ k ∈ Finset.Icc 1 K, (-1 : ℝ) ^ ((k : ℝ) - 1) * (A k / (k : ℝ)))
      atTop (𝓝 putnam_2015_b6_solution) :=
  sorry
Problem: putnam_2016_a1
Tags: algebra, number_theory

Find the smallest positive integer $j$ such that for every polynomial $p(x)$ with integer coefficients and for every integer $k$, the integer \[ p^{(j)}(k) = \left. \frac{d^j}{dx^j} p(x) \right|_{x=k} \] (the $j$-th derivative of $p(x)$ at $k$) is divisible by 2016.

Solution: Show that the solution is $8$.

Lean 4 formal statement:
abbrev putnam_2016_a1_solution : ℕ := sorry
theorem putnam_2016_a1 :
  IsLeast {j : ℕ | 0 < j ∧ ∀ P : ℤ[X], ∀ k : ℤ, 2016 ∣ (derivative^[j] P).eval k} putnam_2016_a1_solution :=
sorry
Problem: putnam_2016_a2
Tags: analysis

Given a positive integer $n$, let $M(n)$ be the largest integer $m$ such that
\[
\binom{m}{n-1} > \binom{m-1}{n}.
\]
Evaluate
\[
\lim_{n \to \infty} \frac{M(n)}{n}.
\]

Solution: Show that the answer is $\frac{3 + \sqrt{5}}{2}$.

Lean 4 formal statement:
noncomputable abbrev putnam_2016_a2_solution : ℝ := sorry
theorem putnam_2016_a2
    (M : ℕ → ℕ)
    (hM : ∀ n > 0, IsGreatest {m | 0 < m ∧ (m - 1).choose n < m.choose (n - 1)} (M n)) :
    Tendsto (fun n ↦ M n / (n : ℝ)) atTop (𝓝 putnam_2016_a2_solution) :=
  sorry
Problem: putnam_2016_a3
Tags: analysis

Suppose that $f$ is a function from $\mathbb{R}$ to $\mathbb{R}$ such that
\[
f(x) + f\left( 1 - \frac{1}{x} \right) = \arctan x
\]
for all real $x \neq 0$. (As usual, $y = \arctan x$ means $-\pi/2 < y < \pi/2$ and $\tan y = x$.) Find
\[
\int_0^1 f(x)\,dx.
\]

Solution: Prove that the answer is $\frac{3\pi}{8}$.

Lean 4 formal statement:
noncomputable abbrev putnam_2016_a3_solution : ℝ := sorry
theorem putnam_2016_a3
(f : ℝ → ℝ)
(hf : ∀ x : ℝ, x ≠ 0 → f x + f (1 - 1 / x) = arctan x)
: (∫ x in (0)..1, f x = putnam_2016_a3_solution) :=
sorry
Problem: putnam_2016_a5
Tags: abstract_algebra

Suppose that $G$ is a finite group generated by the two elements $g$ and $h$, where the order of $g$ is odd. Show that every element of $G$ can be written in the form
\[
g^{m_1} h^{n_1} g^{m_2} h^{n_2} \cdots g^{m_r} h^{n_r}
\]
with $1 \leq r \leq |G|$ and $m_1, n_1, m_2, n_2, \ldots, m_r, n_r \in \{-1, 1\}$.
(Here $|G|$ is the number of elements of $G$.)

Solution: None.

Lean 4 formal statement:
theorem putnam_2016_a5
(G : Type*) [Group G]
(Gfin : Fintype G)
(g h : G)
(ghgen : Subgroup.closure {g, h} = ⊤ ∧ ¬Subgroup.closure {g} = ⊤ ∧ ¬Subgroup.closure {h} = ⊤)
(godd : Odd (orderOf g))
(S : Set G)
(hS : S = {g * h, g⁻¹ * h, g * h⁻¹, g⁻¹ * h⁻¹})
: (∀ x : G, ∃ mn : List G, 1 ≤ mn.length ∧ mn.length ≤ Gfin.card ∧ ∀ i : Fin mn.length, mn.get i ∈ S ∧ x = List.prod mn) :=
sorry
Problem: putnam_2016_a6
Tags: algebra

Find the smallest constant $C$ such that for every real polynomial $P(x)$ of degree $3$ that has a root in the interval $[0,1]$,
\[
\int_0^1 \left| P(x) \right|\,dx \leq C \max_{x \in [0,1]} \left| P(x) \right|.
\]

Solution: Prove that the smallest such value of $C$ is $\frac{5}{6}$.

Lean 4 formal statement:
noncomputable abbrev putnam_2016_a6_solution : ℝ := sorry
theorem putnam_2016_a6
  (p : ℝ → Prop)
  (hp : ∀ c, p c ↔
          ∀ P : Polynomial ℝ, P.degree = 3 →
          (∃ x ∈ Icc 0 1, P.eval x = 0) →
          ∫ x in (0)..1, |P.eval x| ≤ c * (sSup {y | ∃ x ∈ Icc 0 1, y = |P.eval x|})) :
  IsLeast p putnam_2016_a6_solution :=
sorry
Problem: putnam_2016_b1
Tags: analysis

Let $x_0,x_1,x_2,\dots$ be the sequence such that $x_0=1$ and for $n \geq 0$,
\[
x_{n+1} = \ln(e^{x_n} - x_n)
\]
(as usual, the function $\ln$ is the natural logarithm). Show that the infinite series
\[
x_0 + x_1 + x_2 + \cdots
\]
converges and find its sum.

Solution: The sum converges to $e - 1$.

Lean 4 formal statement:
noncomputable abbrev putnam_2016_b1_solution : ℝ := sorry
theorem putnam_2016_b1
(x : ℕ → ℝ)
(hx0 : x 0 = 1)
(hxn : ∀ n : ℕ, x (n + 1) = log (exp (x n) - (x n)))
: (∑' n : ℕ, x n = putnam_2016_b1_solution) :=
sorry