Commit Graph

1 Commits

Author SHA1 Message Date
Shriyans Gandhi
3a4cc7e310
Hexagonal number sequence (#5640)
* Hexagonal number sequence 

A hexagonal number sequence is a sequence of figurate numbers where the nth hexagonal number hₙ is the number of distinct dots in a pattern of dots consisting of the outlines of regular hexagons with sides up to n dots, when the hexagons are overlaid so that they share one vertex.

This program returns the hexagonal number sequence of n length.

* Update hexagonalnumbers.py

* Update hexagonalnumbers.py

* Update hexagonalnumbers.py

* Update hexagonalnumbers.py

* Update and rename hexagonalnumbers.py to hexagonal_numbers.py

* Length must be a positive integer

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-29 09:39:32 +02:00