📜  257-gon number(1)

📅  最后修改于: 2023-12-03 15:29:11.039000             🧑  作者: Mango

257-gon Number

A 257-gon number is a number that represents the number of triangles that can be formed by connecting the vertices of a regular polygon with 257 sides.

Formula

The formula for the number of triangles that can be formed by connecting the vertices of a regular polygon with n sides is given as:

(n * (n-1) * (n-2)) / 6

So the formula for 257-gon number is:

(257 * 256 * 255) / 6 = 10,225,040

Therefore, the 257-gon number is 10,225,040.

Code Sample

Here is a Python code snippet that implements the formula for the 257-gon number:

n = 257
n_gon_number = (n * (n-1) * (n-2)) / 6
print(f"The 257-gon number is: {n_gon_number}")

Output:

The 257-gon number is: 10225040.0
Conclusion

In this article, we learned about the 257-gon number and the formula for the number of triangles that can be formed by connecting the vertices of a regular polygon with n sides. We also provided a Python code sample that calculates the 257-gon number.