ChristianZ97/PutnamBench-lean4 huggingface dataset:
Problem: putnam_1976_a6
Tags: analysis, algebra

Suppose that $f : \mathbb{R} \to \mathbb{R}$ is a twice continuously differentiable function such that $|f(x)| \le 1$ for all real $x$ and $(f(0))^2 + (f'(0))^2 = 4$. Prove that $f(y) + f''(y) = 0$ for some real number $y$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1976_a6
(f : ℝ → ℝ)
(hfdiff : ContDiff ℝ 2 f)
(hfbd : ∀ x : ℝ, |f x| ≤ 1)
(hf0 : (f 0)^2 + (deriv f 0)^2 = 4)
: ∃ y : ℝ, (f y) + (iteratedDeriv 2 f y) = 0 :=
sorry
Problem: putnam_1976_b1
Tags: analysis

Find $$\lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n}\left(\left\lfloor \frac{2n}{k} \right\rfloor - 2\left\lfloor \frac{n}{k} \right\rfloor\right).$$ Your answer should be in the form $\ln(a) - b$, where $a$ and $b$ are positive integers.

Solution: The limit equals $\ln(4) - 1$, so $a = 4$ and $b = 1$.

Lean 4 formal statement:
abbrev putnam_1976_b1_solution : ℕ × ℕ := sorry
theorem putnam_1976_b1
: Tendsto (fun n : ℕ => ((1 : ℝ)/n)*∑ k ∈ Finset.Icc (1 : ℤ) n, (Int.floor ((2*n)/k) - 2*Int.floor (n/k))) atTop
(𝓝 (Real.log putnam_1976_b1_solution.1 - putnam_1976_b1_solution.2)) :=
sorry
Problem: putnam_1976_b2
Tags: abstract_algebra

Let $G$ be a group generated by two elements $A$ and $B$; i.e., every element of $G$ can be expressed as a finite word $A^{n_1}B^{n_2} \cdots A^{n_{k-1}}B^{n_k}$, where the $n_i$ can assume any integer values and $A^0 = B^0 = 1$. Further assume that $A^4 = B^7 = ABA^{-1}B = 1$, but $A^2 \ne 1$ and $B \ne 1$. Find the number of elements of $G$ than can be written as $C^2$ for some $C \in G$ and express each such square as a word in $A$ and $B$.

Solution: There are $8$ such squares: $1$, $A^2$, $B$, $B^2$, $B^3$, $B^4$, $B^5$, and $B^6$.

Lean 4 formal statement:
abbrev putnam_1976_b2_solution : ℕ × Set (List (ℤ × ℤ)) := sorry
theorem putnam_1976_b2
(G : Type*) [Group G]
(A B : G)
(word : List (ℤ × ℤ) → G)
(hword : word = fun w : List (ℤ × ℤ) => (List.map (fun t : ℤ × ℤ => A^(t.1)*B^(t.2)) w).prod)
(hG : ∀ g : G, ∃ w : List (ℤ × ℤ), g = word w)
(hA : A^4 = 1 ∧ A^2 ≠ 1)
(hB : B^7 = 1 ∧ B ≠ 1)
(h1 : A*B*A^(-(1 : ℤ))*B = 1)
(S : Set G)
(hS : S = {g : G | ∃ C : G, C^2 = g})
: S.ncard = putnam_1976_b2_solution.1 ∧ S = {word w | w ∈ putnam_1976_b2_solution.2} :=
sorry
Problem: putnam_1976_b3
Tags: probability

Suppose that we have $n$ events $A_1, \dots, A_n$, each of which has probability at least $1 - a$ of occufring, where $a < 1/4$. Further suppose that $A_i$ and $A_j$ are mutually independent if $|i-j| > 1$, although $A_i$ and $A_{i+1}$ may be dependent. Assume as known that the recurrence $u_{k+1} = u_k - au_{k-1}$, $u_0 = 1, u_1 = 1-a$ defines positive real numbers $u_k$ for $k = 0,1,\dots$. Show that the probability of all $A_1, \dots, A_n$ occurring is at least $u_n$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1976_b3
(Ω : Type*)
[MeasurableSpace Ω]
(μ : Measure Ω)
[IsProbabilityMeasure μ]
(n : ℕ)
(hn : n ≥ 1)
(a : ℝ)
(ha : 0 ≤ a ∧ a < 1/4)
(u : ℕ → ℝ)
(hu01 : u 0 = 1 ∧ u 1 = 1 - a)
(huk : ∀ k ≥ 1, u (k + 1) = u k - a * (u (k-1)))
(hupos : ∀ k : ℕ, u k > 0)
(events : Fin n → Set Ω)
(heventsmeas : ∀ i : Fin n, MeasurableSet (events i))
(heventsprob : ∀ i : Fin n, μ (events i) ≥ ENNReal.ofReal (1 - a))
(heventsindep : ∀ i : Fin n,
  ProbabilityTheory.Indep (MeasurableSpace.generateFrom {events i})
    (MeasurableSpace.generateFrom (Set.image events {j : Fin n | (j : ℤ) < (i : ℤ) - 1})) μ)
