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 for, test and/or numbers:
“Conventional manners are a kind of literacy test for the alien who comes among us.”
—Katharine Fullerton Gerould (18791944)
“The final test of a novel will be our affection for it, as it is the test of our friends, and of anything else which we cannot define.”
—E.M. (Edward Morgan)
“The barriers of conventionality have been raised so high, and so strangely cemented by long existence, that the only hope of overthrowing them exists in the union of numbers linked together by common opinion and effort ... the united watchword of thousands would strike at the foundation of the false system and annihilate it.”
—Mme. Ellen Louise Demorest 18241898, U.S. womens magazine editor and womans club movement pioneer. Demorests Illustrated Monthly and Mirror of Fashions, p. 203 (January 1870)