I know this is a very repetitive question on here, but I was looking to understand if I could simply check for a big integer, (eg. 157,632,829) by check if its divisible by 2, 3, 5 or 7, or am I missing corner cases?
ie.
if (n < 4) :
return True
if (n % 2 == 0 or n % 3 == 0 or n % 5 == 0 or n % 7 == 0) :
return False