problem: Let $a = 163$ and $b = 132$. Let $d$ be a positive divisor of $\gcd(a, b)$. Define $s = \sum_{d \mid \gcd(a,b)} \mu(d)$, where $\mu$ is the Möbius function. Let $n = 187 \cdot s$. Define $h = \mu(n)^2$. Let $k$ be the number of positive integers less than or equal to 184815 that are divisible by 333. Let $u = k \cdot h$. Compute the sum of $\phi(m)$ for all positive integers $m$ from 1 to $u$, inclusive, where $\phi$ is Euler's totient function.

answer: 93734

graph:
graphs = [
    Graph(
        let={
            "_n": Const(2),
            "a": Const(163),
            "b": Const(132),
            "s": SumOverDivisors(n=GCD(a=Ref(name='a'), b=Ref(name='b')), var='d', expr=MoebiusMu(n=Var(name='d'))),
            "n": Mul(Const(187), Ref("s")),
            "h": Pow(MoebiusMu(n=Ref(name='n')), Ref("_n")),
            "upper": Mul(CountOverSet(set=SolutionsSet(var=Var("k"), condition=And(Geq(Var("k"), Const(1)), Leq(Var("k"), Const(184815)), Divides(divisor=Const(333), dividend=Var("k"))), domain='positive_integers')), Ref("h")),
            "result": SumOverSet(set=MapOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(1)), Leq(Var("n"), Ref("upper")))), expr=EulerPhi(n=Var("n")))),
        },
        goal=Ref("result"),
    )
]

domain: NT

goal: SUM

evaluator_id: sympy

answer: 93734

license: CC BY 4.0

answer: -59

answer: 95025

model: mathstral

answer: 0

C2: ok

MOBIUS_COPRIME: ok

COUNT_COPRIME_GRID: no

DS2: no

K18: no

L3b: no

LTE_SUM: no


problem: Let $k = 720$. Determine the number of integers $d$ such that $2 \leq d \leq 122$, $d$ divides $k$, and $5 \leq \frac{k}{d} \leq 125$.

answer: 20

graph:
graphs = [
    Graph(
        let={
            "k": Const(720),
            "a": Const(1),
            "b": Const(4),
            "upper": Const(121),
            "result": CountOverSet(set=SolutionsSet(var=Var("d"), condition=And(Geq(Var("d"), Const(2)), Leq(Var("d"), Const(122)), Divides(divisor=Var("d"), dividend=Ref("k")), Geq(Div(Ref("k"), Var("d")), Const(5)), Leq(Div(Ref("k"), Var("d")), Const(125))))),
        },
        goal=Ref("result"),
    )
]

goal: COUNT

answer: 20

answer: 20

B1: ok

OMEGA_ONE: ok

C2: no

K13: no

K16: no

V5: no

V7: no


problem: Let $S$ be the set of all positive integers $p$ for which there exists an integer $q$ such that $pq = 108$, $\gcd(p, q) = 1$, and $p < q$. Let $k$ be the number of elements in $S$. Let $m = 13013$, and let $n$ be the smallest divisor of $m$ that is at least $k$. Compute the number of derangements of $n$ elements, denoted $!n$.

answer: 1854

graph:
graphs = [
    Graph(
        let={
            "_m": Const(13013),
            "_n": CountOverSet(set=SolutionsSet(var=Var("p"), condition=And(IsPositive(arg=Var(name='p')), Exists(var=Var(name='q'), condition=And(Eq(left=Mul(Var(name='p'), Var(name='q')), right=Const(value=108)), Eq(left=GCD(a=Var(name='p'), b=Var(name='q')), right=Const(value=1)), Lt(left=Var(name='p'), right=Var(name='q'))))))),
            "n": MinOverSet(set=SolutionsSet(var=Var("d"), condition=And(Geq(Var("d"), Ref("_n")), Divides(divisor=Var("d"), dividend=Ref("_m"))))),
            "result": Subfactorial(arg=Ref(name='n')),
        },
        goal=Ref("result"),
    )
]

secondary_domain: COMB

answer: 1854

answer: 1854

answer: 1854

answer: 265

answer: 1854

