polygonal
NodeJs module for getting polygonal numbers
The Polygonal Numbers
Polygonal numbers are numbers that can be arranged in a regular polygon if they're represented as dots.
eg.:
Triangular numbers
Formula
The formula to get the nth polygonal number of a s-sided polygon is:
Installation
This module is on the npm repository, to intall it run the following command
$ npm install polygonal
Usage
var polygonal = ; // get the second pentagonalvar x = polygonal;var y = polygonal; // x is equal to y!!