: μ (⋂ i : Fin n, events i) ≥ ENNReal.ofReal (u n) :=
sorry
Problem: putnam_1976_b5
Tags: algebra

Find $$\sum_{k=0}^{n} (-1)^k {n \choose k} (x - k)^n.$$

Solution: The sum equals $n!$.

Lean 4 formal statement:
noncomputable abbrev putnam_1976_b5_solution : ℕ → Polynomial ℤ := sorry
theorem putnam_1976_b5
: ∀ n : ℕ, ∑ k ∈ Finset.range (n + 1), C ((-(1 : ℤ))^k * Nat.choose n k) * (X - (C (k : ℤ)))^n = putnam_1976_b5_solution n :=
sorry
Problem: putnam_1976_b6
Tags: number_theory

Let $\sigma(N)$ denote the sum of all positive integer divisors of $N$, including $1$ and $N$. Call a positive integer $N$ \textit{quasiperfect} if $\sigma(N) = 2N + 1$. Prove that every quasiperfect number is the square of an odd integer.

Solution: None.

Lean 4 formal statement:
theorem putnam_1976_b6
(σ : ℕ → ℤ)
(hσ : σ = fun N : ℕ => ∑ d ∈ Nat.divisors N, (d : ℤ))
(quasiperfect : ℕ → Prop)
(quasiperfect_def : ∀ N, quasiperfect N ↔ σ N = 2*N + 1)
: ∀ N : ℕ, quasiperfect N → ∃ m : ℤ, Odd m ∧ m^2 = N :=
sorry
Problem: putnam_1977_a1
Tags: algebra

Show that if four distinct points of the curve $y = 2x^4 + 7x^3 + 3x - 5$ are collinear, then their average $x$-coordinate is some constant $k$. Find $k$.

Solution: Prove that $k = -\frac{7}{8}$.

Lean 4 formal statement:
noncomputable abbrev putnam_1977_a1_solution : ℝ := sorry
theorem putnam_1977_a1
(y : ℝ → ℝ)
(hy : y = fun x ↦ 2 * x ^ 4 + 7 * x ^ 3 + 3 * x - 5)
(S : Finset ℝ)
(hS : S.card = 4)
: (Collinear ℝ {P : Fin 2 → ℝ | P 0 ∈ S ∧ P 1 = y (P 0)} → (∑ x ∈ S, x) / 4 = putnam_1977_a1_solution) :=
sorry
Problem: putnam_1977_a2
Tags: algebra

Find all real solutions $(a, b, c, d)$ to the equations $a + b + c = d$, $\frac{1}{a} + \frac{1}{b} + \frac{1}{c} = \frac{1}{d}$.

Solution: Prove that the solutions are $d = a$ and $b = -c$, $d = b$ and $a = -c$, or $d = c$ and $a = -b$, with $a, b, c, d$ nonzero.

Lean 4 formal statement:
abbrev putnam_1977_a2_solution : ℝ → ℝ → ℝ → ℝ → Prop := sorry
theorem putnam_1977_a2 :
    ∀ a b c d : ℝ,
      a ≠ 0 → b ≠ 0 → c ≠ 0 → d ≠ 0 →
        (putnam_1977_a2_solution a b c d ↔
          (a + b + c = d ∧ 1 / a + 1 / b + 1 / c = 1 / d)) :=
  sorry
Problem: putnam_1977_a3
Tags: algebra

Let $f, g, h$ be functions $\mathbb{R} \to \mathbb{R}$. Find an expression for $h(x)$ in terms of $f$ and $g$ such that $f(x) = \frac{h(x + 1) + h(x - 1)}{2}$ and $g(x) = \frac{h(x + 4) + h(x - 4)}{2}$.

Solution: Prove that $h(x) = g(x) - f(x - 3) + f(x - 1) + f(x + 1) - f(x + 3)$ suffices.

