pentagonal number sequence (really int)

This commit is contained in:
Stefan Harmuth 2022-08-07 18:50:08 +02:00
parent 2ac37ad567
commit c752c286d2

View File

@ -35,4 +35,4 @@ def pentagonal(n: int) -> int:
A pentagonal number is a figurate number that extends the concept of triangular and square numbers to the pentagon
0, 1, 5, 12, 22, 35, ...
"""
return ((3 * n * n) - n) / 2
return ((3 * n * n) - n) // 2