Algosim documentation: IsCarolNumber

IsCarolNumber

Checks if an integer is a Carol number.

Syntax

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.