Lean 4 formal statement:
abbrev putnam_1977_a3_solution : (ℝ → ℝ) → (ℝ → ℝ) → (ℝ → ℝ) := sorry
theorem putnam_1977_a3
    (f g h : ℝ → ℝ)
    (hf : ∀ x, f x = (h (x + 1) + h (x - 1)) / 2)
    (hg : ∀ x, g x = (h (x + 4) + h (x - 4)) / 2) :
    h = putnam_1977_a3_solution f g :=
  sorry
Problem: putnam_1977_a4
Tags: algebra, analysis

Find $\sum_{n=0}^{\infty} \frac{x^{2^n}}{1 - x^{2^{n+1}}}$ as a rational function of $x$ for $x \in (0, 1)$.

Solution: Prove that the sum equals $\frac{x}{1 - x}$.

Lean 4 formal statement:
noncomputable abbrev putnam_1977_a4_solution : RatFunc ℝ := sorry
theorem putnam_1977_a4 :
    ∀ x ∈ Ioo 0 1,
      putnam_1977_a4_solution.eval (id ℝ) x = ∑' n : ℕ, x ^ 2 ^ n / (1 - x ^ 2 ^ (n + 1)) :=
  sorry
Problem: putnam_1977_a5
Tags: algebra, number_theory

Let $p$ be a prime and $m \geq n$ be non-negative integers. Show that $\binom{pm}{pn} = \binom{m}{n} \pmod p$, where $\binom{m}{n}$ is the binomial coefficient.

Solution: None.

Lean 4 formal statement:
theorem putnam_1977_a5
(p m n : ℕ)
(hp : Nat.Prime p)
(hmgen : m ≥ n)
: (choose (p * m) (p * n) ≡ choose m n [MOD p]) :=
sorry
Problem: putnam_1977_a6
Tags: analysis

Let $X$ be the square $[0, 1] \times [0, 1]$, and let $f : X \to \mathbb{R}$ be continuous. If $\int_Y f(x, y) \, dx \, dy = 0$ for all squares $Y$ such that
\begin{itemize}
\item[(1)] $Y \subseteq X$,
\item[(2)] $Y$ has sides parallel to those of $X$,
\item[(3)] at least one of $Y$'s sides is contained in the boundary of $X$,
\end{itemize}
is it true that $f(x, y) = 0$ for all $x, y$?

Solution: Prove that $f(x,y)$ must be identically zero.

Lean 4 formal statement:
abbrev putnam_1977_a6_solution : Prop := sorry
theorem putnam_1977_a6
(X : Set (ℝ × ℝ))
(hX : X = Set.prod (Icc 0 1) (Icc 0 1))
(room : (ℝ × ℝ) → ℝ)
(hroom : room = fun (a,b) ↦ min (min a (1 - a)) (min b (1 - b)))
: ((∀ f : (ℝ × ℝ) → ℝ, Continuous f → (∀ P ∈ X, ∫ x in (P.1 - room P)..(P.1 + room P), ∫ y in (P.2 - room P)..(P.2 + room P), f (x, y) = 0) → (∀ P ∈ X, f P = 0)) ↔ putnam_1977_a6_solution) :=
sorry
Problem: putnam_1977_b1
Tags: algebra, analysis

Find $\prod_{n=2}^{\infty} \frac{(n^3 - 1)}{(n^3 + 1)}$.

Solution: Prove that the product equals $\frac{2}{3}$.

Lean 4 formal statement:
noncomputable abbrev putnam_1977_b1_solution : ℝ := sorry
theorem putnam_1977_b1
: Tendsto (fun N ↦ ∏ n ∈ Finset.Icc (2 : ℤ) N, ((n : ℝ) ^ 3 - 1) / (n ^ 3 + 1)) atTop (𝓝 putnam_1977_b1_solution) :=
sorry
Problem: putnam_1977_b3
Tags: algebra

An ordered triple $(a, b, c)$ of positive irrational numbers with $a + b + c = 1$ is considered $\textit{balanced}$ if all three elements are less than $\frac{1}{2}$. If a triple is not balanced, we can perform a ``balancing act'' $B$ defined by $B(a, b, c) = (f(a), f(b), f(c))$, where $f(x) = 2x - 1$ if $x > 1/2$ and $f(x) = 2x$ otherwise. Will finitely many iterations of this balancing act always eventually produce a balanced triple?

Solution: Not necessarily.