COPRIME_PAIRS: ok

LTE_DIFF: no

V8: no

VAL_SUM_EQ: no


problem: Let $a = 361$ and $b = 167$. Define a lattice point as a point $(x, y)$ in the coordinate plane where both $x$ and $y$ are integers. Consider the rectangle consisting of all points $(x, y)$ such that $0 \leq x \leq a$ and $0 \leq y \leq b$. Let $N$ be the number of lattice points in this rectangle. Compute the remainder when $57118 \cdot N$ is divided by $92463$.

answer: 38304

graph:
graphs = [
    Graph(
        let={
            "a": Const(361),
            "b": Const(167),
            "result": LatticePointsRect(a=Ref(name='a'), b=Ref(name='b')),
            "Q": Mod(value=Mul(Const(57118), Ref("result")), modulus=Const(92463)),
        },
        goal=Ref("Q"),
    )
]

domain: GEOM

answer: 38304

answer: 38304

answer: 38304

answer: 38304

answer: 1

answer: 6965

answer: 57138


problem: Let $d$ range over the positive divisors of $\gcd(12, 25)$. Define $L = \sum_{d \mid \gcd(12,25)} \mu(d)$, where $\mu$ is the M\"obius function. Let $S$ be the set of all integers $n$ such that $L \leq n \leq 29032$, $\gcd(n, 5) = 1$, and $\gcd(n, 9) = 1$. Determine the number of elements in $S$.

answer: 15484

graph:
graphs = [
    Graph(
        let={
            "upper": Const(29032),
            "k1": Const(5),
            "k2": Const(9),
            "result": CountOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), SumOverDivisors(n=GCD(a=Const(value=12), b=Const(value=25)), var='d', expr=MoebiusMu(n=Var(name='d')))), Leq(Var("n"), Ref("upper")), Eq(GCD(a=Var("n"), b=Ref("k1")), Const(1)), Eq(GCD(a=Var("n"), b=Ref("k2")), Const(1))))),
        },
        goal=Ref("result"),
    )
]

answer: 15484

answer: 15484

answer: 21406

LTE_DIFF_P2: no

MOD_ADD: no

V8_SUM: no


problem: Let $r$ be the largest prime number such that $2 \leq r \leq 22$. Compute the number of positive integers $n$ such that $1 \leq n \leq 60000$ and $n \equiv r \pmod{21}$.

answer: 2857

graph:
graphs = [
    Graph(
        let={
            "upper": Const(60000),
            "m": Const(21),
            "r": MaxOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(2)), Leq(Var("n"), Const(22)), IsPrime(Var("n"))))),
            "result": CountOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(1)), Leq(Var("n"), Ref("upper")), Eq(Mod(value=Var("n"), modulus=Ref("m")), Ref("r"))))),
        },
        goal=Ref("result"),
    )
]

answer: 2857

answer: 2862

answer: 2857

answer: 2857

MAX_PRIME_BELOW: ok

POLY_PADIC_VAL_CONST: no

V3: no


problem:
Let $R = \left|100 \cdot \sum_{k=1}^{16} \varphi(k) \cdot \left\lfloor \frac{16}{k} \right\rfloor + 20 \cdot (-9)\right|$,
$S = \gcd(100, 9) + \gcd(|20 - 100|, |136 - 9|) + \gcd(|0 - 20|, |0 - N|)$ where $N = \left|\{ n : 1 \le n \le 680,\ n \equiv \left\lfloor \frac{n}{2} \right\rfloor \pmod{5} \}\right|$, and $T = \frac{R + 2 - S}{2}$. Find the remainder when $76261T$ is divided by $89600$.

answer: 32388

