ChristianZ97/PutnamBench-lean4 huggingface dataset:
Problem: putnam_1980_a2
Tags: number_theory

Let $r$ and $s$ be positive integers. Derive a formula for the number of ordered quadruples $(a,b,c,d)$ of positive integers such that $3^r \cdot 7^s=\text{lcm}[a,b,c]=\text{lcm}[a,b,d]=\text{lcm}[a,c,d]=\text{lcm}[b,c,d]$. The answer should be a function of $r$ and $s$. (Note that $\text{lcm}[x,y,z]$ denotes the least common multiple of $x,y,z$.)

Solution: Show that the number is $(1+4r+6r^2)(1+4s+6s^2)$.

Lean 4 formal statement:
abbrev putnam_1980_a2_solution : ℕ → ℕ → ℕ := sorry
theorem putnam_1980_a2
    (r s : ℕ)
    (abcdlcm : ℕ → ℕ → ℕ → ℕ → Prop)
    (rspos : r > 0 ∧ s > 0)
    (habcdlcm : ∀ a b c d : ℕ, abcdlcm a b c d ↔
      (a > 0 ∧ b > 0 ∧ c > 0 ∧ d > 0 ∧
      (3 ^ r * 7 ^ s = Nat.lcm (Nat.lcm a b) c) ∧
      (3 ^ r * 7 ^ s = Nat.lcm (Nat.lcm a b) d) ∧
      (3 ^ r * 7 ^ s = Nat.lcm (Nat.lcm a c) d) ∧
      (3 ^ r * 7 ^ s = Nat.lcm (Nat.lcm b c) d))) :
    {(a, b, c, d) : ℕ × ℕ × ℕ × ℕ | abcdlcm a b c d}.encard = putnam_1980_a2_solution r s :=
  sorry
Problem: putnam_1980_a3
Tags: analysis

Evaluate $\int_0^{\pi/2}\frac{dx}{1+(\tan x)^{\sqrt{2}}}$.

Solution: Show that the integral is $\pi/4$.

Lean 4 formal statement:
noncomputable abbrev putnam_1980_a3_solution : ℝ := sorry
theorem putnam_1980_a3
: ∫ x in Set.Ioo 0 (Real.pi / 2), 1 / (1 + (Real.tan x) ^ (Real.sqrt 2)) = putnam_1980_a3_solution :=
sorry
Problem: putnam_1980_a4
Tags: algebra

\begin{enumerate}
\item[(a)] Prove that there exist integers $a,b,c$, not all zero and each of absolute value less than one million, such that $|a+b\sqrt{2}+c\sqrt{3}|<10^{-11}$.
\item[(b)] Let $a,b,c$ be integers, not all zero and each of absolute value less than one million. Prove that $|a+b\sqrt{2}+c\sqrt{3}|>10^{-21}$.
\end{enumerate}

Solution: None.

Lean 4 formal statement:
theorem putnam_1980_a4
    (abcvals : ℤ → ℤ → ℤ → Prop)
    (habcvals : ∀ a b c : ℤ, abcvals a b c ↔ ¬(a = 0 ∧ b = 0 ∧ c = 0) ∧ |a| < 1000000 ∧ |b| < 1000000 ∧ |c| < 1000000) :
    (∃ a b c : ℤ,
      abcvals a b c ∧
      |a + b * Real.sqrt 2 + c * Real.sqrt 3| < 10 ^ (-(11 : ℝ))) ∧
      (∀ a b c : ℤ, abcvals a b c → |a + b * Real.sqrt 2 + c * Real.sqrt 3| > 10 ^ (-(21 : ℝ))) :=
  sorry
Problem: putnam_1980_a5
Tags: analysis

Let $P(t)$ be a nonconstant polynomial with real coefficients. Prove that the system of simultaneous equations $0=\int_0^xP(t)\sin t\,dt=\int_0^xP(t)\cos t\,dt$ has only finitely many real solutions $x$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1980_a5
    (P : Polynomial ℝ)
    (Pnonconst : P.degree > 0) :
    Set.Finite {x : ℝ |
      0 = (∫ t in (0)..x, P.eval t * Real.sin t) ∧
      0 = (∫ t in (0)..x, P.eval t * Real.cos t)} :=
  sorry
Problem: putnam_1980_a6
Tags: analysis

Let $C$ be the class of all real valued continuously differentiable functions $f$ on the interval $0 \leq x \leq 1$ with $f(0)=0$ and $f(1)=1$. Determine the largest real number $u$ such that $u \leq \int_0^1|f'(x)-f(x)|\,dx$ for all $f$ in $C$.

