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

Given a finite string $S$ of symbols $X$ and $O$, we write $\Delta(S)$ for the number of $X$'s in $S$ minus the number of $O$'s. For example, $\Delta(XOOXOOX)=-1$. We call a string $S$ \emph{balanced} if every substring $T$ of (consecutive symbols of) $S$ has $-2 \leq \Delta(T) \leq 2$. Thus, $XOOXOOX$ is not balanced, since it contains the substring $OOXOO$. Find, with proof, the number of balanced strings of length $n$.

Solution: Show that the number of balanced strings of length $n$ is $3 \cdot 2^{n/2}-2$ if $n$ is even, and $2^{(n+1)/2}-2$ if $n$ is odd.

Lean 4 formal statement:
abbrev putnam_1996_b5_solution : ℕ → ℕ := sorry
theorem putnam_1996_b5
    (n : ℕ)
    (Δ : (Fin n → ℤˣ) → Fin n → Fin n → ℤ)
    (balanced : (Fin n → ℤˣ) → Prop)
    (hΔ : ∀ S, ∀ a b, a ≤ b → Δ S a b = ∑ i ∈ Finset.Icc a b, (S i : ℤ))
    (hbalanced : ∀ S, balanced S ↔ ∀ a b, a ≤ b → |Δ S a b| ≤ 2) :
    {S : Fin n → ℤˣ | balanced S}.ncard = putnam_1996_b5_solution n :=
  sorry
Problem: putnam_1997_a3
Tags: analysis

Evaluate \begin{gather*} \int_0^\infty \left(x-\frac{x^3}{2}+\frac{x^5}{2\cdot 4}-\frac{x^7}{2\cdot 4\cdot 6}+\cdots\right) \\ \left(1+\frac{x^2}{2^2}+\frac{x^4}{2^2\cdot 4^2}+\frac{x^6}{2^2\cdot 4^2 \cdot 6^2}+\cdots\right)\,dx. \end{gather*}

Solution: Show that the solution is $\sqrt{e}$.