Lean 4 formal statement:
abbrev putnam_1977_b3_solution : Prop := sorry
theorem putnam_1977_b3
(P balanced: ℝ × ℝ × ℝ → Prop)
(B : ℝ × ℝ × ℝ → ℝ × ℝ × ℝ)
(hP : P = fun (a, b, c) => Irrational a ∧ Irrational b ∧ Irrational c ∧ a > 0 ∧ b > 0 ∧ c > 0 ∧ a + b + c = 1)
(hbalanced : balanced = fun (a, b, c) => a < 1/2 ∧ b < 1/2 ∧ c < 1/2)
(hB : B = fun (a, b, c) => (ite (a > 1/2) (2*a - 1) (2*a), ite (b > 1/2) (2*b - 1) (2*b), ite (c > 1/2) (2*c - 1) (2*c)))
: (∀ t : ℝ × ℝ × ℝ, P t → ∃ n : ℕ, balanced (B^[n] t)) ↔ putnam_1977_b3_solution :=
sorry
Problem: putnam_1977_b5
Tags: algebra

If $a_1, a_2, \dots, a_n$ are real numbers with $n > 1$ and $A$ satisfies $$A + \sum_{i = 1}^{n} a_i^2 < \frac{1}{n-1}\left(\sum_{i=1}^{n}a_i\right)^2,$$ prove that $A < 2a_{i}a_{j}$ for all $i, j$ with $1 \le i < j \le n$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1977_b5
(n : ℕ)
(hn : n > 1)
(a : Fin n → ℝ)
(A : ℝ)
(hA : A + ∑ i : Fin n, (a i)^2 < (1/((n : ℝ) - 1))*(∑ i : Fin n, a i)^2)
: ∀ i j : Fin n, i < j → A < 2*(a i)*(a j) :=
sorry
Problem: putnam_1977_b6
Tags: abstract_algebra

Let $G$ be a group and $H$ be a subgroup of $G$ with $h$ elements. Suppose that $G$ contains some element $a$ such that $(xa)^3 = 1$ for all $x \in H$ (here $1$ represents the identity element of $G$). Let $P$ be the subset of $G$ containing all products of the form $x_1 a x_2 a \cdots x_n a$ with $n \ge 1$ and $x_i \in H$ for all $i \in \{1, 2, \dots, n\}$. Prove that $P$ is a finite set and contains no more than $3h^2$ elements.

Solution: None.

Lean 4 formal statement:
theorem putnam_1977_b6
{G : Type*}
[Group G]
(H : Subgroup G)
[Finite H]
(h : ℕ)
(h_def : h = Nat.card H)
(a : G)
(ha : ∀ x : H, (x*a)^3 = 1)
(P : Set G)
(hP : P = {g : G | ∃ xs : List H, (xs.length ≥ 1) ∧ g = (List.map (fun h : H => h*a) xs).prod})
: (Finite P) ∧ (P.ncard ≤ 3*h^2) :=
sorry
Problem: putnam_1978_a1
Tags: algebra

Let $S = \{1, 4, 7, 10, 13, 16, \dots , 100\}$. Let $T$ be a subset of $20$ elements of $S$. Show that we can find two distinct elements of $T$ with sum $104$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1978_a1
(S T : Set ℤ)
(hS : S = {k | ∃ j : ℤ, 0 ≤ j ∧ j ≤ 33 ∧ k = 3 * j + 1})
(hT : T ⊆ S ∧ T.ncard = 20)
: (∃ m ∈ T, ∃ n ∈ T, m ≠ n ∧ m + n = 104) :=
sorry
Problem: putnam_1978_a2
Tags: linear_algebra

Let $A$ be the real $n \times n$ matrix $(a_{ij})$ where $a_{ij} = a$ for $i < j$, $b \; (\neq a)$ for $i > j$, and $c_i$ for $i = j$. Show that $\det A = \frac{b p(a) - a p(b)}{b - a}$, where $p(x) = \prod_{i=1}^n (c_i - x)$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1978_a2
(n : ℕ)
(npos : n > 0)
(a b : ℝ)
(hab : a ≠ b)
(c : Fin n → ℝ)
(A : Matrix (Fin n) (Fin n) ℝ)
(hA : A = fun i j ↦ ite (i < j) a (ite (i > j) b (c i)))
(p : ℝ → ℝ)
(hp : p = fun x ↦ ∏ i : Fin n, (c i - x))
: (A.det = ((b * p a - a * p b) / (b - a))) :=
sorry
Problem: putnam_1978_a3
Tags: analysis, algebra

Let $p(x) = 2(x^6 + 1) + 4(x^5 + x) + 3(x^4 + x^2) + 5x^3$. For $k$ with $0 < k < 5$, let
\[
I_k = \int_0^{\infty} \frac{x^k}{p(x)} \, dx.
\]
For which $k$ is $I_k$ smallest?

Solution: Show that $I_k$ is smallest for $k = 2$.

