/- 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. -/ import FormalConjecturesUtil

Integer part of area of a regular polygon with $n$ sides each of length 1

The area of a regular $n$-gon with side length 1 is given by $\frac{n}{4} \cot(\pi / n) = \frac{n}{4 \tan(\pi / n)}$.

References:

namespace OeisA64313

The exact area of a regular $n$-gon with side length 1.

noncomputable def area (n : ) : := (n : ) / (4 * Real.tan (Real.pi / (n : )))

Integer part of area of a regular polygon with $n$ sides each of length 1.

noncomputable def a (n : ) : := (Int.floor (area n)).toNath:Real.pi / 1 = Real.pi1 / (4 * 0).toNat = 0 All goals completed! 🐙2 / (4 * 0).toNat = 0 All goals completed! 🐙hf:3 / (4 * 3) = 0Int.toNat 0 = 0 All goals completed! 🐙h:4 / (4 * Real.tan (Real.pi / 4)) = 1hf:1 = 1Int.toNat 1 = 1 All goals completed! 🐙h_eq:6 / (4 * (1 / 3)) = 3 * 3 / 2hf:3 * 3 / 2 = 2Int.toNat 2 = 2 All goals completed! 🐙

"Usually (perhaps always?) $\lfloor n^2 / (4\pi) - \pi / 12 \rfloor$ for a polygon of circumference $n$. Note that the area of a circle with circumference $C$ is $C^2 / (4\pi)$."

@[category research open, AMS 51] theorem conjecture (n : ) (hn : 3 n) : a n = (Int.floor ((n : ) ^ 2 / (4 * Real.pi) - Real.pi / 12)).toNat := n:hn:3 na n = n ^ 2 / (4 * Real.pi) - Real.pi / 12.toNat All goals completed! 🐙end OeisA64313