/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/importFormalConjecturesUtil
arxiv/2607.05739Integer values of $\tan(\arctan 1+\arctan 2+\cdots+\arctan n)$ are rare by Ken Ono
[AMM08] T. Amdeberhan, L. A. Medina, and V. H. Moll, Arithmetical properties of a sequence
arising from an arctangent sum, J. Number Theory 128 (2008), no. 6, 1807-1846.
TanArctan, a Lean formalisation of the three
results of [Ono26], MIT licensed. Its P, A, B and x are the definitions used
here.
openFinsetnamespaceArxiv.«2607.05739»
$Z_n = \prod_{k=1}^n (1 + ik)$, in the Gaussian integers.
Stated as $A_n \mid B_n$ rather than as ∃ m : ℤ, x n = m, so that it still says the right
thing if $A_n$ were ever $0$. There $x_n$ is a pole of the tangent rather than an integer, but
(B n : ℚ) / 0 is 0 in Lean and would count as one. The two agree whenever $A_n \neq 0$,
which holds for every $n \leq 3000$.
Conjecture (Amdeberhan-Medina-Moll, 2008). For every integer $n \geq 5$, the value
$$x_n = \tan(\arctan 1 + \arctan 2 + \cdots + \arctan n)$$
is not an integer.
The exceptional set $E = {n \geq 5 : |x_n| > n/2 + 1}$. An index with $A_n = 0$ is a
pole of the tangent rather than a large value, and is counted in, reading $|x_n|$ as infinite.