Solution: Show that $u=1/e$.

Lean 4 formal statement:
noncomputable abbrev putnam_1980_a6_solution : ℝ := sorry
theorem putnam_1980_a6
    (C : Set (ℝ → ℝ))
    (hC : C = {f : ℝ → ℝ | ContDiffOn ℝ 1 f (Set.Icc 0 1) ∧ f 0 = 0 ∧ f 1 = 1}) :
    IsGreatest
      {(u : ℝ) | ∀ f ∈ C, u ≤ (∫ x in Set.Ioo 0 1, |deriv f x - f x|)}
      putnam_1980_a6_solution :=
  sorry
Problem: putnam_1980_b1
Tags: analysis

For which real numbers $c$ is $(e^x+e^{-x})/2 \leq e^{cx^2}$ for all real $x$?

Solution: Show that the inequality holds if and only if $c \geq 1/2$.

Lean 4 formal statement:
abbrev putnam_1980_b1_solution : Set ℝ := sorry
theorem putnam_1980_b1
(c : ℝ)
: (∀ x : ℝ, (exp x + exp (-x)) / 2 ≤ exp (c * x ^ 2)) ↔ c ∈ putnam_1980_b1_solution :=
sorry
Problem: putnam_1980_b3
Tags: algebra

For which real numbers $a$ does the sequence defined by the initial condition $u_0=a$ and the recursion $u_{n+1}=2u_n-n^2$ have $u_n>0$ for all $n \geq 0$? (Express the answer in the simplest form.)

Solution: Show that $u_n>0$ for all $n \geq 0$ if and only if $a \geq 3$.

Lean 4 formal statement:
abbrev putnam_1980_b3_solution : Set ℝ := sorry
theorem putnam_1980_b3
(a : ℝ)
(u : ℕ → ℝ)
(hu : u 0 = a ∧ (∀ n : ℕ, u (n + 1) = 2 * u n - n ^ 2))
: (∀ n : ℕ, u n > 0) ↔ a ∈ putnam_1980_b3_solution :=
sorry
Problem: putnam_1980_b4
Tags: set_theory, combinatorics

Let $X$ be a finite set with at least $10$ elements; for each $i \in \{0, 1, ..., 1065\}$, let $A_i \subseteq X$ satisfy $|A_i| > \frac{1}{2}|X|$. Prove that there exist $10$ elements $x_1, x_2, \dots, x_{10} \in X$ such that each $A_i$ contains at least one of $x_1, x_2, \dots, x_{10}$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1980_b4
{T : Type}
(X : Finset T)
(A : Fin 1066 → Finset T)
(hX : X.card ≥ 10)
(hA : ∀ i : Fin 1066, A i ⊆ X ∧ (A i).card > ((1 : ℚ)/2) * X.card)
: ∃ Y : Finset T, Y ⊆ X ∧ Y.card = 10 ∧ ∀ i : Fin 1066, ∃ y ∈ Y, y ∈ A i :=
sorry
Problem: putnam_1980_b5
Tags: analysis, algebra

A function $f$ is convex on $[0, 1]$ if and only if $$f(su + (1-s)v) \le sf(u) + (1 - s)f(v)$$ for all $s \in [0, 1]$.
Let $S_t$ denote the set of all nonnegative increasing convex continuous functions $f : [0, 1] \rightarrow \mathbb{R}$ such that $$f(1) - 2f\left(\frac{2}{3}\right) + f\left(\frac{1}{3}\right) \ge t\left(f\left(\frac{2}{3}\right) - 2f\left(\frac{1}{3}\right) + f(0)\right).$$
For which real numbers $t \ge 0$ is $S_t$ closed under multiplication?

Solution: $S_t$ is closed under multiplication if and only if $1 \ge t$.

Lean 4 formal statement:
abbrev putnam_1980_b5_solution : ℝ → Prop := sorry
theorem putnam_1980_b5
    (T : Set ℝ)
    (hT : T = Icc 0 1)
    (P : ℝ → (ℝ → ℝ) → Prop)
    (IsConvex : (ℝ → ℝ) → Prop)
    (S : ℝ → Set (ℝ → ℝ))
    (P_def : ∀ t f, P t f ↔ f 1 - 2*f (2/3) + f (1/3) ≥ t*(f (2/3) - 2*f (1/3) + f 0))
    (IsConvex_def : ∀ f, IsConvex f ↔ ∀ u ∈ T, ∀ v ∈ T, ∀ s ∈ T, f (s*u + (1 - s)*v) ≤ s*(f u) + (1 - s)*(f v))
    (hS : S = fun t : ℝ => {f : ℝ → ℝ | (∀ x ∈ T, f x ≥ 0) ∧ StrictMonoOn f T ∧ IsConvex f ∧ ContinuousOn f T ∧ P t f})
    (t : ℝ) (ht : t ≥ 0) :
    putnam_1980_b5_solution t ↔ (∀ f ∈ S t, ∀ g ∈ S t, f * g ∈ S t) :=
  sorry
