"For invalid inputs (non-integers, integers out of range), throw an exception or output/return nothing/null."
"An integer with leading/trailing whitespace as input is considered invalid."
"An integer with a + as sign character as input is considered invalid."
"If your language allows you to pass an already-parsed integer as input, the above parsing rules (except the range one) don't apply, because the int is already parsed."
"Use of built-in prime generators and primality testers (this includes prime factorization functions) is not allowed."