graph:
graphs = [
    Graph(
        let={
            "_m": Const(136),
            "_n": Const(100),
            "area_2x": Abs(arg=Sum(Mul(Ref(name='_n'), Summation(expr=Mul(EulerPhi(n=Var(name='k')), Floor(arg=Div(left=Const(value=16), right=Var(name='k')))), var='k', start=Const(value=1), end=Const(value=16))), Mul(Const(value=20), Sub(left=Const(value=0), right=Const(value=9))))),
            "boundary": Sum(GCD(a=Abs(arg=Const(value=100)), b=Abs(arg=Const(value=9))), GCD(a=Abs(arg=Sub(left=Const(value=20), right=Const(value=100))), b=Abs(arg=Sub(left=Ref(name='_m'), right=Const(value=9)))), GCD(a=Abs(arg=Sub(left=Const(value=0), right=Const(value=20))), b=Abs(arg=Sub(left=Const(value=0), right=CountOverSet(set=SolutionsSet(var=Var(name='n'), condition=And(Geq(left=Var(name='n'), right=Const(value=1)), Leq(left=Var(name='n'), right=Const(value=680)), Congruent(a=Var(name='n'), b=Floor(arg=Div(left=Var(name='n'), right=Const(value=2))), modulus=Const(value=5))))))))),
            "result": Div(Sum(Ref("area_2x"), Const(2), Mul(Const(-1), Ref("boundary"))), Const(2)),
            "Q": Mod(value=Mul(Const(76261), Ref("result")), modulus=Const(89600)),
        },
        goal=Ref("Q"),
    )
]

secondary_domain: NT

answer: 32388

answer: 32388

answer: 32388

answer: 32388

K2: ok

L3C: ok


problem: Let $c$ be the number of positive integers $p$ for which there exists a positive integer $q$ such that $p \cdot q = 54$, $\gcd(p, q) = 1$, and $p < q$. Compute the number of prime numbers $n$ such that $c \leq n \leq 40000$.

answer: 4203

graph:
graphs = [
    Graph(
        let={
            "upper": Const(40000),
            "result": CountOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), CountOverSet(set=SolutionsSet(var=Var("p"), condition=And(IsPositive(arg=Var(name='p')), Exists(var=Var(name='q'), condition=And(Eq(left=Mul(Var(name='p'), Var(name='q')), right=Const(value=54)), Eq(left=GCD(a=Var(name='p'), b=Var(name='q')), right=Const(value=1)), Lt(left=Var(name='p'), right=Var(name='q')))))))), Leq(Var("n"), Ref("upper")), IsPrime(Var("n"))))),
        },
        goal=Ref("result"),
    )
]

answer: 4203

answer: 4203

answer: 1227

MOD_MUL: no


problem: Let $a = 84$, $b = 9$, $p = 5$, and $n = 225$. Compute the largest integer $k$ such that $p^k$ divides $a^n - b^n$. Multiply this $k$ by $16216$, and compute the remainder when the result is divided by $99325$.

answer: 64864

graph:
graphs = [
    Graph(
        let={
            "a_val": Const(84),
            "b_val": Const(9),
            "p_val": Const(5),
            "n_val": Const(225),
            "a_pow": Pow(Ref("a_val"), Ref("n_val")),
            "b_pow": Pow(Ref("b_val"), Ref("n_val")),
            "pow_diff": Sub(Ref("a_pow"), Ref("b_pow")),
            "_inner_result": MaxKDivides(target=Ref("pow_diff"), base=Ref("p_val")),
            "_scale_k": Const(16216),
            "_scaled": Mul(Ref("_scale_k"), Ref("_inner_result")),
            "_mod_M": Const(99325),
            "x": Mod(value=Ref("_scaled"), modulus=Ref("_mod_M")),
        },
        goal=Ref("x"),
    )
]

goal: COMPUTE

answer: 64864

answer: 64864

answer: 615

LTE_DIFF: ok

COUNT_PRIMES: no


problem: Let $x = 11$. Compute the value of $2x^2 - 7x + \sum_{k=1}^{3} k$.

answer: 171

graph:
graphs = [
    Graph(
        let={
            "x": Const(11),
            "result": Sum(Mul(Const(2), Pow(Ref("x"), Const(2))), Mul(Const(-7), Ref("x")), Summation(var="k", start=Const(1), end=Const(3), expr=Var("k"))),
        },
        goal=Ref("result"),
    )
]

answer: 171

answer: 169

answer: 171

answer: 171

SUM_ARITHMETIC: ok

COUNT_FIB_DIVISIBLE: no

MAX_PRIME_BELOW: no

MOD_FACTORIAL: no