Problem: putnam_1980_b6
Tags: number_theory, algebra

For integers $d, n$ with $1 \le d \le n$, let $G(1, n) = \frac{1}{n}$ and $G(d, n) = \frac{d}{n}\sum_{i=d}^{n}G(d - 1, i - 1)$ for all $d > 1$. If $1 < d \le p$ for some prime $p$, prove that the reduced denominator of $G(d, p)$ is not divisible by $p$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1980_b6
(G : ℤ × ℤ → ℚ)
(hG : ∀ d n : ℕ, d ≤ n → (d = 1 → G (d, n) = 1/(n : ℚ)) ∧ (d > 1 → G (d, n) = (d/(n : ℚ))*∑ i ∈ Finset.Icc d n, G ((d : ℤ) - 1, (i : ℤ) - 1)))
: ∀ d p : ℕ, 1 < d ∧ d ≤ p ∧ Prime p → ¬p ∣ (G (d, p)).den :=
sorry
Problem: putnam_1981_a1
Tags: analysis, number_theory

Let $E(n)$ be the greatest integer $k$ such that $5^k$ divides $1^1 2^2 3^3 \cdots n^n$. Find $\lim_{n \rightarrow \infty} \frac{E(n)}{n^2}$.

Solution: The limit equals $\frac{1}{8}$.

Lean 4 formal statement:
noncomputable abbrev putnam_1981_a1_solution : ℝ := sorry
theorem putnam_1981_a1
    (P : ℕ → ℕ → Prop)
    (hP : ∀ n k, P n k ↔ 5^k ∣ ∏ m ∈ Finset.Icc 1 n, (m^m : ℤ))
    (E : ℕ → ℕ)
    (hE : ∀ n ∈ Ici 1, P n (E n) ∧ ∀ k : ℕ, P n k → k ≤ E n) :
    Tendsto (fun n : ℕ => ((E n) : ℝ)/n^2) atTop (𝓝 putnam_1981_a1_solution) :=
  sorry
Problem: putnam_1981_a3
Tags: analysis

Does the limit $$lim_{t \rightarrow \infty}e^{-t}\int_{0}^{t}\int_{0}^{t}\frac{e^x - e^y}{x - y} dx dy$$exist?

Solution: The limit does not exist.

Lean 4 formal statement:
abbrev putnam_1981_a3_solution : Prop := sorry
theorem putnam_1981_a3
(f : ℝ → ℝ)
(hf : f = fun t : ℝ => Real.exp (-t) * ∫ y in (Ico 0 t), ∫ x in (Ico 0 t), (Real.exp x - Real.exp y) / (x - y))
: (∃ L : ℝ, Tendsto f atTop (𝓝 L)) ↔ putnam_1981_a3_solution :=
sorry
Problem: putnam_1981_a5
Tags: algebra

Let $P(x)$ be a polynomial with real coefficients; let $$Q(x) = (x^2 + 1)P(x)P'(x) + x((P(x))^2 + (P'(x))^2).$$
Given that $P$ has $n$ distinct real roots all greater than $1$, prove or disprove that $Q$ must have at least $2n - 1$ distinct real roots.

Solution: $Q(x)$ must have at least $2n - 1$ distinct real roots.

Lean 4 formal statement:
abbrev putnam_1981_a5_solution : Prop := sorry
theorem putnam_1981_a5
(Q : Polynomial ℝ → Polynomial ℝ)
(hQ : Q = fun P : Polynomial ℝ => (X^2 + 1)*P*(derivative P) + X*(P^2 + (derivative P)^2))
(n : Polynomial ℝ → ℝ)
(hn : n = fun P : Polynomial ℝ => ({x ∈ Ioi 1 | P.eval x = 0}.ncard : ℝ))
: (∀ P : Polynomial ℝ, {x : ℝ | (Q P).eval x = 0}.ncard ≥ 2*(n P) - 1) ↔ putnam_1981_a5_solution :=
sorry
Problem: putnam_1981_b1
Tags: analysis

Find the value of $$\lim_{n \rightarrow \infty} \frac{1}{n^5}\sum_{h=1}^{n}\sum_{k=1}^{n}(5h^4 - 18h^2k^2 + 5k^4).$$

Solution: The limit equals $-1$.

