IsCarolNumber
Checks if an integer is a Carol number.
Syntax
-
IsCarolNumber(n)
-
n
is an integer
-
Description
If n
is an integer, then IsCarolNumber(n)
is true
iff n
is a Carol number.
A Carol number is an integer of the form (2^n − 1)^2 − 2
.