A Gaussian integer is a number $z = a + bi$ where $a$, $b$ are integers and $i^2 = -1$.
Gaussian integers are a subset of the complex numbers, and the integers are the subset of Gaussian integers for which $b = 0$.
A Gaussian integer unit is one for which $a^2 + b^2 = 1$, i.e. one of $1, i, -1, -i$.
Let’s define a proper Gaussian integer as one for which $a \gt 0$ and $b \ge 0$.
A Gaussian integer $z_1 = a_1 + b_1 i$ is said to be divisible by $z_2 = a_2 + b_2 i$ if $z_3 = a_3 + b_3 i = z_1 / z_2$ is a Gaussian integer.
$\frac {z_1} {z_2} = \frac {a_1 + b_1 i} {a_2 + b_2 i} = \frac {(a_1 + b_1 i)(a_2 – b_2 i)} {(a_2 + b_2 i)(a_2 – b_2 i)} = \frac {a_1 a_2 + b_1 b_2} {a_2^2 + b_2^2} + \frac {a_2 b_1 – a_1 b_2} {a_2^2 + b_2^2}i = a_3 + b_3 i$
So, $z_1$ is divisible by $z_2$ if $\frac {a_1 a_2 + b_1 b_2} {a_2^2 + b_2^2}$ and $\frac {a_2 b_1 – a_1 b_2} {a_2^2 + b_2^2}$ are integers.
For example, $2$ is divisible by $1 + i$ because $2/(1 + i) = 1 – i$ is a Gaussian integer.
A Gaussian prime is a Gaussian integer that is divisible only by a unit, itself or itself times a unit.
For example, $1 + 2i$ is a Gaussian prime, because it is only divisible by $1$, $i$, $-1$, $-i$, $1 + 2i$, $i(1 + 2i) = i – 2$, $-(1 + 2i) = -1 – 2i$ and $-i(1 + 2i) = 2 – i$.
$2$ is not a Gaussian prime as it is divisible by $1 + i$.
A Gaussian integer can be uniquely factored as the product of a unit and proper Gaussian primes.
For example $2 = -i(1 + i)^2$ and $1 + 3i = (1 + i)(2 + i)$.
A Gaussian integer is said to be squarefree if its prime factorization does not contain repeated proper Gaussian primes.
So $2$ is not squarefree over the Gaussian integers, but $1 + 3i$ is.
Units and Gaussian primes are squarefree by definition.
Let $f(n)$ be the count of proper squarefree Gaussian integers with $a^2 + b^2 \le n$.
For example $f(10) = 7$ because $1$, $1 + i$, $1 + 2i$, $1 + 3i = (1 + i)(1 + 2i)$, $2 + i$, $3$ and $3 + i = -i(1 + i)(1 + 2i)$ are squarefree, while $2 = -i(1 + i)^2$ and $2 + 2i = -i(1 + i)^3$ are not.
You are given $f(10^2) = 54$, $f(10^4) = 5218$ and $f(10^8) = 52126906$.
Find $f(10^{14})$.
To find the value of f(10^14), we need to count the number of proper squarefree Gaussian integers with a^2 + b^2 ≤ 10^14.
To do this, we can iterate through all possible values of a and b, where a^2 + b^2 ≤ 10^14. For each pair (a, b) that satisfies the condition, we check if the Gaussian integer z = a + bi is squarefree by checking its prime factorization. If z is squarefree, we increment the count.
We also need to check if z is proper, i.e., a > 0 and b ≥ 0. If a = 0 or b < 0, we skip to the next iteration. To check if a Gaussian integer is squarefree, we need to factorize it into its prime factors. We can use a modified version of the Sieve of Eratosthenes to find all the Gaussian primes less than or equal to the given limit. Here's a Python code that solves the problem: ```python import math def count_squarefree(limit): primes = get_gaussian_primes(limit) # Get all Gaussian primes up to the limit count = 0 for a in range(1, int(math.sqrt(limit)) + 1): for b in range(int(math.sqrt(limit - a*a)) + 1): z = a + b * 1j # Create Gaussian integer if is_proper(z): if is_squarefree(z, primes): count += 1 return count def is_proper(z): return z.real > 0 and z.imag >= 0
def is_squarefree(z, primes):
for prime in primes:
if prime == z:
continue
if prime.real * prime.real + prime.imag * prime.imag == 1:
if z.real % prime.real == 0 and z.imag % prime.imag == 0:
return False
else:
if z.real % prime.real == 0 and z.imag % prime.imag == 0 and z.real == prime.real and z.imag == prime.imag:
return False
return True
def get_gaussian_primes(limit):
primes = []
sieve = [True] * (limit + 1)
sieve[0] = False
sieve[1] = False
for p in range(2, int(math.sqrt(limit)) + 1):
if sieve[p]:
for i in range(p*p, limit + 1, p):
sieve[i] = False
for a in range(0, int(math.sqrt(limit)) + 1):
for b in range(a + 1):
if a == 0 and b == 0:
continue
z = a + b * 1j
if sieve[a*a + b*b]:
primes.append(z)
return primes
result = count_squarefree(10**14)
print(result)
“`
The code uses the `count_squarefree` function to calculate the count of proper squarefree Gaussian integers with a^2 + b^2 ≤ 10^14.
The `get_gaussian_primes` function implements the modified Sieve of Eratosthenes to get all the Gaussian primes up to the given limit.
The `is_proper` function checks whether a Gaussian integer is proper.
The `is_squarefree` function checks whether a Gaussian integer is squarefree by iterating through the Gaussian primes and checking if any of them divide the given Gaussian integer.
Running this code will give the value of $f(10^{14})$.
More Answers:
Power Sets of Power SetsCentaurs on a Chess Board
McCarthy 91 Function