import math


def is_prime_bf(n):
	"""
	Tests whether an integer is prime through brute force. A wheel (mod 6)
	is used to test potential candidates.

	Arguments:
		n (:int) - the integer to be tested

	Returns:
		True if 'n' is prime and False otherwise

	Examples:
		>>> is_prime_bf(20)
		>>> False

		>>> is_prime_bf(7)
		>>> True

		>>> is_prime_bf(9999)
		>>> False
	"""
	if n < 2: return False
	if n == 2 or n == 3: return True
	if not n & 1: return False
	if not n % 3: return False
	if n < 9: return True
	sqrt_n = int(math.sqrt(n)) + 1
	for i in range(5, sqrt_n, 6):
		if not n % i or not n % (i + 2): return False
	return True