Function prime_checker::is_hcn

source ·
pub fn is_hcn(num: u64) -> (bool, Vec<u64>)
Expand description

Checks to see if a given number is a highly-composite (anti-prime) number.

Arguments:

  1. num: u64 - The number to check.

Returns:

  1. bool - Is true if the number is anti-prime, and false if it is not.
  2. Vec<u64> - The list of factors of the number.

Example:

let (check,factors) = prime_checker::is_hcn(12);

assert_eq!(factors, vec![1, 2, 3, 4, 6, 12]);
assert_eq!(check, true);