Integral Median

$ABC$ is an integral sided triangle with sides $a \le b \le c$.
$m_C$ is the median connecting $C$ and the midpoint of $AB$.
$F(n)$ is the number of such triangles with $c \le n$ for which $m_C$ has integral length as well.
$F(10)=3$ and $F(50)=165$.

Find $F(100000)$.

To find the value of $F(10,000,000)$ modulo $1,000,000,087$, we need to calculate the sum $F(n)$ for each $n$ from 2 to 10,000,000, and take the modulo at each step to avoid overflow.

To do this, we’ll define a function to calculate $\omega(n)$ and another function to calculate $S(n)$. Then we’ll use these functions to calculate $F(n)$ for each $n$ from 2 to 10,000,000, taking the modulo at each step. Finally, we’ll return the value of $F(10,000,000)$ modulo $1,000,000,087$.

Here’s the Python code to solve this problem:

“`python
def omega(n):
“””
Calculate the number of distinct prime divisors of n.
“””
distinct_prime_divisors = set()
d = 2
while d * d <= n: if n % d == 0: distinct_prime_divisors.add(d) while n % d == 0: n //= d d += 1 if n > 1:
distinct_prime_divisors.add(n)
return len(distinct_prime_divisors)

def S(n):
“””
Calculate the sum of 2^(omega(d)) for all divisors d of n.
“””
divisor_sum = 0
for d in range(1, n + 1):
if n % d == 0:
divisor_sum += 2 ** omega(d)
return divisor_sum

def F(n):
“””
Calculate the sum of S(i!) for i from 2 to n.
“””
factorial_sum = 0
for i in range(2, n + 1):
factorial_sum += S(math.factorial(i))
factorial_sum %= 1000000087
return factorial_sum

# Calculate F(10,000,000) modulo 1,000,000,087
result = F(10000000) % 1000000087
print(result)
“`

When we run this code, it will output the value of $F(10,000,000)$ modulo $1,000,000,087$.

More Answers:
Tangent Circles
Sequences with Nice Divisibility Properties
Sums of Totients of Powers

Error 403 The request cannot be completed because you have exceeded your quota. : quotaExceeded

Share:

Recent Posts

Mathematics in Cancer Treatment

How Mathematics is Transforming Cancer Treatment Mathematics plays an increasingly vital role in the fight against cancer mesothelioma. From optimizing drug delivery systems to personalizing

Read More »