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:
“Our decision about energy will test the character of the American people and the ability of the President and the Congress to govern this nation. This difficult effort will be the moral equivalent of war, except that we will be uniting our efforts to build and not to destroy.”
—Jimmy Carter (James Earl Carter, Jr.)
“Out of the darkness where Philomela sat,
Her fairy numbers issued. What then ailed me?
My ears are called capacious but they failed me,
Her classics registered a little flat!
I rose, and venomously spat.”
—John Crowe Ransom (18881974)