Test For Hexagonal Numbers
One can efficiently test whether a positive integer x is an hexagonal number by computing
If n is an integer, then x is the nth hexagonal number. If n is not an integer, then x is not hexagonal.
Read more about this topic: Hexagonal Number
Famous quotes containing the words test and/or numbers:
“Tried by a New England eye, or the more practical wisdom of modern times, they are the oracles of a race already in its dotage; but held up to the sky, which is the only impartial and incorruptible ordeal, they are of a piece with its depth and serenity, and I am assured that they will have a place and significance as long as there is a sky to test them by.”
—Henry David Thoreau (18171862)
“The forward Youth that would appear
Must now forsake his Muses dear,
Nor in the Shadows sing
His Numbers languishing.”
—Andrew Marvell (16211678)