Lean 4 formal statement:
abbrev putnam_1978_a3_solution : ℕ := sorry
theorem putnam_1978_a3
    (p : Polynomial ℝ)
    (hp : p = 2 * (X ^ 6 + 1) + 4 * (X ^ 5 + X) + 3 * (X ^ 4 + X ^ 2) + 5 * X ^ 3)
    (I : ℕ → ℝ)
    (hI : I = fun k ↦ ∫ x in Ioi 0, x ^ k / p.eval x) :
    IsLeast {y | ∃ k ∈ Ioo 0 5, I k = y} (I putnam_1978_a3_solution) :=
  sorry
Problem: putnam_1978_a4
Tags: abstract_algebra

A binary operation (represented by multiplication) on $S$ has the property that $(ab)(cd) = ad$ for all $a, b, c, d$. Show that:
\begin{itemize}
\item[(1)] if $ab = c$, then $cc = c$;
\item[(2)] if $ab = c$, then $ad = cd$ for all $d$.
\end{itemize}
Find a set $S$, and such a binary operation, which also satisfies:
\begin{itemize}
\item[(A)] $a a = a$ for all $a$;
\item[(B)] $ab = a \neq b$ for some $a, b$;
\item[(C)] $ab \neq a$ for some $a, b$.
\end{itemize}

Solution: None.

Lean 4 formal statement:
theorem putnam_1978_a4
(bypass : (S : Type) → [inst : Mul S] → Prop)
(hbypass : bypass = fun S [Mul S] ↦ ∀ a b c d : S, (a * b) * (c * d) = a * d)
: ((∀ (S : Type) (_ : Mul S), bypass S → ∀ a b c : S, a * b = c → (c * c = c ∧ ∀ d : S, a * d = c * d))
  ∧ (∃ (S : Type) (_ : Mul S) (_ : Fintype S), bypass S ∧ (∀ a : S, a * a = a) ∧ (∃ a b : S, a * b = a ∧ a ≠ b) ∧ (∃ a b : S, a * b ≠ a))) :=
sorry
Problem: putnam_1978_a5
Tags: analysis