Lean 4 formal statement:
abbrev putnam_1981_b1_solution : ℝ := sorry
theorem putnam_1981_b1
(f : ℕ → ℝ)
(hf : f = fun n : ℕ => ((1 : ℝ)/n^5) * ∑ h ∈ Finset.Icc 1 n, ∑ k ∈ Finset.Icc 1 n, (5*(h : ℝ)^4 - 18*h^2*k^2 + 5*k^4))
: Tendsto f atTop (𝓝 putnam_1981_b1_solution) :=
sorry
Problem: putnam_1981_b2
Tags: algebra

Determine the minimum value attained by $$(r - 1)^2 + (\frac{s}{r} - 1)^2 + (\frac{t}{s} - 1)^2 + (\frac{4}{t} - 1)^2$$ across all choices of real $r$, $s$, and $t$ that satisfy $1 \le r \le s \le t \le 4$.

Solution: The minimum is $12 - 8\sqrt{2}$.

Lean 4 formal statement:
noncomputable abbrev putnam_1981_b2_solution : ℝ := sorry
theorem putnam_1981_b2
    (P : ℝ × ℝ × ℝ → Prop)
    (hP : P = fun (r, s, t) => 1 ≤ r ∧ r ≤ s ∧ s ≤ t ∧ t ≤ 4)
    (f : ℝ × ℝ × ℝ → ℝ)
    (hf : f = fun (r, s, t) => (r - 1)^2 + (s/r - 1)^2 + (t/s - 1)^2 + (4/t - 1)^2) :
    IsLeast {y | ∃ r s t, P (r, s, t) ∧ f (r, s, t) = y} putnam_1981_b2_solution :=
  sorry
Problem: putnam_1981_b3
Tags: number_theory

Prove that, for infinitely many positive integers $n$, all primes $p$ that divide $n^2 + 3$ also divide $k^2 + 3$ for some integer $k$ such that $k^2 < n$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1981_b3
    (P : ℕ → Prop)
    (hP : ∀ n, P n ↔
      ∀ p : ℕ, (Nat.Prime p ∧ p ∣ n^2 + 3) →
        ∃ k : ℕ, (p : ℤ) ∣ (k : ℤ)^2 + 3 ∧ k^2 < n) :
    ∀ n : ℕ, ∃ m : ℕ, (m : ℤ) > n ∧ P m :=
  sorry
Problem: putnam_1981_b4
Tags: linear_algebra

Let $V$ be a set of $5$ by $7$ matrices, with real entries and with the property that $rA+sB \in V$ whenever $A,B \in V$ and $r$ and $s$ are scalars (i.e., real numbers). \emph{Prove or disprove} the following assertion: If $V$ contains matrices of ranks $0$, $1$, $2$, $4$, and $5$, then it also contains a matrix of rank $3$. [The rank of a nonzero matrix $M$ is the largest $k$ such that the entries of some $k$ rows and some $k$ columns form a $k$ by $k$ matrix with a nonzero determinant.]

Solution: Show that the assertion is false.

Lean 4 formal statement:
abbrev putnam_1981_b4_solution : Prop := sorry
theorem putnam_1981_b4
    (VAB : Set (Matrix (Fin 5) (Fin 7) ℝ) → Prop)
    (Vrank : Set (Matrix (Fin 5) (Fin 7) ℝ) → ℕ → Prop)
    (hVAB : ∀ V, VAB V = (∀ A ∈ V, ∀ B ∈ V, ∀ r s : ℝ, r • A + s • B ∈ V))
    (hVrank : ∀ V k, Vrank V k = ∃ A ∈ V, A.rank = k) :
    putnam_1981_b4_solution ↔
    (∀ V,
      VAB V → Vrank V 0 → Vrank V 1 →
      Vrank V 2 → Vrank V 4 → Vrank V 5 →
    Vrank V 3) :=
  sorry
Problem: putnam_1981_b5
Tags: analysis, algebra

Let $B(n)$ be the number of ones in the base two expression for the positive integer $n$. For example, $B(6)=B(110_2)=2$ and $B(15)=B(1111_2)=4$. Determine whether or not $\exp \left(\sum_{n=1}^\infty \frac{B(n)}{n(n+1)}\right)$ is a rational number. Here $\exp(x)$ denotes $e^x$.

Solution: Show that the expression is a rational number.

