Ad
  • Default User Avatar

    Thanks! I'm glad you enjoyed it. It's always great to have that "Aha!" moment :)

  • Custom User Avatar

    [21, 27] is not a sexy prime pair because neither is prime... 21 is divisible by 3 and 7...27 is divisible by 3, 9, and 7

    [16, 22] is not a sexy prime pair because, again, neither is prime...16 is divisible by 2, 4, and 8...22 is divisible by 2 and 11

    Hence, your function should indeed return false because they are not prime. As the description says: "Sexy primes are pairs of TWO PRIMES that are 6 apart".