Let $a_1, a_2, \dots , a_n$ be reals in the interval $(0, \pi)$ with arithmetic mean $\mu$. Show that
\[
\prod_{i=1}^n \left( \frac{\sin a_i}{a_i} \right) \leq \left( \frac{\sin \mu}{\mu} \right)^n.
\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1978_a5
(n : ℕ)
(npos : n > 0)
(a : Fin n → ℝ)
(ha : ∀ i : Fin n, a i ∈ Ioo 0 Real.pi)
(μ : ℝ)
(hμ : μ = ∑ i : Fin n, a i / n)
: (∏ i : Fin n, sin (a i) / (a i) ≤ (sin μ / μ) ^ n) :=
sorry
Problem: putnam_1978_a6
Tags: geometry, combinatorics

Given $n$ distinct points in the plane, prove that fewer than $2n^{3/2}$ pairs of these points are a distance of $1$ apart.

Solution: None.

Lean 4 formal statement:
theorem putnam_1978_a6
(S : Finset (EuclideanSpace ℝ (Fin 2)))
(n : ℕ)
(hn : n = S.card)
(npos : n > 0)
: ({pair : Set (EuclideanSpace ℝ (Fin 2)) | ∃ P ∈ S, ∃ Q ∈ S, pair = {P, Q} ∧ dist P Q = 1}.ncard < 2 * (n : ℝ) ^ ((3 : ℝ) / 2)) :=
sorry
Problem: putnam_1978_b2
Tags: algebra, analysis

Find
\[
\sum_{i=1}^{\infty} \sum_{j=1}^{\infty} \frac{1}{i^2j + 2ij + ij^2}.
\]

Solution: Prove that the sum evaluates to $\frac{7}{4}$.

Lean 4 formal statement:
abbrev putnam_1978_b2_solution : ℚ := sorry
theorem putnam_1978_b2
: (∑' i : ℕ+, ∑' j : ℕ+, (1 : ℚ) / (i ^ 2 * j + 2 * i * j + i * j ^ 2) = putnam_1978_b2_solution) :=
sorry
Problem: putnam_1978_b3
Tags: algebra, analysis

The polynomials $P_n(x)$ are defined by
\begin{align*}
P_1(x) &= 1 + x, \\
P_2(x) &= 1 + 2x, \\
P_{2n+1}(x) &= P_{2n}(x) + (n + 1) x P_{2n-1}(x), \\
P_{2n+2}(x) &= P_{2n+1}(x) + (n + 1) x P_{2n}(x).
\end{align*}
Let $a_n$ be the largest real root of $P_n(x)$. Prove that $a_n$ is strictly monotonically increasing and tends to zero.

Solution: None.

Lean 4 formal statement:
theorem putnam_1978_b3
(P : ℕ+ → Polynomial ℝ)
(hP1 : P 1 = 1 + X)
(hP2 : P 2 = 1 + 2 * X)
(hPodd : ∀ n, P (2 * n + 1) = P (2 * n) + C ((n : ℝ) + 1) * X * P (2 * n - 1))
(hPeven : ∀ n, P (2 * n + 2) = P (2 * n + 1) + C ((n : ℝ) + 1) * X * P (2 * n))
(a : ℕ+ → ℝ)
(haroot : ∀ n, (P n).eval (a n) = 0)
(haub : ∀ n, ∀ x, (P n).eval x = 0 → x ≤ a n)
: (StrictMono a ∧ Tendsto a atTop (𝓝 0)) :=
sorry
Problem: putnam_1978_b4
Tags: algebra

Show that we can find integers $a, b, c, d$ such that $a^2 + b^2 + c^2 + d^2 = abc + abd + acd + bcd$, and the smallest of $a, b, c, d$ is arbitrarily large.

Solution: None.

Lean 4 formal statement:
theorem putnam_1978_b4 :
  ∀ N : ℝ,
    ∃ a b c d : ℤ,
      a > N ∧ b > N ∧ c > N ∧ d > N ∧
      a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = a * b * c + a * b * d + a * c * d + b * c * d :=
sorry
Problem: putnam_1978_b5
Tags: algebra

Find the real polynomial $p(x)$ of degree $4$ with largest possible coefficient of $x^4$ such that $p([-1, 1]) \subseteq [0, 1]$.

Solution: Prove that $p(x) = 4x^4 - 4x^2 + 1$.

Lean 4 formal statement:
noncomputable abbrev putnam_1978_b5_solution : Polynomial ℝ := sorry
theorem putnam_1978_b5
(S : Set (Polynomial ℝ))
(hS : S = {p : Polynomial ℝ | p.degree = 4 ∧ ∀ x ∈ Icc (-1) 1, p.eval x ∈ Icc 0 1})
: (putnam_1978_b5_solution ∈ S ∧ (∀ p ∈ S, p.coeff 4 ≤ putnam_1978_b5_solution.coeff 4)) :=
sorry
Problem: putnam_1978_b6
Tags: algebra

Let $a_{ij}$ be real numbers in $[0, 1]$. Show that
\[
\left( \sum_{i=1}^n  \sum_{j=1}^{mi} \frac{a_{ij}}{i} \right) ^2 \leq 2m \sum_{i=1}^n \sum_{j=1}^{mi} a_{ij}.
\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1978_b6
(a : ℕ → ℕ → ℝ)
(ha : ∀ i j, a i j ∈ Icc 0 1)
(m n : ℕ)
(mnpos : m > 0 ∧ n > 0)
: ((∑ i ∈ Finset.Icc 1 n, ∑ j ∈ Finset.Icc 1 (m * i), a i j / i) ^ 2 ≤ 2 * m * ∑ i ∈ Finset.Icc 1 n, ∑ j ∈ Finset.Icc 1 (m * i), a i j) :=
sorry
Problem: putnam_1979_a1
Tags: algebra

For which positive integers $n$ and $a_1, a_2, \dots, a_n$ with $\sum_{i = 1}^{n} a_i = 1979$ does $\prod_{i = 1}^{n} a_i$ attain the greatest value?

Solution: $n$ equals $660$; all but one of the $a_i$ equal $3$ and the remaining $a_i$ equals $2$.

Lean 4 formal statement:
abbrev putnam_1979_a1_solution : Multiset ℕ := sorry
theorem putnam_1979_a1
    (P : Multiset ℕ → Prop)
    (hP : ∀ a, P a ↔ Multiset.card a > 0 ∧ (∀ i ∈ a, i > 0) ∧ a.sum = 1979) :
    P putnam_1979_a1_solution ∧ ∀ a : Multiset ℕ, P a → putnam_1979_a1_solution.prod ≥ a.prod :=
  sorry
Problem: putnam_1979_a2
Tags: analysis, algebra

For which real numbers $k$ does there exist a continuous function $f : \mathbb{R} \to \mathbb{R}$ such that $f(f(x)) = kx^9$ for all real $x$?

Solution: Such a function exists if and only if $k \ge 0$.

Lean 4 formal statement:
abbrev putnam_1979_a2_solution : ℝ → Prop := sorry
theorem putnam_1979_a2
: ∀ k : ℝ, (∃ f : ℝ → ℝ, Continuous f ∧ ∀ x : ℝ, f (f x) = k*x^9) ↔ putnam_1979_a2_solution k :=
sorry
Problem: putnam_1979_a3
Tags: algebra

Let $x_1, x_2, x_3, \dots$ be a sequence of nonzero real numbers such that $$x_n = \frac{x_{n-2}x_{n-1}}{2x_{n-2}-x_{n-1}}$$ for all $n \ge 3$. For which real values of $x_1$ and $x_2$ does $x_n$ attain integer values for infinitely many $n$?

Solution: We must have $x_1 = x_2 = m$ for some integer $m$.

Lean 4 formal statement:
abbrev putnam_1979_a3_solution : (ℝ × ℝ) → Prop := sorry
theorem putnam_1979_a3
(x : ℕ → ℝ)
(hx : ∀ n : ℕ, x n ≠ 0 ∧ (n ≥ 3 → x n = (x (n - 2))*(x (n - 1))/(2*(x (n - 2)) - (x (n - 1)))))
: (∀ m : ℕ, ∃ n : ℕ, n > m ∧ ∃ a : ℤ, a = x n) ↔ putnam_1979_a3_solution (x 1, x 2) :=
sorry
Problem: putnam_1979_a4
Tags: geometry, combinatorics

Let $A$ be a set of $2n$ points in the plane, $n$ colored red and $n$ colored blue, such that no three points in $A$ are collinear. Must there exist $n$ closed straight line segments, each connecting one red and one blue point in $A$, such that no two of the $n$ line segments intersect?

Solution: Such line segments must exist.

Lean 4 formal statement:
abbrev putnam_1979_a4_solution : Prop := sorry
theorem putnam_1979_a4
    (A : Finset (Fin 2 → ℝ) × Finset (Fin 2 → ℝ) → Prop)
    (hA : A = fun (R, B) => R.card = B.card ∧ R ∩ B = ∅ ∧
      ∀ u : Finset (Fin 2 → ℝ), u ⊆ R ∪ B → u.card = 3 → ¬Collinear ℝ (u : Set (Fin 2 → ℝ)))
    (w : (Fin 2 → ℝ) × (Fin 2 → ℝ) → ℝ → (Fin 2 → ℝ))
    (hw : w = fun (P, Q) => fun x : ℝ => fun i : Fin 2 => x * P i + (1 - x) * Q i) :
    putnam_1979_a4_solution ↔
      (∀ R B, A (R, B) →
        ∃ v : Finset ((Fin 2 → ℝ) × (Fin 2 → ℝ)),
          (∀ L ∈ v, ∀ M ∈ v, L ≠ M → ∀ x ∈ Icc 0 1, ∀ y ∈ Icc 0 1,
          Real.sqrt ((w (L.1, L.2) x 0 - w (M.1, M.2) y 0)^2 + (w (L.1, L.2) x 1 - w (M.1, M.2) y 1)^2) ≠ 0) ∧
        v.card = R.card ∧ ∀ L ∈ v, L.1 ∈ R ∧ L.2 ∈ B) :=
  sorry
Problem: putnam_1979_a5
Tags: algebra

Let $S(x)$ denote the sequence $\lfloor 0 \rfloor, \lfloor x \rfloor, \lfloor 2x \rfloor, \lfloor 3x \rfloor, \dots$, where $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$. Prove that there exist distinct real roots $\alpha$ and $\beta$ of $x^3 - 10x^2 + 29x - 25$ such that infinitely many positive integers appear in both $S(\alpha)$ and $S(\beta)$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1979_a5
(S : ℝ → ℕ → ℤ)
(hS : S = fun x : ℝ => fun n : ℕ => Int.floor (n*x))
(P : ℝ → Prop)
(hP : ∀ x, P x ↔ x^3 - 10*x^2 + 29*x - 25 = 0)
: ∃ α β : ℝ, α ≠ β ∧ P α ∧ P β ∧ ∀ n : ℕ, ∃ m : ℤ, m > n ∧ ∃ c d : ℕ, S α c = m ∧ S β d = m :=
sorry
Problem: putnam_1979_a6
Tags: algebra

For all $i \in \{0, 1, \dots, n - 1\}$, let $p_i \in [0, 1]$. Prove that there exists some $x \in [0, 1]$ such that $$\sum_{i = 0}^{n - 1} \frac{1}{|x - p_i|} \le 8n\left(\sum_{i = 0}^{n-1} \frac{1}{2i + 1}\right).$$

Solution: None.

Lean 4 formal statement:
theorem putnam_1979_a6
(n : ℕ)
(p : ℕ → ℝ)
(hp : ∀ i ∈ Finset.range n, p i ∈ Icc 0 1)
: ∃ x ∈ Icc 0 1, (∀ i ∈ Finset.range n, x ≠ p i) ∧ ∑ i ∈ Finset.range n, 1/|x - p i| ≤ 8*n*∑ i ∈ Finset.range n, (1 : ℝ)/(2*i + 1) :=
sorry
Problem: putnam_1979_b2
Tags: analysis

If $0 < a < b$, find $$\lim_{t \to 0} \left( \int_{0}^{1}(bx + a(1-x))^t dx \right)^{\frac{1}{t}}$$ in terms of $a$ and $b$.

Solution: The limit equals $$e^{-1}\left(\frac{b^b}{a^a}\right)^{\frac{1}{b-a}}.$$

Lean 4 formal statement:
noncomputable abbrev putnam_1979_b2_solution : ℝ × ℝ → ℝ := sorry
theorem putnam_1979_b2
: ∀ a b : ℝ, 0 < a ∧ a < b → Tendsto (fun t : ℝ => (∫ x in Icc 0 1, (b*x + a*(1 - x))^t)^(1/t)) (𝓝[≠] 0) (𝓝 (putnam_1979_b2_solution (a, b))) :=
sorry
Problem: putnam_1979_b3
Tags: abstract_algebra

Let $F$ be a finite field with $n$ elements, and assume $n$ is odd. Suppose $x^2 + bx + c$ is an irreducible polynomial over $F$. For how many elements $d \in F$ is $x^2 + bx + c + d$ irreducible?

Solution: Show that there are $\frac{n - 1}{2}$ such elements $d$.

Lean 4 formal statement:
abbrev putnam_1979_b3_solution : ℕ → ℤ := sorry
theorem putnam_1979_b3
(F : Type*) [Field F] [Fintype F]
(n : ℕ)
(hn : n = Fintype.card F)
(nodd : Odd n)
(b c : F)
(p : Polynomial F)
(hp : p = X ^ 2 + (C b) * X + (C c) ∧ Irreducible p)
: ({d : F | Irreducible (p + (C d))}.ncard = putnam_1979_b3_solution n) :=
sorry
Problem: putnam_1979_b5
Tags: geometry, analysis

In the plane, let $C$ be a closed convex set that contains $(0,0) but no other point with integer coordinations. Suppose that $A(C)$, the area of $C$, is equally distributed among the four quadrants. Prove that $A(C) \leq 4$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1979_b5
(C : Set (ℝ × ℝ))
(hC : IsClosed C ∧ Convex ℝ C ∧ (0,0) ∈ C)
(hCnint : ∀ a b : ℤ, (a ≠ 0 ∨ b ≠ 0) → ((a : ℝ), (b : ℝ)) ∉ C)
(hCeven : volume (C ∩ {p : ℝ × ℝ | p.1 ≥ 0 ∧ p.2 ≥ 0}) = volume (C ∩ {p : ℝ × ℝ | p.1 ≥ 0 ∧ p.2 ≤ 0}) ∧ volume (C ∩ {p : ℝ × ℝ | p.1 ≥ 0 ∧ p.2 ≤ 0}) = volume (C ∩ {p : ℝ × ℝ | p.1 ≤ 0 ∧ p.2 ≥ 0}) ∧ volume (C ∩ {p : ℝ × ℝ | p.1 ≤ 0 ∧ p.2 ≥ 0}) = volume (C ∩ {p : ℝ × ℝ | p.1 ≤ 0 ∧ p.2 ≤ 0}))
: volume C ≤ 4 :=
sorry
Problem: putnam_1979_b6
Tags: analysis

Let $z_i$ be complex numbers for $i = 1, 2, \dots, n$. Show that
\[
\left \lvert \mathrm{Re} \, [(z_1^2 + z_2^2 + \dots + z_n^2)^{1/2} ] \right \rvert \leq \lvert \mathrm{Re} \, z_1 \rvert + \lvert \mathrm{Re} \, z_2 \rvert + \dots + \lvert \mathrm{Re} \, z_n \rvert.
\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1979_b6
(n : ℕ)
(z : Fin n → ℂ)
: (|((∑ i : Fin n, (z i) ^ 2) ^ ((1 : ℂ) / 2)).re| ≤ ∑ i : Fin n, |(z i).re|) :=
sorry