Lean 4 formal statement:
abbrev putnam_1981_b5_solution : Prop := sorry
theorem putnam_1981_b5
(sumbits : List ℕ → ℤ)
(B : ℕ → ℤ)
(hsumbits : ∀ bits : List ℕ, sumbits bits = ∑ i : Fin bits.length, (bits[i] : ℤ))
(hB : ∀ n > 0, B n = sumbits (Nat.digits 2 n))
: (∃ q : ℚ, Real.exp (∑' n : Set.Ici 1, B n / ((n : ℝ) * ((n : ℝ) + 1))) = q) ↔ putnam_1981_b5_solution :=
sorry
Problem: putnam_1982_a2
Tags: algebra

Let $B_n(x) = 1^x + 2^x + \dots + n^x$ and let $f(n) = \frac{B_n(\log_n 2)}{(n \log_2 n)^2}$. Does $f(2) + f(3) + f(4) + \dots$ converge?

Solution: Prove that the series converges.

Lean 4 formal statement:
abbrev putnam_1982_a2_solution : Prop := sorry
theorem putnam_1982_a2
(B : ℕ → ℝ → ℝ)
(hB : B = fun (n : ℕ) (x : ℝ) ↦ ∑ k ∈ Finset.Icc 1 n, (k : ℝ) ^ x)
(f : ℕ → ℝ)
(hf : f = fun n ↦ B n (logb n 2) / (n * logb 2 n) ^ 2)
: (∃ L : ℝ, Tendsto (fun N ↦ ∑ j ∈ Finset.Icc 2 N, f j) atTop (𝓝 L)) ↔ putnam_1982_a2_solution :=
sorry
Problem: putnam_1982_a3
Tags: analysis

Evaluate $\int_0^{\infty} \frac{\tan^{-1}(\pi x) - \tan^{-1} x}{x} \, dx$.

Solution: Show that the integral evaluates to $\frac{\pi}{2} \ln \pi$.

Lean 4 formal statement:
noncomputable abbrev putnam_1982_a3_solution : ℝ := sorry
theorem putnam_1982_a3 :
  Tendsto (fun t ↦ ∫ x in (0)..t, (arctan (Real.pi * x) - arctan x) / x) atTop (𝓝 putnam_1982_a3_solution) :=
sorry
Problem: putnam_1982_a4
Tags: analysis

Assume that the system of simultaneous differentiable equations \[y' = -z^3, z' = y^3\] with the initial conditions $y(0) = 1, z(0) = 0$ has a unique solution $y = f(x), z = g(x)$ defined for all real $x$. Prove that there exists a positive constant $L$ such that for all real $x$, \[f(x) + L = f(x), g(x + L) = g(x).\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1982_a4
    (hdiffeq : (ℝ → ℝ) → (ℝ → ℝ) → Prop)
    (hdiffeq_def : ∀ y z,
      hdiffeq y z ↔
        y 0 = 1 ∧ z 0 = 0 ∧
        ContDiff ℝ 1 y ∧ ContDiff ℝ 1 z ∧
        (∀ x : ℝ, deriv y x = -1 * (z x)^3 ∧ deriv z x = (y x)^3))
    (f g : ℝ → ℝ)
    (hfgsat : hdiffeq f g)
    (hfgonly : ¬(∃ f' g' : ℝ → ℝ, (f ≠ f' ∨ g ≠ g') ∧ hdiffeq f' g')) :
    ∃ L : ℝ, L > 0 ∧ Function.Periodic f L ∧ Function.Periodic g L :=
  sorry
Problem: putnam_1982_a5
Tags: algebra

Let $a, b, c, d$ be positive integers satisfying $a + c \leq 1982$ and $\frac{a}{b} + \frac{c}{d} < 1$. Prove that $1 - \frac{a}{b} - \frac{c}{d} > \frac{1}{1983^3}$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1982_a5
(a b c d : ℤ)
(hpos : a > 0 ∧ b > 0 ∧ c > 0 ∧ d > 0)
(hac : a + c ≤ 1982)
(hfrac : (a : ℝ) / b + (c : ℝ) / d < 1)
: (1 - (a : ℝ) / b - (c : ℝ) / d > 1 / 1983 ^ 3) :=
sorry
Problem: putnam_1982_a6
Tags: analysis

Let $b$ be a bijection from the positive integers to the positive integers. Also, let $x_1, x_2, x_3, \dots$ be an infinite sequence of real numbers with the following properties:
\begin{enumerate}
\item
$|x_n|$ is a strictly decreasing function of $n$;
\item
$\lim_{n \rightarrow \infty} |b(n) - n| \cdot |x_n| = 0$;
\item
$\lim_{n \rightarrow \infty}\sum_{k = 1}^{n} x_k = 1$.
\end{enumerate}
Prove or disprove: these conditions imply that $$\lim_{n \rightarrow \infty} \sum_{k = 1}^{n} x_{b(k)} = 1.$$

Solution: The limit need not equal $1$.

Lean 4 formal statement:
abbrev putnam_1982_a6_solution : Prop := sorry
theorem putnam_1982_a6 :
  (∀ b : ℕ → ℕ,
    ∀ x : ℕ → ℝ,
      BijOn b (Ici 1) (Ici 1) →
      StrictAntiOn (fun n : ℕ => |x n|) (Ici 1) →
      Tendsto (fun n : ℕ => |b n - (n : ℤ)| * |x n|) atTop (𝓝 0) →
      Tendsto (fun n : ℕ => ∑ k ∈ Finset.Icc 1 n, x k) atTop (𝓝 1) →
      Tendsto (fun n : ℕ => ∑ k ∈ Finset.Icc 1 n, x (b k)) atTop (𝓝 1))
  ↔ putnam_1982_a6_solution :=
sorry
Problem: putnam_1982_b2
Tags: analysis

Let $A(x, y)$ denote the number of points $(m, n)$ with integer coordinates $m$ and $n$ where $m^2 + n^2 \le x^2 + y^2$. Also, let $g = \sum_{k = 0}^{\infty} e^{-k^2}$. Express the value $$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} A(x, y)e^{-x^2 - y^2} dx dy$$ as a polynomial in $g$.

Solution: The desired polynomial is $\pi(2g - 1)^2$.

Lean 4 formal statement:
noncomputable abbrev putnam_1982_b2_solution : Polynomial ℝ := sorry
theorem putnam_1982_b2
(A : ℝ × ℝ → ℕ)
(g I : ℝ)
(hA : A = fun (x, y) => {(m, n) : ℤ × ℤ | m^2 + n^2 ≤ x^2 + y^2}.ncard)
(hg : g = ∑' k : ℕ, Real.exp (-k^2))
(hI : I = ∫ y : ℝ, ∫ x : ℝ, A (x, y) * Real.exp (-x^2 - y^2))
: I = putnam_1982_b2_solution.eval g :=
sorry
Problem: putnam_1982_b3
Tags: analysis, number_theory, probability

Let $p_n$ denote the probability that $c + d$ will be a perfect square if $c$ and $d$ are selected independently and uniformly at random from $\{1, 2, 3, \dots, n\}$. Express $\lim_{n \rightarrow \infty} p_n \sqrt{n}$ in the form $r(\sqrt{s} - t)$ for integers $s$ and $t$ and rational $r$.

Solution: The limit equals $\frac{4}{3}(\sqrt{2} - 1)$.

Lean 4 formal statement:
noncomputable abbrev putnam_1982_b3_solution : ℝ := sorry
theorem putnam_1982_b3
(p : ℕ → ℝ)
(hp : p = fun n : ℕ => ({(c, d) : Finset.Icc 1 n × Finset.Icc 1 n | ∃ m : ℕ, m^2 = c + d}.ncard : ℝ) / n^2)
: Tendsto (fun n : ℕ => p n * Real.sqrt n) atTop (𝓝 putnam_1982_b3_solution) :=
sorry
Problem: putnam_1982_b4
Tags: number_theory

Let $n_1, n_2, \dots, n_s$ be distinct integers such that, for every integer $k$, $n_1n_2\cdots n_s$ divides $(n_1 + k)(n_2 + k) \cdots (n_s + k)$. Prove or provide a counterexample to the following claims:
\begin{enumerate}
\item
For some $i$, $|n_i| = 1$.
\item
If all $n_i$ are positive, then $\{n_1, n_2, \dots, n_s\} = \{1, 2, \dots, s\}$.
\end{enumerate}

Solution: Both claims are true.

Lean 4 formal statement:
abbrev putnam_1982_b4_solution : Prop × Prop := sorry
theorem putnam_1982_b4
    (P : Finset ℤ → Prop)
    (P_def : ∀ n, P n ↔ n.Nonempty ∧ ∀ k, ∏ i ∈ n, i ∣ ∏ i ∈ n, (i + k)) :
    ((∀ n, P n → 1 ∈ n ∨ -1 ∈ n) ↔ putnam_1982_b4_solution.1) ∧
    ((∀ n, P n → (∀ i ∈ n, 0 < i) → n = Finset.Icc (1 : ℤ) n.card) ↔ putnam_1982_b4_solution.2) :=
  sorry
Problem: putnam_1982_b5
Tags: analysis

For all $x > e^e$, let $S = u_0, u_1, \dots$ be a recursively defined sequence with $u_0 = e$ and $u_{n+1} = \log_{u_n} x$ for all $n \ge 0$. Prove that $S_x$ converges to some real number $g(x)$ and that this function $g$ is continuous for $x > e^e$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1982_b5
(T : Set ℝ)
(hT : T = Ioi (Real.exp (Real.exp 1)))
(S : ℝ → ℕ → ℝ)
(hS : ∀ x ∈ T, S x 0 = (Real.exp 1) ∧ ∀ n : ℕ, S x (n + 1) = Real.logb (S x n) x)
(g : ℝ → ℝ)
: ∀ x ∈ T, (∃ L : ℝ, Tendsto (S x) atTop (𝓝 L)) ∧
(∀ x ∈ T, Tendsto (S x) atTop (𝓝 (g x))) → ContinuousOn g T :=
sorry
Problem: putnam_1983_a1
Tags: number_theory

How many positive integers $n$ are there such that $n$ is an exact divisor of at least one of the numbers $10^{40},20^{30}$?

Solution: Show that the desired count is $2301$.

Lean 4 formal statement:
abbrev putnam_1983_a1_solution : ℕ := sorry
theorem putnam_1983_a1
: {n : ℤ | n > 0 ∧ (n ∣ 10 ^ 40 ∨ n ∣ 20 ^ 30)}.encard = putnam_1983_a1_solution :=
sorry
Problem: putnam_1983_a3
Tags: number_theory, algebra

Let $p$ be in the set $\{3,5,7,11,\dots\}$ of odd primes and let $F(n)=1+2n+3n^2+\dots+(p-1)n^{p-2}$. Prove that if $a$ and $b$ are distinct integers in $\{0,1,2,\dots,p-1\}$ then $F(a)$ and $F(b)$ are not congruent modulo $p$, that is, $F(a)-F(b)$ is not exactly divisible by $p$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1983_a3
(p : ℕ)
(F : ℕ → ℕ)
(poddprime : Odd p ∧ p.Prime)
(hF : ∀ n : ℕ, F n = ∑ i ∈ Finset.range (p - 1), (i + 1) * n ^ i)
: ∀ a ∈ Finset.Icc 1 p, ∀ b ∈ Finset.Icc 1 p, a ≠ b → ¬(F a ≡ F b [MOD p]) :=
sorry
Problem: putnam_1983_a4
Tags: algebra

Prove that for $m = 5 \pmod 6$,
\[
\binom{m}{2} - \binom{m}{5} + \binom{m}{8} - \binom{m}{11} + ... - \binom{m}{m-6} + \binom{m}{m-3} \neq 0.
\]

Solution: None.

Lean 4 formal statement:
theorem putnam_1983_a4
(k m : ℕ)
(S : ℤ)
(kpos : k > 0)
(hm : m = 6 * k - 1)
(hS : S = ∑ j ∈ Finset.Icc 1 (2 * k - 1), (-1 : ℤ) ^ (j + 1) * choose m (3 * j - 1))
: (S ≠ 0) :=
sorry
Problem: putnam_1983_a5
Tags: analysis

Prove or disprove that there exists a positive real number $\alpha$ such that $[\alpha_n] - n$ is even for all integers $n > 0$. (Here $[x]$ denotes the greatest integer less than or equal to $x$.)

Solution: Prove that such an $\alpha$ exists.

Lean 4 formal statement:
abbrev putnam_1983_a5_solution : Prop := sorry
theorem putnam_1983_a5 :
    (∃ α : ℝ, α > 0 ∧ ∀ n : ℕ, n > 0 → Even (⌊α ^ n⌋ - n)) ↔ putnam_1983_a5_solution :=
  sorry
Problem: putnam_1983_a6
Tags: analysis

Let $T$ be the triangle with vertices $(0, 0)$, $(a, 0)$, and $(0, a)$. Find $\lim_{a \to \infty} a^4 \exp(-a^3) \int_T \exp(x^3+y^3) \, dx \, dy$.

Solution: Show that the integral evaluates to $\frac{2}{9}$.

Lean 4 formal statement:
noncomputable abbrev putnam_1983_a6_solution : ℝ := sorry
theorem putnam_1983_a6
(F : ℝ → ℝ)
(hF : F = fun a ↦ (a ^ 4 / exp (a ^ 3)) * ∫ x in (0)..a, ∫ y in (0)..(a - x), exp (x ^ 3 + y ^ 3))
: (Tendsto F atTop (𝓝 putnam_1983_a6_solution)) :=
sorry
Problem: putnam_1983_b2
Tags: algebra

Let $f(n)$ be the number of ways of representing $n$ as a sum of powers of $2$ with no power being used more than $3$ times. For example, $f(7) = 4$ (the representations are $4 + 2 + 1$, $4 + 1 + 1 + 1$, $2 + 2 + 2 + 1$, $2 + 2 + 1 + 1 + 1$). Can we find a real polynomial $p(x)$ such that $f(n) = [p(n)]$, where $[u]$ denotes the greatest integer less than or equal to $u$?

Solution: Prove that such a polynomial exists.

Lean 4 formal statement:
abbrev putnam_1983_b2_solution : Prop := sorry
theorem putnam_1983_b2
    (f : ℕ+ → ℕ)
    (hf : f = fun (n : ℕ+) ↦
      Set.ncard {M : Multiset ℕ |
        (∀ m ∈ M, ∃ k : ℕ, m = (2 ^ k : ℤ)) ∧
        (∀ m ∈ M, M.count m ≤ 3) ∧
        (M.sum : ℤ) = n}) :
    putnam_1983_b2_solution ↔
      (∃ p : Polynomial ℝ, ∀ n : ℕ+, ⌊p.eval (n : ℝ)⌋ = f n) :=
  sorry
Problem: putnam_1983_b4
Tags: algebra

Let $f(n) = n + [\sqrt n]$, where $[x]$ denotes the greatest integer less than or equal to $x$. Define the sequence $a_i$ by $a_0 = m$, $a_{n+1} = f(a_n)$. Prove that it contains at least one square.

Solution: None.

Lean 4 formal statement:
theorem putnam_1983_b4
    (f : ℕ → ℤ)
    (a : ℕ → ℕ)
    (hf : f = fun (n : ℕ) ↦ n + Int.floor (√n))
    (ha0 : a 0 > 0)
    (han : ∀ n : ℕ, a (n + 1) = f (a n)) :
    (∃ i : ℕ, ∃ s : ℤ, a i = s ^ 2) :=
  sorry
Problem: putnam_1983_b5
Tags: analysis

Define $\left\lVert x \right\rVert$ as the distance from $x$ to the nearest integer. Find $\lim_{n \to \infty} \frac{1}{n} \int_{1}^{n} \left\lVert \frac{n}{x} \right\rVert \, dx$. You may assume that $\prod_{n=1}^{\infty} \frac{2n}{(2n-1)} \cdot \frac{2n}{(2n+1)} = \frac{\pi}{2}$.

Solution: Show that the limit equals $\ln \left( \frac{4}{\pi} \right)$.

Lean 4 formal statement:
noncomputable abbrev putnam_1983_b5_solution : ℝ := sorry
theorem putnam_1983_b5
(dist_fun : ℝ → ℝ)
(hdist_fun : dist_fun = fun (x : ℝ) ↦ min (x - ⌊x⌋) (⌈x⌉ - x))
(fact : Tendsto (fun N ↦ ∏ n ∈ Finset.Icc 1 N, (2 * n / (2 * n - 1)) * (2 * n / (2 * n + 1)) : ℕ → ℝ) atTop (𝓝 (Real.pi / 2)))
: (Tendsto (fun n ↦ (1 / n) * ∫ x in (1)..n, dist_fun (n / x) : ℕ → ℝ) atTop (𝓝 putnam_1983_b5_solution)) :=
sorry
Problem: putnam_1983_b6
Tags: algebra

Let $n$ be a positive integer and let $\alpha \neq 1$ be a complex $(2n + 1)\textsuperscript{th}$ root of unity. Prove that there always exist polynomials $p(x)$, $q(x)$ with integer coefficients such that $p(\alpha)^2 + q(\alpha)^2 = -1$.

Solution: None.

Lean 4 formal statement:
theorem putnam_1983_b6
(n : ℕ)
(npos : n > 0)
(α : ℂ)
(hα : α ^ (2 ^ n + 1) - 1 = 0 ∧ α ≠ 1)
: (∃ p q : Polynomial ℤ, (aeval α p) ^ 2 + (aeval α q) ^ 2 = -1) :=
sorry
Problem: putnam_1984_a2
Tags: analysis

Express $\sum_{k=1}^\infty (6^k/(3^{k+1}-2^{k+1})(3^k-2^k))$ as a rational number.

Solution: Show that the sum converges to $2$.

Lean 4 formal statement:
abbrev putnam_1984_a2_solution : ℚ := sorry
theorem putnam_1984_a2
: ∑' k : Set.Ici 1, (6 ^ (k : ℕ) / ((3 ^ ((k : ℕ) + 1) - 2 ^ ((k : ℕ) + 1)) * (3 ^ (k : ℕ) - 2 ^ (k : ℕ)))) = putnam_1984_a2_solution :=
sorry