Lean 4 formal statement:
noncomputable abbrev putnam_1997_a3_solution : ℝ := sorry
theorem putnam_1997_a3
(series1 series2 : ℝ → ℝ)
(hseries1 : series1 = fun x => ∑' n : ℕ, (-1)^n * x^(2*n + 1)/(∏ i : Finset.range n, 2 * ((i : ℝ) + 1)))
(hseries2 : series2 = fun x => ∑' n : ℕ, x^(2*n)/(∏ i : Finset.range n, (2 * ((i : ℝ) + 1))^2))
: Tendsto (fun t => ∫ x in Set.Icc 0 t, series1 x * series2 x) atTop (𝓝 (putnam_1997_a3_solution)) :=
sorry
Problem: putnam_1997_a4
Tags: abstract_algebra

Let $G$ be a group with identity $e$ and $\phi:G\rightarrow G$ a function such that \[\phi(g_1)\phi(g_2)\phi(g_3)=\phi(h_1)\phi(h_2)\phi(h_3)\] whenever $g_1g_2g_3=e=h_1h_2h_3$. Prove that there exists an element $a\in G$ such that $\psi(x)=a\phi(x)$ is a homomorphism (i.e. $\psi(xy)=\psi(x)\psi(y)$ for all $x,y\in G$).

Solution: None.

Lean 4 formal statement:
theorem putnam_1997_a4
(G : Type*)
[Group G]
(φ : G → G)
(hφ : ∀ g1 g2 g3 h1 h2 h3 : G, (g1 * g2 * g3 = 1 ∧ h1 * h2 * h3 = 1) → φ g1 * φ g2 * φ g3 = φ h1 * φ h2 * φ h3)
: ∃ a : G, let ψ := fun g => a * φ g; ∀ x y : G, ψ (x * y) = ψ x * ψ y :=
sorry
Problem: putnam_1997_a5
Tags: number_theory

Let $N_n$ denote the number of ordered $n$-tuples of positive integers $(a_1,a_2,\ldots,a_n)$ such that $1/a_1 + 1/a_2 +\ldots + 1/a_n=1$.  Determine whether $N_{10}$ is even or odd.

Solution: Show that $N_{10}$ is odd.

Lean 4 formal statement:
abbrev putnam_1997_a5_solution : Prop := sorry
theorem putnam_1997_a5
(N : (n : ℕ+) → Set (Fin n → ℕ+))
(hN : N = fun (n : ℕ+) => {t : Fin n → ℕ+ | (∑ i : Fin n, (1 : ℝ)/(t i) = 1) })
: Odd (N 10).ncard ↔ putnam_1997_a5_solution :=
sorry
Problem: putnam_1997_a6
Tags: algebra

For a positive integer $n$ and any real number $c$, define $x_k$ recursively by $x_0=0$, $x_1=1$, and for $k\geq 0$, \[x_{k+2}=\frac{cx_{k+1}-(n-k)x_k}{k+1}.\] Fix $n$ and then take $c$ to be the largest value for which $x_{n+1}=0$. Find $x_k$ in terms of $n$ and $k$, $1\leq k\leq n$.

Solution: Show that the solution is that $x_k = {n - 1 \choose k - 1}$.

Lean 4 formal statement:
abbrev putnam_1997_a6_solution : ℤ → ℤ → ℝ := sorry
theorem putnam_1997_a6
  (n : ℤ)
  (hn : n > 0)
  (x : ℝ → (ℤ → ℝ))
  (hx0 : ∀ c, x c 0 = 0)
  (hx1 : ∀ c, x c 1 = 1)
  (hxk : ∀ c, ∀ k ≥ 0, x c (k + 2) = (c*(x c (k + 1)) - (n - k)*(x c k))/(k + 1))
  (S : Set ℝ)
  (hS : S = {c : ℝ | x c (n + 1) = 0}) :
  ∀ k : Set.Icc 1 n, x (sSup S) k = putnam_1997_a6_solution n k :=
sorry
Problem: putnam_1997_b1
Tags: algebra

Let $\{x\}$ denote the distance between the real number $x$ and the nearest integer.  For each positive integer $n$, evaluate \[F_n=\sum_{m=1}^{6n-1} \min(\{\frac{m}{6n}\},\{\frac{m}{3n}\}).\] (Here $\min(a,b)$ denotes the minimum of $a$ and $b$.)

Solution: Show that the solution is $n$.

Lean 4 formal statement:
abbrev putnam_1997_b1_solution : ℕ → ℝ := sorry
noncomputable def dist_to_int : ℝ → ℝ := fun r => |r - round r|
theorem putnam_1997_b1
(F : ℕ → ℝ)
(hF : F = fun (n : ℕ) => ∑ m ∈ Finset.Icc 1 (6 * n - 1), min (dist_to_int (m/(6*n)) ) (dist_to_int (m/(3*n))))
: ∀ n, n > 0 → F n = putnam_1997_b1_solution n :=
sorry
Problem: putnam_1997_b2
Tags: analysis

Let $f$ be a twice-differentiable real-valued function satisfying \[f(x)+f''(x)=-xg(x)f'(x),\] where $g(x)\geq 0$ for all real $x$.  Prove that $|f(x)|$ is bounded.

Solution: None.

Lean 4 formal statement:
theorem putnam_1997_b2
(f g : ℝ → ℝ)
(hg : ∀ x : ℝ, g x ≥ 0)
(hfderiv1 : ContDiff ℝ 1 f)
(hfderiv2 : Differentiable ℝ (deriv f))
(hfg : ∀ x : ℝ, f x + iteratedDeriv 2 f x = -x * g x * deriv f x)
: IsBounded (range (fun x => |f x|)) :=
sorry
Problem: putnam_1997_b3
Tags: number_theory

For each positive integer $n$, write the sum $\sum_{m=1}^n 1/m$ in the form $p_n/q_n$, where $p_n$ and $q_n$ are relatively prime positive integers.  Determine all $n$ such that 5 does not divide $q_n$.

Solution: Show that the solution is the set of natural numbers which are between $1$ and $4$, or between $20$ and $24$, or between $100$ and $104$, or between $120$ and $124$.

Lean 4 formal statement:
abbrev putnam_1997_b3_solution : Set ℕ := sorry
theorem putnam_1997_b3
(n : ℕ)
(hn : n > 0)
: n ∈ putnam_1997_b3_solution ↔ ¬5 ∣ (∑ m ∈ Finset.Icc 1 n, 1/m : ℚ).den :=
sorry
Problem: putnam_1997_b4
Tags: algebra

Let $a_{m,n}$ denote the coefficient of $x^n$ in the expansion of $(1+x+x^2)^m$.  Prove that for all [integers] $k\geq 0$, \[0\leq \sum_{i=0}^{\lfloor \frac{2k}{3}\rfloor} (-1)^i a_{k-i,i}\leq 1.\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1997_b4
    (a : ℕ → ℕ → ℤ)
    (ha : ∀ m n, a m n = coeff ((1 + X + X ^ 2) ^ m) n)
    (k : ℕ) :
    (∑ i ∈ Finset.Iic ⌊2 * (k : ℚ) / 3⌋₊, (-1) ^ i * a (k - i) i) ∈ Icc 0 1 :=
  sorry
Problem: putnam_1997_b5
Tags: number_theory

Prove that for $n\geq 2$, \[\overbrace{2^{2^{\cdots^{2}}}}^{\mbox{$n$ terms}} \equiv \overbrace{2^{2^{\cdots^{2}}}}^{\mbox{$n-1$ terms}} \quad \pmod{n}.\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1997_b5
(n : ℕ)
(hn : n ≥ 2)
: tetration 2 n ≡ tetration 2 (n-1) [MOD n] :=
sorry
Problem: putnam_1998_a2
Tags: geometry

Let $s$ be any arc of the unit circle lying entirely in the first quadrant. Let $A$ be the area of the region lying below $s$ and above the $x$-axis and let $B$ be the area of the region lying to the right of the $y$-axis and to the left of $s$. Prove that $A+B$ depends only on the arc length, and not on the position, of $s$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1998_a2
(quadrant : (EuclideanSpace ℝ (Fin 2)) → Prop)
(isarc : (EuclideanSpace ℝ (Fin 2)) → (EuclideanSpace ℝ (Fin 2)) → Prop)
(hquadrant : ∀ P, quadrant P ↔ P 0 > 0 ∧ P 1 > 0 ∧ dist 0 P = 1)
(hisarc : ∀ P Q, isarc P Q ↔ quadrant P ∧ quadrant Q ∧ P 0 > Q 0)
(arc : (EuclideanSpace ℝ (Fin 2)) → (EuclideanSpace ℝ (Fin 2)) → Set (EuclideanSpace ℝ (Fin 2)))
(harc : arc = fun P Q ↦ {R : EuclideanSpace ℝ (Fin 2) | quadrant R ∧ P 0 > R 0 ∧ R 0 > Q 0})
(A B : (EuclideanSpace ℝ (Fin 2)) → (EuclideanSpace ℝ (Fin 2)) → ℝ)
(hA : A = fun P Q ↦ (MeasureTheory.volume {S : EuclideanSpace ℝ (Fin 2) | ∃ R ∈ arc P Q, R 0 = S 0 ∧ R 1 > S 1 ∧ S 1 > 0}).toReal)
(hB : B = fun P Q ↦ (MeasureTheory.volume {S : EuclideanSpace ℝ (Fin 2) | ∃ R ∈ arc P Q, R 1 = S 1 ∧ R 0 > S 0 ∧ S 0 > 0}).toReal)
: (∃ f : ℝ → ℝ, ∀ P Q : EuclideanSpace ℝ (Fin 2), isarc P Q → A P Q + B P Q = f (InnerProductGeometry.angle P Q)) :=
sorry
Problem: putnam_1998_a3
Tags: analysis

Let $f$ be a real function on the real line with continuous third derivative.  Prove that there exists a point $a$ such that \[f(a)\cdot f'(a) \cdot f''(a) \cdot f'''(a)\geq 0 .\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1998_a3
(f : ℝ → ℝ)
(hf : ContDiff ℝ 3 f)
: ∃ a : ℝ, (f a) * (deriv f a) * (iteratedDeriv 2 f a) * (iteratedDeriv 3 f a) ≥ 0 :=
sorry
Problem: putnam_1998_a4
Tags: algebra

Let $A_1=0$ and $A_2=1$. For $n>2$, the number $A_n$ is defined by concatenating the decimal expansions of $A_{n-1}$ and $A_{n-2}$ from left to right.  For example $A_3=A_2 A_1=10$, $A_4=A_3 A_2 = 101$, $A_5=A_4 A_3 = 10110$, and so forth.  Determine all $n$ such that $11$ divides $A_n$.

Solution: Show that the solution is those n for which n can be written as 6k+1 for some integer k.

Lean 4 formal statement:
abbrev putnam_1998_a4_solution : Set ℕ := sorry
theorem putnam_1998_a4
    (A : ℕ → List ℕ)
    (hA1 : A 1 = [0])
    (hA2 : A 2 = [1])
    (hA : ∀ n > 0, A (n + 2) = A (n + 1) ++ A n) :
    {n | 1 ≤ n ∧ 11 ∣ Nat.ofDigits 10 (A n).reverse} = putnam_1998_a4_solution :=
  sorry
Problem: putnam_1998_a5
Tags: analysis

Let $\mathcal F$ be a finite collection of open discs in $\mathbb R^2$ whose union contains a set $E\subseteq \mathbb R^2$.  Show that there is a pairwise disjoint subcollection $D_1,\ldots, D_n$ in $\mathcal F$ such that \[E\subseteq \cup_{j=1}^n 3D_j.\] Here, if $D$ is the disc of radius $r$ and center $P$, then $3D$ is the disc of radius $3r$ and center $P$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1998_a5
  (k : ℕ)
  (c : Fin k → (EuclideanSpace ℝ (Fin 2)))
  (r : Fin k → ℝ)
  (hr : ∀ i, r i > 0)
  (E : Set (EuclideanSpace ℝ (Fin 2)))
  (hE : E ⊆ ⋃ i, ball (c i) (r i)) :
  ∃ (n : ℕ) (t : Fin n → Fin k),
    (∀ i j, i ≠ j → (ball (c (t i)) (r (t i)) ∩ ball (c (t j)) (r (t j)) = ∅)) ∧
    E ⊆ ⋃ i : Fin n, ball (c (t i)) (3 * (r (t i))) :=
sorry
Problem: putnam_1998_a6
Tags: geometry

Let $A, B, C$ denote distinct points with integer coordinates in $\mathbb R^2$. Prove that if
\[(|AB|+|BC|)^2<8\cdot [ABC]+1\]
then $A, B, C$ are three vertices of a square. Here $|XY|$ is the length of segment $XY$ and $[ABC]$ is the area of triangle $ABC$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1998_a6
(A B C : EuclideanSpace ℝ (Fin 2))
(hint : ∀ i : Fin 2, ∃ a b c : ℤ, A i = a ∧ B i = b ∧ C i = c)
(htriangle : A ≠ B ∧ A ≠ C ∧ B ≠ C)
(harea : (dist A B + dist B C) ^ 2 < 8 * (MeasureTheory.volume (convexHull ℝ {A, B, C})).toReal + 1)
(threesquare : (EuclideanSpace ℝ (Fin 2)) → (EuclideanSpace ℝ (Fin 2)) → (EuclideanSpace ℝ (Fin 2)) → Prop)
(threesquare_def : threesquare = fun P Q R ↦ dist Q P = dist Q R ∧ ⟪P - Q, R - Q⟫_ℝ = 0)
: (threesquare A B C ∨ threesquare B C A ∨ threesquare C A B) :=
sorry
Problem: putnam_1998_b1
Tags: algebra

Find the minimum value of \[\frac{(x+1/x)^6-(x^6+1/x^6)-2}{(x+1/x)^3+(x^3+1/x^3)}\] for $x>0$.

Solution: Show that the minimum value is 6.

Lean 4 formal statement:
abbrev putnam_1998_b1_solution : ℝ := sorry
theorem putnam_1998_b1
: sInf {((x + 1/x)^6 - (x^6 + 1/x^6) - 2)/((x + 1/x)^3 + (x^3 + 1/x^3)) | x > (0 : ℝ)} = putnam_1998_b1_solution :=
sorry
Problem: putnam_1998_b2
Tags: geometry, algebra

Given a point $(a,b)$ with $0< b< a$, determine the minimum perimeter of a triangle with one vertex at $(a,b)$, one on the $x$-axis, and one on the line $y=x$.  You may assume that a triangle of minimum perimeter exists.

Solution: Show that the solution is $\sqrt{2a^2 + 2b^2}.

Lean 4 formal statement:
noncomputable abbrev putnam_1998_b2_solution : ℝ → ℝ → ℝ := sorry
theorem putnam_1998_b2
(a b : ℝ)
(hab : 0 < b ∧ b < a)
: sInf {d : ℝ | ∃ (c : ℝ) (x : ℝ), d = Real.sqrt ((a - c)^2 + (b - 0)^2) +  Real.sqrt ((c - x)^2 + (0 - x)^2) + Real.sqrt ((a - x)^2 + (b - x)^2) ∧
  Real.sqrt ((a - c)^2 + (b - 0)^2) + Real.sqrt ((c - x)^2 + (0 - x)^2) > Real.sqrt ((a - x)^2 + (b - x)^2) ∧
  Real.sqrt ((a - c)^2 + (b - 0)^2) + Real.sqrt ((a - x)^2 + (b - x)^2) > Real.sqrt ((c - x)^2 + (0 - x)^2) ∧
  Real.sqrt ((c - x)^2 + (0 - x)^2) + Real.sqrt ((a - x)^2 + (b - x)^2) > Real.sqrt ((a - c)^2 + (b - 0)^2)}
 = putnam_1998_b2_solution a b :=
sorry
Problem: putnam_1998_b4
Tags: number_theory

Find necessary and sufficient conditions on positive integers $m$ and $n$ so that \[\sum_{i=0}^{mn-1} (-1)^{\lfloor i/m \rfloor +\lfloor i/n\rfloor}=0.\]

Solution: Show that the sum is 0 if and only if the largest powers of $2$ dividing $m$ and $n$ are different.

Lean 4 formal statement:
abbrev putnam_1998_b4_solution : Set (ℕ × ℕ) := sorry
theorem putnam_1998_b4
  (quantity : ℕ → ℕ → ℤ)
  (hquantity : quantity = fun n m => ∑ i ∈ Finset.range (m * n), (-1)^(i/m + i/n))
  (n m : ℕ)
  (hnm : n > 0 ∧ m > 0) :
  quantity n m = 0 ↔ ⟨n, m⟩ ∈ putnam_1998_b4_solution :=
sorry
Problem: putnam_1998_b5
Tags: number_theory

Let $N$ be the positive integer with 1998 decimal digits, all of them 1; that is, \[N=1111\cdots 11.\] Find the thousandth digit after the decimal point of $\sqrt N$.

Solution: Show that the thousandth digit is 1.

Lean 4 formal statement:
abbrev putnam_1998_b5_solution : ℕ := sorry
theorem putnam_1998_b5
(N : ℕ)
(hN : N = ∑ i ∈ Finset.range 1998, 10^i)
: putnam_1998_b5_solution = (Nat.floor (10^1000 * Real.sqrt N)) % 10 :=
sorry
Problem: putnam_1998_b6
Tags: number_theory

Prove that, for any integers $a, b, c$, there exists a positive integer $n$ such that $\sqrt{n^3+an^2+bn+c}$ is not an integer.

Solution: None.

Lean 4 formal statement:
theorem putnam_1998_b6
: ∀ a b c : ℤ, ∃ n : ℤ, n > 0 ∧ ¬(∃ k : ℤ, k = Real.sqrt (n^3 + a * n^2 + b * n + c)) :=
sorry
Problem: putnam_1999_a1
Tags: algebra

Find polynomials $f(x)$,$g(x)$, and $h(x)$, if they exist, such that for all $x$, \[|f(x)|-|g(x)|+h(x) = \begin{cases} -1 & \mbox{if $x<-1$} \\3x+2 & \mbox{if $-1 \leq x \leq 0$} \\-2x+2 & \mbox{if $x>0$.}\end{cases}\]?

Solution: Show that the answer is such functions do exist.

Lean 4 formal statement:
abbrev putnam_1999_a1_solution : Prop := sorry
theorem putnam_1999_a1
: putnam_1999_a1_solution ↔ ∃ f g h : Polynomial ℝ, ∀ x : ℝ, |f.eval x| - |g.eval x| + h.eval x = if x < -1 then -1 else (if (x ≤ 0) then 3 * x + 2 else -2 * x + 2) :=
sorry
Problem: putnam_1999_a2
Tags: algebra

Let $p(x)$ be a polynomial that is nonnegative for all real $x$.  Prove that for some $k$, there are polynomials $f_1(x),\dots,f_k(x$) such that \[p(x) =  \sum_{j=1}^k (f_j(x))^2.\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1999_a2
(p : Polynomial ℝ)
(hp : ∀ x, p.eval x ≥ 0)
: ∃ᵉ (k) (f : Fin k → Polynomial ℝ),
    k > 0 ∧
    ∀ x : ℝ, p.eval x = ∑ j : Fin k, ((f j).eval x) ^ 2 :=
sorry
Problem: putnam_1999_a3
Tags: algebra

Consider the power series expansion \[\frac{1}{1-2x-x^2} = \sum_{n=0}^\infty a_n x^n.\] Prove that, for each integer $n\geq 0$, there is an integer $m$ such that \[a_n^2 + a_{n+1}^2 = a_m .\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1999_a3
    (f : ℝ → ℝ)
    (hf : f = fun x ↦ 1 / (1 - 2 * x - x ^ 2))
    (a : ℕ → ℝ)
    (hf' : ∀ᶠ x in 𝓝 0, Tendsto (fun N : ℕ ↦ ∑ n ∈ Finset.range N, (a n) * x ^ n) atTop (𝓝 (f x)))
    (n : ℕ) :
    ∃ m : ℕ, (a n) ^ 2 + (a (n + 1)) ^ 2 = a m :=
  sorry
Problem: putnam_1999_a4
Tags: number_theory

Sum the series \[\sum_{m=1}^\infty \sum_{n=1}^\infty \frac{m^2 n}{3^m(n3^m+m3^n)}.\]

Solution: Show that the solution is 9/32.

Lean 4 formal statement:
noncomputable abbrev putnam_1999_a4_solution : ℝ := sorry
theorem putnam_1999_a4
: Tendsto (fun i => ∑ m ∈ Finset.range i, ∑' n : ℕ, (((m + 1)^2*(n+1))/(3^(m + 1) * ((n+1)*3^(m + 1) + (m + 1)*3^(n+1))) : ℝ)) atTop (𝓝 putnam_1999_a4_solution) :=
sorry
Problem: putnam_1999_a5
Tags: analysis

Prove that there is a constant $C$ such that, if $p(x)$ is a polynomial of degree 1999, then \[|p(0)|\leq C \int_{-1}^1 |p(x)|\,dx.\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1999_a5
: ∃ C : ℝ, ∀ p : Polynomial ℝ, p.degree = 1999 → ‖p.eval 0‖ ≤ C * ∫ x in (-1)..1, ‖p.eval x‖ :=
sorry
Problem: putnam_1999_a6
Tags: algebra

The sequence $(a_n)_{n\geq 1}$ is defined by $a_1=1, a_2=2, a_3=24,$ and, for $n\geq 4$, \[a_n = \frac{6a_{n-1}^2a_{n-3} - 8a_{n-1}a_{n-2}^2}{a_{n-2}a_{n-3}}.\] Show that, for all n, $a_n$ is an integer multiple of $n$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1999_a6
(a : ℤ → ℝ)
(ha1 : a 1 = 1)
(ha2 : a 2 = 2)
(ha3 : a 3 = 24)
(hange4 : ∀ n : ℕ, n ≥ 4 → a n = (6 * (a (n - 1))^2 * (a (n - 3)) - 8 * (a (n - 1)) * (a (n - 2))^2)/(a (n - 2) * a (n - 3)))
: ∀ n, n ≥ 1 → (∃ k : ℤ, a n = k * n) :=
sorry
Problem: putnam_1999_b2
Tags: analysis

Let $P(x)$ be a polynomial of degree $n$ such that $P(x)=Q(x)P''(x)$, where $Q(x)$ is a quadratic polynomial and $P''(x)$ is the second derivative of $P(x)$.  Show that if $P(x)$ has at least two distinct roots then it must have $n$ distinct roots.

Solution: None.

Lean 4 formal statement:
theorem putnam_1999_b2
  (P Q : Polynomial ℂ)
  (hQ : Q.natDegree = 2)
  (hP : ∀ x : ℂ, P.eval x = (Q.eval x) * (Polynomial.derivative^[2] P).eval x) :
  (∃ x1 x2, x1 ≠ x2 ∧ P.eval x1 = 0 ∧ P.eval x2 = 0) →
  (∃ f : Fin (P.natDegree) → ℂ,
    (∀ i j, i ≠ j → f i ≠ f j) ∧
    (∀ i, P.eval (f i) = 0)) :=
sorry
Problem: putnam_1999_b3
Tags: algebra

Let $A=\{(x,y):0\leq x,y<1\}$.  For $(x,y)\in A$, let \[S(x,y) = \sum_{\frac{1}{2}\leq \frac{m}{n}\leq 2} x^m y^n,\] where the sum ranges over all pairs $(m,n)$ of positive integers satisfying the indicated inequalities.  Evaluate \[\lim_{(x,y)\rightarrow (1,1), (x,y)\in A} (1-xy^2)(1-x^2y)S(x,y).\]

Solution: Show that the answer is 3.

Lean 4 formal statement:
abbrev putnam_1999_b3_solution : ℝ := sorry
theorem putnam_1999_b3
(A : Set (ℝ × ℝ))
(hA : A = {xy | 0 ≤ xy.1 ∧ xy.1 < 1 ∧ 0 ≤ xy.2 ∧ xy.2 < 1})
(S : ℝ → ℝ → ℝ)
(hS : S = fun x y => ∑' m : ℕ, ∑' n : ℕ, if (m > 0 ∧ n > 0 ∧ (1 : ℝ)/2 ≤ (m : ℝ)/n ∧ (m : ℝ)/n ≤ 2) then x^m * y^n else 0)
: Tendsto (fun xy : (ℝ × ℝ) => (1 - xy.1 * xy.2^2) * (1 - xy.1^2 * xy.2) * (S xy.1 xy.2)) (𝓝[A] ⟨1,1⟩) (𝓝 putnam_1999_b3_solution) :=
sorry
Problem: putnam_1999_b4
Tags: analysis

Let $f$ be a real function with a continuous third derivative such that $f(x), f'(x), f''(x), f'''(x)$ are positive for all $x$.  Suppose that $f'''(x)\leq f(x)$ for all $x$.  Show that $f'(x)<2f(x)$ for all $x$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1999_b4
(f : ℝ → ℝ)
(hf : ContDiff ℝ 3 f)
(hpos: ∀ n ≤ 3, ∀ x : ℝ, iteratedDeriv n f x > 0)
(hle : ∀ x : ℝ, iteratedDeriv 3 f x ≤ f x)
: ∀ x : ℝ, deriv f x < 2 * (f x) :=
sorry
Problem: putnam_1999_b5
Tags: linear_algebra

For an integer $n\geq 3$, let $\theta=2\pi/n$.  Evaluate the determinant of the $n\times n$ matrix $I+A$, where $I$ is the $n\times n$ identity matrix and $A=(a_{jk})$ has entries $a_{jk}=\cos(j\theta+k\theta)$ for all $j,k$.

Solution: Show that the answer is $(1 - n^2)/4$.

Lean 4 formal statement:
noncomputable abbrev putnam_1999_b5_solution : ℕ → ℝ := sorry
theorem putnam_1999_b5
  (n : ℕ)
  (hn : n ≥ 3)
  (theta : ℝ)
  (htheta : theta = 2 * Real.pi / n)
  (A : Matrix (Fin n) (Fin n) ℝ)
  (hA : A = fun j k => Real.cos ((j.1 + 1) * theta + (k.1 + 1) * theta)) :
  (1 + A).det = putnam_1999_b5_solution n :=
sorry
Problem: putnam_1999_b6
Tags: number_theory

Let $S$ be a finite set of integers, each greater than 1.  Suppose that for each integer $n$ there is some $s\in S$ such that $\gcd(s,n)=1$ or $\gcd(s,n)=s$.  Show that there exist $s,t\in S$ such that $\gcd(s,t)$ is prime.

Solution: None.

Lean 4 formal statement:
theorem putnam_1999_b6
  (S : Finset ℤ)
  (hSgt : ∀ s, s ∈ S → s > 1)
  (hSgcd : ∀ n, ∃ s ∈ S, Int.gcd s n = 1 ∨ Int.gcd s n = s) :
  ∃ᵉ (s ∈ S) (t ∈ S), Prime (Int.gcd s t) :=
sorry
Problem: putnam_2000_a1
Tags: analysis

Let $A$ be a positive real number. What are the possible values of $\sum_{j=0}^\infty x_j^2$, given that $x_0,x_1,\ldots$ are positive numbers for which $\sum_{j=0}^\infty x_j=A$?

Solution: Show that the possible values comprise the interval $(0,A^2)$.

Lean 4 formal statement:
abbrev putnam_2000_a1_solution : ℝ → Set ℝ := sorry
theorem putnam_2000_a1
(A : ℝ)
(Apos : A > 0)
: {S : ℝ |
    ∃ x : ℕ → ℝ,
      (∀ j : ℕ, x j > 0) ∧
      (∑' j : ℕ, x j) = A ∧
      (∑' j : ℕ, (x j) ^ 2) = S}
  = putnam_2000_a1_solution A :=
sorry
Problem: putnam_2000_a2
Tags: number_theory

Prove that there exist infinitely many integers $n$ such that $n,n+1,n+2$ are each the sum of the squares of two integers.

Solution: None.

Lean 4 formal statement:
theorem putnam_2000_a2 :
  ∀ n : ℕ,
    ∃ N : ℤ,
      ∃ i : Fin 6 → ℕ,
        N > n ∧
        N = (i 0)^2 + (i 1)^2 ∧
        N + 1 = (i 2)^2 + (i 3)^2 ∧
        N + 2 = (i 4)^2 + (i 5)^2 :=
  sorry
Problem: putnam_2000_a4
Tags: analysis

Show that the improper integral $\lim_{B \to \infty} \int_0^B \sin(x)\sin(x^2)\,dx$ converges.

Solution: None.

Lean 4 formal statement:
theorem putnam_2000_a4
: ∃ y : ℝ, Tendsto (fun B : ℝ => ∫ x in Set.Ioo 0 B, Real.sin x * Real.sin (x ^ 2)) atTop (𝓝 y) :=
sorry
Problem: putnam_2000_a5
Tags: algebra

Three distinct points with integer coordinates lie in the plane on a circle of radius $r>0$. Show that two of these points are separated by a distance of at least $r^{1/3}$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2000_a5
  (r : ℝ)
  (z : EuclideanSpace ℝ (Fin 2))
  (p : Fin 3 → (EuclideanSpace ℝ (Fin 2)))
  (rpos : r > 0)
  (pdiff : ∀ n m, (n ≠ m) → (p n ≠ p m))
  (pint : ∀ n i, p n i = round (p n i))
  (pcirc : ∀ n, p n ∈ Metric.sphere z r) :
  ∃ n m, (n ≠ m) ∧ (dist (p n) (p m) ≥ r ^ ((1 : ℝ) / 3)) :=
sorry
Problem: putnam_2000_a6
Tags: algebra

Let $f(x)$ be a polynomial with integer coefficients. Define a sequence $a_0,a_1,\ldots$ of integers such that $a_0=0$ and $a_{n+1}=f(a_n)$ for all $n\geq 0$. Prove that if there exists a positive integer $m$ for which $a_m=0$ then either $a_1=0$ or $a_2=0$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2000_a6
(f : Polynomial ℤ)
(a : ℕ → ℤ)
(ha0 : a 0 = 0)
(ha : ∀ n : ℕ, a (n + 1) = f.eval (a n))
: ((∃ m > 0, a m = 0) → (a 1 = 0 ∨ a 2 = 0)) :=
sorry
Problem: putnam_2000_b1
Tags: algebra

Let $a_j,b_j,c_j$ be integers for $1\leq j\leq N$. Assume for each $j$, at least one of $a_j,b_j,c_j$ is odd. Show that there exist integers $r$, $s$, $t$ such that $ra_j+sb_j+tc_j$ is odd for at least $4N/7$ values of $j$, $1\leq j\leq N$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2000_b1
(N : ℕ)
(a b c : Fin N → ℤ)
(Nge1 : N ≥ 1)
(hodd : ∀ j : Fin N, Odd (a j) ∨ Odd (b j) ∨ Odd (c j))
: (∃ r s t : ℤ, {j : Fin N | Odd (r * a j + s * b j + t * c j)}.ncard ≥ (4 * N : ℝ) / 7) :=
sorry
Problem: putnam_2000_b2
Tags: number_theory, algebra

Prove that the expression
\[
\frac{gcd(m,n)}{n}\binom{n}{m}
\]
is an integer for all pairs of integers $n\geq m\geq 1$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2000_b2
: (∀ m n : ℕ, m ≥ 1 → n ≥ m → n ∣ Nat.gcd m n * Nat.choose n m) :=
sorry
Problem: putnam_2000_b3
Tags: analysis

Let $f(t)=\sum_{j=1}^N a_j \sin(2\pi jt)$, where each $a_j$ is real and $a_N$ is not equal to $0$. Let $N_k$ denote the number of zeroes (including multiplicities) of $\frac{d^k f}{dt^k}$. Prove that
\[
N_0\leq N_1\leq N_2\leq \cdots \mbox{ and } \lim_{k\to\infty} N_k = 2N.
\]

Solution: None.

Lean 4 formal statement:
theorem putnam_2000_b3
  (N : ℕ) (hN : N > 0)
  (a : Icc 1 N → ℝ)
  (f : ℝ → ℝ)
  (mult : (ℝ → ℝ) → ℝ → ℕ)
  (M : ℕ → ℕ)
  (haN : a ⟨N, by simp; omega⟩ ≠ 0)
  (hf : ∀ t, f t = ∑ j : Icc 1 N, a j * Real.sin (2 * Real.pi * j * t))
  (hmult : ∀ g : ℝ → ℝ, ∀ t : ℝ, (∃ c : ℕ, iteratedDeriv c g t ≠ 0) → (iteratedDeriv (mult g t) g t ≠ 0 ∧ ∀ k < (mult g t), iteratedDeriv k g t = 0))
  (hM : ∀ k, M k = ∑' t : Ico (0 : ℝ) 1, mult (iteratedDeriv k f) t) :
  ((∀ i j : ℕ, i ≤ j → M i ≤ M j) ∧ Tendsto M atTop (𝓝 (2 * N))) :=
sorry
Problem: putnam_2000_b4
Tags: analysis

Let $f(x)$ be a continuous function such that $f(2x^2-1)=2xf(x)$ for all $x$.  Show that $f(x)=0$ for $-1\leq x\leq 1$.

Solution: None.

Lean 4 formal statement:
theorem putnam_2000_b4
(f : ℝ → ℝ)
(hfcont : Continuous f)
(hf : ∀ x, f (2 * x ^ 2 - 1) = 2 * x * f x)
: ∀ x, x ∈ Icc (-1) 1 → f x = 0 :=
sorry