Let $n = 24$. Let $S = \sum_{k=n}^{433} \binom{T}{k}$, where $T = \sum_{k=1}^{29} k$. Compute the remainder when $S$ is divided by $10859$.

Answer: 0

Answer: 3627

Answer: 4722

Answer: 10858

Answer: 1

Answer: 8

Answer: 2380

Answer: 0

Answer: 0

Answer: 0


Let $d$ be a positive integer such that $1 \le d \le 2$ and $d$ divides $14$. Let $m$ be the largest such $d$. Compute $m^{16}$.

Answer: 65536

graphs = [
    Graph(
        let={
            "_n": Const(14),
            "n": Const(16),
            "result": Pow(MaxOverSet(set=SolutionsSet(var=Var("d"), condition=And(Geq(Var("d"), Const(1)), Leq(Var("d"), Const(2)), Divides(divisor=Var("d"), dividend=Ref("_n"))))), Ref("n")),
        },
        goal=Ref("result"),
    )
]

Answer: 65536

Answer: 1048576

Answer: 65536

Answer: 65536


Compute the sum of $\phi(d)$ over all positive divisors $d$ of $43278$, where $\phi$ denotes Euler's totient function.

Answer: 43278

graphs = [
    Graph(
        let={
            "_n": Const(43278),
            "x": SumOverDivisors(n=Ref(name='_n'), var='d', expr=EulerPhi(n=Var(name='d'))),
        },
        goal=Ref("x"),
    )
]

Answer: 43278

Answer: 43278

Answer: 43278

Answer: 14424


Let $x$ be the product of two quantities. The first is the sum of all positive integers $k$ such that $3^k \le 71586494964$. The second is the sum of all $k$ such that $(k, j)$ is an ordered pair of positive integers with $1 \le k \le 8$ and $1 \le j \le 9$. Compute $x$.

Answer: 81972

graphs = [
    Graph(
        let={
            "_n": Const(3),
            "x": Mul(Summation(var="k", start=Const(1), end=MaxOverSet(set=SolutionsSet(var=Var("k"), condition=Leq(Pow(Ref("_n"), Var("k")), Const(71586494964)))), expr=Var("k")), SumOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("k"), Var("_j")]), condition=Const(1), domain=CartesianProduct(left=IntegerRange(start=Const(1), end=Const(8)), right=IntegerRange(start=Const(1), end=Const(9)))), expr=Var("k")))),
            "Q": Ref("x"),
        },
        goal=Ref("Q"),
    )
]

Answer: 81972

Answer: 81972

Answer: 2808


Let $\_n = 2$. Define $n$ to be the smallest integer $d$ such that $d \geq \_n$ and $d$ divides $5929$. Compute the number of derangements of $n$ elements, denoted $!n$.

Answer: 1854

graphs = [
    Graph(
        let={
            "_n": Const(2),
            "n": MinOverSet(set=SolutionsSet(var=Var("d"), condition=And(Geq(Var("d"), Ref("_n")), Divides(divisor=Var("d"), dividend=Const(5929))))),
            "result": Subfactorial(arg=Ref(name='n')),
        },
        goal=Ref("result"),
    )
]

Answer: 1854

Answer: 1854

Answer: 1855


Let $k = 1260$ and $u = 178$. Compute the number of positive integers $x$ such that $1 \leq x \leq u$, $x$ divides $k$, and $\frac{k}{x} \leq u$.

Answer: 22

graphs = [
    Graph(
        let={
            "k": Const(1260),
            "upper": Const(178),
            "result": CountOverSet(set=SolutionsSet(var=Var("x"), condition=And(Geq(Var("x"), Const(1)), Leq(Var("x"), Ref("upper")), Divides(divisor=Var("x"), dividend=Ref("k")), Leq(Div(Ref("k"), Var("x")), Ref("upper"))))),
        },
        goal=Ref("result"),
    )
]

Answer: 22

Answer: 22

Answer: 35

Answer: 22


A teacher assigns 7 distinct tasks to 2 identical teams such that each team gets at least one task. Teams are indistinct, so swapping team assignments doesn't count as a new arrangement. In how many ways can the tasks be assigned?

Answer: 126

Answer: 63

Answer: 63

Answer: 63

Answer: 126


Let $A$ be the number of ordered pairs of positive integers $(p, q)$ such that $pq = 18$, $\gcd(p, q) = 1$, and $p < q$. Let $U = 32768$. Define $S$ to be the set of all prime numbers $n$ such that $A \leq n \leq U$. Compute the number of elements in $S$.

Answer: 3512

graphs = [
    Graph(
        let={
            "upper": Const(32768),
            "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=18)), 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: 3512

Answer: 3512

Answer: 1092

Answer: 3512


Let $p$ be the minimum value of $|x - y|$ over all ordered pairs $(x, y)$ of positive integers such that $xy = 427812$. Compute $\frac{p(p - 1)}{4}$.

Answer: 53015

graphs = [
    Graph(
        let={
            "_n": Const(4),
            "p": MinOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x"), Var("y")]), condition=And(IsPositive(arg=Var(name='x')), IsPositive(arg=Var(name='y')), Eq(Mul(Var("x"), Var("y")), Const(427812)))), expr=Abs(arg=Sub(left=Var(name='x'), right=Var(name='y'))))),
            "result": Div(Mul(Ref("p"), Sub(Ref("p"), Const(1))), Ref("_n")),
        },
        goal=Ref("result"),
    )
]

Answer: 53015

Answer: 6271268

Answer: 53015

Answer: 2

Answer: 0


Let $S$ be the set of all positive integers $p$ for which there exists a positive integer $q$ such that $pq = 36$, $\gcd(p, q) = 1$, and $p < q$. Let $m$ be the number of elements in $S$. Determine the largest prime number $n$ such that $m \leq n \leq 24025$.

Answer: 24023

graphs = [
    Graph(
        let={
            "upper": Const(24025),
            "result": MaxOverSet(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=36)), 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: 24023

Answer: 23981

Answer: 24023

Answer: 23907


Let $a = 81$ and $b = 77$. Define $S$ as the set of all lattice points $(x, y)$ such that $0 \leq x \leq 81$ and $0 \leq y \leq 77$. Compute the number of elements in $S$.

Answer: 6396

graphs = [
    Graph(
        let={
            "a": Const(81),
            "b": Const(77),
            "result": LatticePointsRect(a=Ref(name='a'), b=Ref(name='b')),
            "Q": Abs(arg=Ref(name='result')),
        },
        goal=Ref("Q"),
    )
]

Answer: 6396

Answer: 6396

Answer: 6264

Answer: 6396

Answer: 6396

Answer: 6396

Answer: 6396


Let $\_n = 57863$ and $\text{upper} = 50176$. Let $m$ be the largest prime number in the range from 2 to 8, inclusive. Let $\text{result}$ be the number of positive integers $n$ such that $1 \leq n \leq \text{upper}$ and $n \equiv 1 \pmod{m}$.

Compute $17373 \cdot \text{result} \bmod \_n$.

Find the value of this expression.

Answer: 8488

graphs = [
    Graph(
        let={
            "_n": Const(57863),
            "upper": Const(50176),
            "m": MaxOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(2)), Leq(Var("n"), Const(8)), IsPrime(Var("n"))))),
            "r": Const(1),
            "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"))))),
            "Q": Mod(value=Mul(Const(17373), Ref("result")), modulus=Ref("_n")),
        },
        goal=Ref("Q"),
    )
]

Answer: 8488

Answer: 8488

Answer: 49968


Let $S$ be the set of all integers $t$ such that $12 \leq t \leq 491$ and there exist positive integers $a$ and $b$ with $1 \leq a \leq 10$, $1 \leq b \leq 63$, and $t = 5a + 7b$. Let $c$ be the number of elements in $S$. Compute
$$
\sum_{k=118}^{452} \binom{c}{k}.
$$
Let $s$ denote this sum. Compute the remainder when $s$ is divided by $10859$. Let $r$ be this remainder. Determine the value of $43 - r \bmod 80075$, taken as the unique integer in $[0, 80075)$.

Answer: 43

Answer: 76504

Answer: 10765

Answer: 43

Answer: 129

Answer: 77869

Answer: 43

Answer: 42

Answer: 43

Answer: 76691


Let $x$ be the number of ordered pairs $(i,j)$ of positive integers such that $i + j = 69$ and $1 \leq i, j \leq 67$. Compute the value of
$$
\sum_{n=1}^{|x|} \tau(n),
$$
where $\tau(n)$ denotes the number of positive divisors of $n$.

Answer: 292

graphs = [
    Graph(
        let={
            "x": CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("i"), Var("j")]), condition=Eq(Sum(Var("i"), Var("j")), Const(69)), domain=CartesianProduct(left=IntegerRange(start=Const(1), end=Const(67)), right=IntegerRange(start=Const(1), end=Const(67))))),
            "Q": Summation(var="n", start=Const(1), end=Abs(arg=Ref(name='x')), expr=NumDivisors(n=Var("n"))),
        },
        goal=Ref("Q"),
    )
]

Answer: 292

Answer: 292

Answer: 292

Answer: 292

Answer: 324

Answer: 1720

Answer: 100


Let $m = 4$ and $k = 5$. Let $a = 3$ and $b = 4$. Define $S$ as the set of all integers $n$ such that $1 \leq n \leq 20$, $n \equiv 3 \pmod{4}$, and $n \equiv 4 \pmod{5}$. Let $r$ be the minimum element of $S$. Compute $r + \phi(|r| + 1) + \tau(|r| + 1)$, where $\phi(n)$ denotes Euler's totient function and $\tau(n)$ denotes the number of positive divisors of $n$.

Answer: 33

graphs = [
    Graph(
        let={
            "m": Const(4),
            "k": Const(5),
            "a": Const(3),
            "b": Const(4),
            "upper": Const(20),
            "result": MinOverSet(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("a")), Eq(Mod(value=Var("n"), modulus=Ref("k")), Ref("b"))))),
            "Q": Sum(Ref("result"), EulerPhi(n=Sum(Abs(arg=Ref(name='result')), Const(1))), NumDivisors(n=Sum(Abs(arg=Ref(name='result')), Const(1)))),
        },
        goal=Ref("Q"),
    )
]

Answer: 33

Answer: 33

Answer: 26


Let $t$ be an integer such that $17 \leq t \leq 77$. Suppose there exist positive integers $a$ and $b$ with $1 \leq a \leq 6$ and $1 \leq b \leq 4$ such that $t = 6a + 10b + 1$. Let $n$ be the number of integers $t$ satisfying these conditions. Compute the $n$-th Lucas number.

Answer: 64079

graphs = [
    Graph(
        let={
            "n": CountOverSet(set=SolutionsSet(var=Var("t"), condition=Exists(var=Var(name='a'), condition=Exists(var=Var(name='b'), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=6)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=4)), Geq(left=Var(name='t'), right=Const(value=17)), Leq(left=Var(name='t'), right=Const(value=77)), Eq(left=Var(name='t'), right=Sum(Mul(Const(value=6), Var(name='a')), Mul(Const(value=10), Var(name='b')), Const(value=1)))))))),
            "result": Lucas(arg=Ref(name='n')),
        },
        goal=Ref("result"),
    )
]

Answer: 64079

Answer: 64079


Let $a = 349$ and $b = 105$. Define $R$ to be the number of lattice points in the rectangle $[0, a] \times [0, b]$, including the boundary. Let $r$ be the remainder when $|R|$ is divided by $11$. Compute the Bell number $B_r$, which counts the number of partitions of a set of $r$ elements. Find the value of $B_r$.

Answer: 1

Answer: 4140

Answer: 4140

Answer: 4140

Answer: 4140

Answer: 1

Answer: 4238

Answer: 1430

Answer: 4140

Answer: 1


Let $n = 10$. Define $C_n$ to be the $n$th Catalan number. Compute the remainder when $\sum_{k=\binom{10}{10}}^{|C_n|} \tau(k)$ is divided by 96591, where $\tau(k)$ denotes the number of positive divisors of $k$.

Answer: 69404

graphs = [
    Graph(
        let={
            "n": Const(10),
            "result": Catalan(Ref("n")),
            "Q": Mod(value=Summation(var="n", start=Binom(n=Const(10), k=Const(10)), end=Abs(arg=Ref(name='result')), expr=NumDivisors(n=Var("n"))), modulus=Const(96591)),
        },
        goal=Ref("Q"),
    )
]

Answer: 69404

Answer: 69406

Answer: 69404

Answer: 0

Answer: 85723

Answer: 0

Answer: 203


Let $S$ be the set of all positive integers $t$ such that there exist positive integers $a$ and $b$ with $1 \leq a \leq 4$, $1 \leq b \leq 5$, $17 \leq t \leq 48$, and $t = 5a + 4b + 8$. Let $n$ be the number of elements in $S$. Compute the $n$-th Fibonacci number.

Answer: 6765

graphs = [
    Graph(
        let={
            "n": CountOverSet(set=SolutionsSet(var=Var("t"), condition=Exists(var=Var(name='a'), condition=Exists(var=Var(name='b'), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=4)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=5)), Geq(left=Var(name='t'), right=Const(value=17)), Leq(left=Var(name='t'), right=Const(value=48)), Eq(left=Var(name='t'), right=Sum(Mul(Const(value=5), Var(name='a')), Mul(Const(value=4), Var(name='b')), Const(value=8)))))))),
            "result": Fibonacci(arg=Ref(name='n')),
        },
        goal=Ref("result"),
    )
]

Answer: 6765

Answer: 6765


Let $n$ be the number of ordered pairs $(i, j)$ such that $i \in \{1, 2\}$ and $j \in \{1, 2, 3\}$. Let $k$ be the number of ordered pairs $(i, j)$ of positive integers with $1 \leq i, j \leq 7$ such that $i + j = 9$. Compute $k! \cdot S(n, k)$, where $S(n, k)$ denotes the number of ways to partition a set of $n$ elements into $k$ nonempty unlabeled subsets.

Answer: 720

graphs = [
    Graph(
        let={
            "_n": Const(9),
            "n": CountOverSet(set=CartesianProduct(left=IntegerRange(start=Const(1), end=Const(2)), right=IntegerRange(start=Const(1), end=Const(3)))),
            "k": CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("i"), Var("j")]), condition=Eq(Sum(Var("i"), Var("j")), Ref("_n")), domain=CartesianProduct(left=IntegerRange(start=Const(1), end=Const(7)), right=IntegerRange(start=Const(1), end=Const(7))))),
            "result": Mul(Factorial(Ref("k")), Stirling2(n=Ref(name='n'), k=Ref(name='k'))),
        },
        goal=Ref("result"),
    )
]

Answer: 720

Answer: 720

Answer: 720

Answer: 720

Answer: 360

Answer: 720

Answer: 2016

Answer: 540

Answer: 1600


Let $n = 65444$ and $m = 20387$. Let $v_p(n!)$ denote the largest integer $k$ such that $p^k$ divides $n!$. Compute $v_5(n!) - v_5(m!)$.

Answer: 11262

graphs = [
    Graph(
        let={
            "n_val": Const(65444),
            "m_val": Const(20387),
            "p_val": Const(5),
            "n_fact": Factorial(Ref("n_val")),
            "m_fact": Factorial(Ref("m_val")),
            "vp_n": MaxKDivides(target=Ref("n_fact"), base=Ref("p_val")),
            "vp_m": MaxKDivides(target=Ref("m_fact"), base=Ref("p_val")),
            "x": Sub(Ref("vp_n"), Ref("vp_m")),
        },
        goal=Ref("x"),
    )
]

Answer: 11262

Answer: 11262

Answer: 11262

Answer: 11262

Answer: 11242

Answer: 11155


Let $x$ be a positive integer such that $1 \leq x \leq 336$ and
$$
33x \equiv 1 \pmod{337}.
$$
Determine the value of $x$.

Answer: 143

graphs = [
    Graph(
        let={
            "a": Const(33),
            "m": Const(337),
            "upper": Const(336),
            "result": MinOverSet(set=SolutionsSet(var=Var("x"), condition=And(Geq(Var("x"), Const(1)), Leq(Var("x"), Ref("upper")), Eq(Mod(value=Mul(Ref("a"), Var("x")), modulus=Ref("m")), Const(1))))),
        },
        goal=Ref("result"),
    )
]

Answer: 143

Answer: 53

Answer: 143


Let $n = 8$ and $m = 245$. Let $k$ be the smallest divisor of $245$ that is at least $2$. Define $r = \binom{8}{k} \cdot !(8 - k)$, where $!a$ denotes the number of derangements of $a$ elements. Let $Q = 24025 - r$. Compute $Q$.

Answer: 23913

graphs = [
    Graph(
        let={
            "_n": Const(245),
            "n": Const(8),
            "k": MinOverSet(set=SolutionsSet(var=Var("d"), condition=And(Geq(Var("d"), Const(2)), Divides(divisor=Var("d"), dividend=Ref("_n"))))),
            "result": Mul(Binom(n=Ref("n"), k=Ref("k")), Subfactorial(arg=Sub(left=Ref(name='n'), right=Ref(name='k')))),
            "_c": Const(24025),
            "Q": Sub(Ref("_c"), Ref("result")),
        },
        goal=Ref("Q"),
    )
]

Answer: 23913

Answer: 23913

Answer: 23913

Answer: 23689


Let $N$ be the number of integers $t$ with $14 \le t \le 2540$ that can be expressed as $t = 4a + 10b$ for some integers $a, b$ with $1 \le a \le 95$, $1 \le b \le 216$. Let $R$ be the number of integers $v$ with $5 \le v \le 980$ such that $v = 5b^2$ for some integer $b$ with $1 \le b \le 14$. Define $\det = 16 \cdot 6 + 5R$, $S = 241174 \cdot 6 + 7431914$, and $T = 16 \cdot (-74319) + 5 \cdot 241174$. Let $K = \frac{S}{\det} + \frac{T}{\det}$. Find the remainder when $N - K$ is divided by $68924$.

Answer: 55098

graphs = [
    Graph(
        let={
            "_m": Const(14),
            "_n": CountOverSet(set=SolutionsSet(var=Var("v"), condition=And(Geq(Var("v"), Const(5)), Leq(Var("v"), Const(980)), Exists(var=Tuple(elements=[Var(name='a'), Var(name='b')]), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=14)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=14)), Eq(left=Mul(Const(value=5), Pow(base=Var(name='b'), exp=Const(value=2))), right=Var(name='v'))))))),
            "num_x": Sub(Mul(Const(241174), Const(6)), Mul(Const(-74319), Ref("_m"))),
            "num_y": Sub(Mul(Const(16), Const(-74319)), Mul(Const(-5), Const(241174))),
            "det": Sub(Mul(Const(16), Const(6)), Mul(Const(-5), Ref("_n"))),
            "result": Sum(Div(Ref("num_x"), Ref("det")), Div(Ref("num_y"), Ref("det"))),
            "_c": CountOverSet(set=SolutionsSet(var=Var("t"), condition=Exists(var=Var(name='a'), condition=Exists(var=Var(name='b'), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=95)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=216)), Geq(left=Var(name='t'), right=Const(value=14)), Leq(left=Var(name='t'), right=Const(value=2540)), Eq(left=Var(name='t'), right=Sum(Mul(Const(value=4), Var(name='a')), Mul(Const(value=10), Var(name='b'))))))))),
            "Q": Mod(value=Sub(Ref("_c"), Ref("result")), modulus=Const(68924)),
        },
        goal=Ref("Q"),
    )
]

Answer: 55098

Answer: 42342

Answer: 16698

Answer: 19501

Answer: 16596

Answer: 2540

Answer: 741

Answer: 16598


Let $m = 144$. Let $P$ be the set of all ordered pairs $(x, y)$ of positive integers such that $xy = m$. For each such pair, compute $x + y$, and let $s$ be the minimum value of $x + y$ over all such pairs. Let $n$ be the largest prime number such that $2 \leq n \leq s$. Let $L_n$ denote the $n$th Lucas number, defined by $L_1 = 1$, $L_2 = 3$, and $L_k = L_{k-1} + L_{k-2}$ for $k \geq 3$. Compute the remainder when $62843 \cdot L_n$ is divided by $91788$.

Answer: 85249

graphs = [
    Graph(
        let={
            "_m": Const(144),
            "_n": Const(91788),
            "n": MaxOverSet(set=SolutionsSet(var=Var("n1"), condition=And(Geq(Var("n1"), Const(2)), Leq(Var("n1"), MinOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x"), Var("y")]), condition=And(IsPositive(arg=Var(name='x')), IsPositive(arg=Var(name='y')), Eq(Mul(Var("x"), Var("y")), Ref("_m")))), expr=Sum(Var("x"), Var("y"))))), IsPrime(Var("n1"))))),
            "result": Lucas(arg=Ref(name='n')),
            "_c": Const(62843),
            "Q": Mod(value=Mul(Ref("_c"), Ref("result")), modulus=Ref("_n")),
        },
        goal=Ref("Q"),
    )
]

Answer: 85249

Answer: 85249


Let $n$ be the number of positive integers $p$ for which there exists a positive integer $q$ such that $p < q$, $\gcd(p, q) = 1$, and $pq = 147476648205636750$. Let $d$ be the number of positive divisors of $n$. Compute the remainder when $44121d$ is divided by $95497$.

Answer: 66477

graphs = [
    Graph(
        let={
            "_n": Const(95497),
            "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=147476648205636750)), Eq(left=GCD(a=Var(name='p'), b=Var(name='q')), right=Const(value=1)), Lt(left=Var(name='p'), right=Var(name='q'))))))),
            "result": NumDivisors(n=Ref("n")),
            "Q": Mod(value=Mul(Const(44121), Ref("result")), modulus=Ref("_n")),
        },
        goal=Ref("Q"),
    )
]

Answer: 66477

Answer: 66477


Let $T$ be the number of integers $t$ between 15 and 36, inclusive, that can be written in the form $6a + 9b$ where $a$ is a positive integer at most 3 and $b$ is a positive integer at most 2. Let $n$ be the number of ordered pairs $(i, j)$ with $1 \leq i, j \leq 5$ such that $i + j = T$. Let $k$ be the number of ordered pairs $(x_1, x_2)$ of positive odd integers such that $x_1 + x_2 = 8$. Compute $k! \cdot S(n, k)$, where $S(n, k)$ is the Stirling number of the second kind.

Answer: 240

graphs = [
    Graph(
        let={
            "_m": Const(8),
            "_n": CountOverSet(set=SolutionsSet(var=Var("t"), condition=Exists(var=Var(name='a'), condition=Exists(var=Var(name='b'), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=3)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=2)), Geq(left=Var(name='t'), right=Const(value=15)), Leq(left=Var(name='t'), right=Const(value=36)), Eq(left=Var(name='t'), right=Sum(Mul(Const(value=6), Var(name='a')), Mul(Const(value=9), Var(name='b'))))))))),
            "n": CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("i"), Var("j")]), condition=Eq(Sum(Var("i"), Var("j")), Ref("_n")), domain=CartesianProduct(left=IntegerRange(start=Const(1), end=Const(5)), right=IntegerRange(start=Const(1), end=Const(5))))),
            "k": CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x1"), Var("x2")]), condition=And(IsPositive(arg=Var(name='x1')), IsPositive(arg=Var(name='x2')), IsOdd(arg=Var(name='x1')), IsOdd(arg=Var(name='x2')), Eq(Sum(Var("x1"), Var("x2")), Ref("_m"))))),
            "result": Mul(Factorial(Ref("k")), Stirling2(n=Ref(name='n'), k=Ref(name='k'))),
        },
        goal=Ref("result"),
    )
]

Answer: 240

Answer: 240

Answer: 240

Answer: 6

Answer: 6

Answer: 240

Answer: 240


Let $n$ be the number of ordered pairs $(x_1, x_2)$ of positive odd integers such that $x_1 + x_2 = 14$. Let $k = 6$. Define $c = 75563$ and let $Q = c \cdot k! \cdot S(n, k)$, where $S(n, k)$ denotes the Stirling number of the second kind. Find the remainder when $Q$ is divided by $57001$.

Answer: 41517

graphs = [
    Graph(
        let={
            "n": CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x1"), Var("x2")]), condition=And(IsPositive(arg=Var(name='x1')), IsPositive(arg=Var(name='x2')), IsOdd(arg=Var(name='x1')), IsOdd(arg=Var(name='x2')), Eq(Sum(Var("x1"), Var("x2")), Const(14))))),
            "k": Const(6),
            "result": Mul(Factorial(Ref("k")), Stirling2(n=Ref(name='n'), k=Ref(name='k'))),
            "_c": Const(75563),
            "Q": Mod(value=Mul(Ref("_c"), Ref("result")), modulus=Const(57001)),
        },
        goal=Ref("Q"),
    )
]

Answer: 41517

Answer: 41517

Answer: 41517

Answer: 41517

Answer: 29285

Answer: 29770

Answer: 39748

Answer: 0


Let $T$ be the number of ordered triples $(x_1, x_2, x_3)$ of positive odd integers such that $x_1 + x_2 + x_3 = 9$. Let $C_T$ denote the $T$-th Catalan number. Compute the remainder when $19909 \cdot C_T$ is divided by 53481.

Answer: 28352

graphs = [
    Graph(
        let={
            "_n": Const(53481),
            "n": CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x1"), Var("x2"), Var("x3")]), condition=And(IsPositive(arg=Var(name='x1')), IsPositive(arg=Var(name='x2')), IsPositive(arg=Var(name='x3')), IsOdd(arg=Var(name='x1')), IsOdd(arg=Var(name='x2')), IsOdd(arg=Var(name='x3')), Eq(Sum(Var("x1"), Var("x2"), Var("x3")), Const(9))))),
            "result": Catalan(Ref("n")),
            "Q": Mod(value=Mul(Const(19909), Ref("result")), modulus=Ref("_n")),
        },
        goal=Ref("Q"),
    )
]

Answer: 28352

Answer: 28352

Answer: 28352

Answer: 28352

Answer: 996

Answer: 29990

Answer: 44965

Answer: 53476


Let $n = 109$. Define a visible lattice point as an ordered pair of positive integers $(x, y)$ such that $1 \le x, y \le n$ and $\gcd(x, y) = 1$. Compute the number of visible lattice points.

Answer: 7351

graphs = [
    Graph(
        let={
            "n": Const(109),
            "result": VisibleLatticePoints(n=Ref(name='n')),
        },
        goal=Ref("result"),
    )
]

Answer: 7351

Answer: 7351

Answer: 7263

Answer: 7351

Answer: 3246

Answer: 108

Answer: 11664

Answer: 11881


Let $S$ be the set of all positive integers $t$ such that $11 \leq t \leq 8500$ and there exist positive integers $a$ and $b$ with $1 \leq a \leq 669$, $1 \leq b \leq 832$, and $t = 4a + 7b$. Let $N$ be the number of positive integers $n$ such that $1 \leq n \leq |S|$ and $n$ is divisible by both $6$ and $8$. Compute $N$.

Answer: 353

graphs = [
    Graph(
        let={
            "upper": CountOverSet(set=SolutionsSet(var=Var("t"), condition=Exists(var=Var(name='a'), condition=Exists(var=Var(name='b'), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=669)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=832)), Geq(left=Var(name='t'), right=Const(value=11)), Leq(left=Var(name='t'), right=Const(value=8500)), Eq(left=Var(name='t'), right=Sum(Mul(Const(value=4), Var(name='a')), Mul(Const(value=7), Var(name='b'))))))))),
            "d1": Const(6),
            "d2": Const(8),
            "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("d1")), Const(0)), Eq(Mod(value=Var("n"), modulus=Ref("d2")), Const(0))))),
        },
        goal=Ref("result"),
    )
]

Answer: 353

Answer: 353

Answer: 354

Answer: 64

Answer: 354


Let $m = 70245$. Let $n$ be the minimum value of $x + y$ over all ordered pairs of positive integers $(x, y)$ such that $xy = 5184$. Define $r = L_{19}$, the 19th Lucas number. Let $c$ be the sum of all solutions $x$ to the equation $x^2 - 25x + n = 0$. Find the remainder when $c - r$ is divided by $m$.

Answer: 60921

graphs = [
    Graph(
        let={
            "_m": Const(70245),
            "_n": MinOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x"), Var("y")]), condition=And(IsPositive(arg=Var(name='x')), IsPositive(arg=Var(name='y')), Eq(Mul(Var("x"), Var("y")), Const(5184)))), expr=Sum(Var("x"), Var("y")))),
            "n": Const(19),
            "result": Lucas(arg=Ref(name='n')),
            "_c": SumOverSet(set=SolutionsSet(var=Var("x"), condition=Eq(Sum(Pow(Var("x"), Const(2)), Mul(Const(-25), Var("x")), Ref("_n")), Const(0)))),
            "Q": Mod(value=Sub(Ref("_c"), Ref("result")), modulus=Ref("_m")),
        },
        goal=Ref("Q"),
    )
]

Answer: 60921

Answer: 60921

Answer: 66089


Let $n_0$ be the number of integers $t$ such that $13 \le t \le 59$ and there exist positive integers $a$ and $b$ with $1 \le a \le 4$, $1 \le b \le 8$, and $t = 6a + 4b + 3$. Let $n$ be the number of ordered pairs $(x_1, x_2)$ of positive odd integers such that $x_1 + x_2 = n_0$. Compute the $n$-th Catalan number.

Answer: 58786

graphs = [
    Graph(
        let={
            "_n": CountOverSet(set=SolutionsSet(var=Var("t"), condition=Exists(var=Var(name='a'), condition=Exists(var=Var(name='b'), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=4)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=8)), Geq(left=Var(name='t'), right=Const(value=13)), Leq(left=Var(name='t'), right=Const(value=59)), Eq(left=Var(name='t'), right=Sum(Mul(Const(value=6), Var(name='a')), Mul(Const(value=4), Var(name='b')), Const(value=3)))))))),
            "n": CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x1"), Var("x2")]), condition=And(IsPositive(arg=Var(name='x1')), IsPositive(arg=Var(name='x2')), IsOdd(arg=Var(name='x1')), IsOdd(arg=Var(name='x2')), Eq(Sum(Var("x1"), Var("x2")), Ref("_n"))))),
            "result": Catalan(Ref("n")),
        },
        goal=Ref("result"),
    )
]

Answer: 58786

Answer: 58786

Answer: 14

Answer: 1430

Answer: 132


Let $n = 200$. Define $r$ to be the number of visible lattice points $(x, y)$ with $1 \le x, y \le n$, where a point $(x, y)$ is visible if $\gcd(x, y) = 1$. Compute the remainder when $\sum_{k=1}^{r} \tau(k)$ is divided by $96886$, where $\tau(k)$ denotes the number of positive divisors of $k$.

Answer: 0

Answer: 57196

Answer: 54455

Answer: 54482

Answer: 0

Answer: 324

Answer: 29924

Answer: 464

Answer: 0

Answer: 13457


Answer: 51138

graphs = [
    Graph(
        let={
            "_n": Const(1152),
            "result": Mod(value=SumOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("a"), Var("b")]), condition=And(Geq(Var("a"), Const(1)), Leq(Var("a"), Const(202)), Geq(Var("b"), Const(1)), Leq(Var("b"), Const(202)))), expr=Sum(Mul(CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("a1"), Var("b1")]), condition=And(Geq(Var("a1"), Const(1)), Leq(Var("a1"), Const(15)), Geq(Var("b1"), Const(1)), Leq(Var("b1"), Const(15)), Leq(Var("a1"), Var("b1")), Eq(Sum(Mul(Const(32), Pow(Var("b1"), Const(2))), Mul(Const(32), Pow(Var("a1"), Const(2))), Mul(Const(-64), Var("a1"), Var("b1"))), Ref("_n"))))), Pow(Var("b"), Const(2))), Mul(Const(30), Var("a"), Var("b")), Mul(Const(50), Pow(Var("a"), Const(2)))))), modulus=Const(61463)),
        },
        goal=Ref("result"),
    )
]

Answer: 51138

Answer: 51138

Answer: 51138

Answer: 51138

Answer: 0

Answer: 81


Answer: 9160

graphs = [
    Graph(
        let={
            "p1": Mod(value=Sum(Mul(Const(2), Pow(Var("a"), Const(4))), Mul(Const(-2), Pow(Var("a"), Const(3))), Mul(Const(-5), Pow(Var("a"), Const(2))), Mul(Const(-2), Var("a")), Const(1)), modulus=Const(61)),
            "p2": Mod(value=Sum(Mul(Const(2), Pow(Ref("p1"), Const(4))), Mul(Const(-2), Pow(Ref("p1"), Const(3))), Mul(Const(-5), Pow(Ref("p1"), Const(2))), Mul(Const(-2), Ref("p1")), Const(1)), modulus=Const(61)),
            "p3": Mod(value=Sum(Mul(Const(2), Pow(Ref("p2"), Const(4))), Mul(Const(-2), Pow(Ref("p2"), Const(3))), Mul(Const(-5), Pow(Ref("p2"), Const(2))), Mul(Const(-2), Ref("p2")), Const(1)), modulus=Const(61)),
            "p4": Mod(value=Sum(Mul(Const(2), Pow(Ref("p3"), Const(4))), Mul(Const(-2), Pow(Ref("p3"), Const(3))), Mul(Const(-5), Pow(Ref("p3"), Const(2))), Mul(Const(-2), Ref("p3")), Const(1)), modulus=Const(61)),
            "p5": Mod(value=Sum(Mul(Const(2), Pow(Ref("p4"), Const(4))), Mul(Const(-2), Pow(Ref("p4"), Const(3))), Mul(Const(-5), Pow(Ref("p4"), Const(2))), Mul(Const(-2), Ref("p4")), Const(1)), modulus=Const(61)),
            "result": CountOverSet(set=SolutionsSet(var=Var("a"), condition=And(Geq(Var("a"), Const(0)), Leq(Var("a"), Const(111751)), Eq(Ref("p5"), Var("a")), Neq(Ref("p1"), Var("a")), Neq(Ref("p2"), Var("a")), Neq(Ref("p3"), Var("a")), Neq(Ref("p4"), Var("a"))))),
        },
        goal=Ref("result"),
    )
]

Answer: 9160

Answer: 9160

Answer: 109920

Answer: 56

Answer: 30

Answer: 0

Answer: 111751


Let $S$ be the set of all positive integers $x$ such that $x^2 - 3236x + 313600 = 0$. Let $n$ be the sum of all elements in $S$. Compute the value of $$
x = \sum_{d \mid n} \phi(d),$$ where $\phi$ denotes Euler's totient function.

Answer: 3236

graphs = [
    Graph(
        let={
            "_n": Const(2),
            "x": SumOverDivisors(n=SumOverSet(set=SolutionsSet(var=Var(name='x'), condition=Eq(left=Sum(Pow(base=Var(name='x'), exp=Ref(name='_n')), Mul(Const(value=-3236), Var(name='x')), Const(value=313600)), right=Const(value=0)))), var='d', expr=EulerPhi(n=Var(name='d'))),
        },
        goal=Ref("x"),
    )
]

Answer: 3236

Answer: 3236

Answer: 5130

Answer: 3243

Answer: 3236


Let $r$ be the value of $\frac{7}{49} \sum_{k=1}^7 \sum_{j=1}^7 \phi(k) \left\lfloor \frac{7}{k} \right\rfloor$, where $\phi$ denotes Euler's totient function. Let $N$ be the number of positive integers $n$ such that $n \le 84100$ and $n \equiv r \pmod{30}$. Compute the remainder when $45816 \cdot N$ is divided by 91801.

Answer: 84450

graphs = [
    Graph(
        let={
            "upper": Const(84100),
            "m": Const(30),
            "r": Div(Mul(Const(7), SumOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("k"), Var("_j")]), condition=Const(1), domain=CartesianProduct(left=IntegerRange(start=Const(1), end=Const(7)), right=IntegerRange(start=Const(1), end=Const(7)))), expr=Mul(EulerPhi(n=Var("k")), Floor(Div(Const(7), Var("k"))))))), Const(49)),
            "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"))))),
            "_c": Const(45816),
            "Q": Mod(value=Mul(Ref("_c"), Ref("result")), modulus=Const(91801)),
        },
        goal=Ref("Q"),
    )
]

Answer: 84450

Answer: 84450

Answer: 6557


Let $S$ be the set of all integers $n$ such that $1 \leq n \leq 110$ and $n \equiv \left\lfloor \frac{n}{2} \right\rfloor \pmod{5}$. Let $k$ be the number of elements in $S$. Compute the $k$-th Fibonacci number, where the Fibonacci sequence is defined by $F_1 = 1$, $F_2 = 1$, and $F_m = F_{m-1} + F_{m-2}$ for $m \geq 3$. Determine the value of this Fibonacci number.

Answer: 17711

graphs = [
    Graph(
        let={
            "_n": Const(110),
            "n": CountOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(1)), Leq(Var("n"), Ref("_n")), Congruent(a=Var(name='n'), b=Floor(arg=Div(left=Var(name='n'), right=Const(value=2))), modulus=Const(value=5))))),
            "result": Fibonacci(arg=Ref(name='n')),
        },
        goal=Ref("result"),
    )
]

Answer: 17711

Answer: 17711

Answer: 17711

Answer: 17711

Answer: 17711

Answer: 1134903170

Answer: 55

Answer: 17711

Answer: 17711


Let $C_n$ denote the $n$-th Catalan number, and let $n = \sum_{k=1}^{4} \varphi(k) \cdot \left\lfloor \frac{4}{k} \right\rfloor$. Let $T = C_n$. Define $u = \sum_{k=0}^{0} (-1)^k \binom{0}{k}$, $v = \sum_{k=0}^{8} (-1)^k \binom{8}{k}$, $a = (4 + v) \cdot u$, $K = a + 4$, and $s = \sum_{k=0}^{K} (-1)^k \binom{K}{k}$. Find the remainder when $14584 \cdot T$ is divided by $61991 + s$.

Answer: 26423

graphs = [
    Graph(
        let={
            "_n": Const(4),
            "n3": Const(8),
            "v": Summation(var="k", start=Const(0), end=Ref("n3"), expr=Mul(Pow(Const(-1), Var("k")), Binom(n=Ref("n3"), k=Var("k")))),
            "n2": Const(0),
            "u": Summation(var="k1", start=Const(0), end=Ref("n2"), expr=Mul(Pow(Const(-1), Var("k1")), Binom(n=Ref("n2"), k=Var("k1")))),
            "a": Mul(Sum(Const(4), Ref("v")), Ref("u")),
            "b": Const(4),
            "n1": Sum(Ref("a"), Ref("b")),
            "s": Summation(var="k2", start=Const(0), end=Ref("n1"), expr=Mul(Pow(Const(-1), Var("k2")), Binom(n=Ref("n1"), k=Var("k2")))),
            "n": Summation(var="k3", start=Const(1), end=Ref("_n"), expr=Mul(EulerPhi(n=Var("k3")), Floor(Div(Const(4), Var("k3"))))),
            "result": Catalan(Ref("n")),
            "_c": Const(14584),
            "Q": Mod(value=Mul(Ref("_c"), Ref("result")), modulus=Sum(Const(61991), Ref("s"))),
        },
        goal=Ref("Q"),
    )
]

Answer: 26423

Answer: 26423

Answer: 5912


Let $n$ be a positive integer such that $n \leq 75076$ and $n$ divides $75076$. Define $s(n)$ to be the sum of the positive divisors $a$ and $b$ such that $a \cdot b = 75076$. Let $s_{\min}$ be the minimum possible value of $s(n)$ over all such $n$. Now consider all integers $t$ for which there exist integers $a$ and $b$ satisfying:

- $1 \leq a \leq 9$,
- $1 \leq b \leq 2$,
- $23 \leq t \leq 46$,
- $t = 2a + 7b + 14$.

Let $d$ be the number of such integers $t$. Determine the number of positive integers $n$ such that $1 \leq n \leq s_{\min}$ and $d$ divides the $n$-th Fibonacci number, where the Fibonacci sequence is defined by $F_1 = 1$, $F_2 = 1$, and $F_k = F_{k-1} + F_{k-2}$ for $k \geq 3$.

Answer: 45

graphs = [
    Graph(
        let={
            "_n": Const(75076),
            "upper": MinOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x"), Var("y")]), condition=And(IsPositive(arg=Var(name='x')), IsPositive(arg=Var(name='y')), Eq(Mul(Var("x"), Var("y")), Ref("_n")))), expr=Sum(Var("x"), Var("y")))),
            "d": CountOverSet(set=SolutionsSet(var=Var("t"), condition=Exists(var=Var(name='a'), condition=Exists(var=Var(name='b'), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=9)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=2)), Geq(left=Var(name='t'), right=Const(value=23)), Leq(left=Var(name='t'), right=Const(value=46)), Eq(left=Var(name='t'), right=Sum(Mul(Const(value=2), Var(name='a')), Mul(Const(value=7), Var(name='b')), Const(value=14)))))))),
            "result": CountOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(1)), Leq(Var("n"), Ref("upper")), Divides(divisor=Ref("d"), dividend=Fibonacci(arg=Var(name='n')))))),
        },
        goal=Ref("result"),
    )
]

Answer: 45

Answer: 45


Let $a_k = (-1)^k \binom{9}{k}$ for $k = 0, 1, \dots, 9$, and let $s = \sum_{k=0}^{9} a_k$. Let $U$ be the set of all integers $n$ such that $1 \leq n \leq 19321$ and $n \equiv s \pmod{145}$. Let $r$ be the sum of all elements in $U$. Let $V$ be the set of all ordered pairs $(x, y)$ of positive integers such that $x + y = 160$, and let $c$ be the maximum value of $xy$ over all such pairs. Find the value of $(r^2 + 11r + c) \bmod{53517}$.

Answer: 44641

graphs = [
    Graph(
        let={
            "upper": Const(19321),
            "divisor": Const(145),
            "result": SumOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(1)), Leq(Var("n"), Ref("upper")), Eq(Mod(value=Var("n"), modulus=Ref("divisor")), Summation(var="k", start=Const(0), end=Const(9), expr=Mul(Pow(Const(-1), Var("k")), Binom(n=Const(9), k=Var("k")))))))),
            "_c": MaxOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("x"), Var("y")]), condition=And(IsPositive(arg=Var(name='x')), IsPositive(arg=Var(name='y')), Eq(Sum(Var("x"), Var("y")), Const(160)))), expr=Mul(Var("x"), Var("y")))),
            "Q": Mod(value=Sum(Pow(Ref("result"), Const(2)), Mul(Const(11), Ref("result")), Ref("_c")), modulus=Const(53517)),
        },
        goal=Ref("Q"),
    )
]

Answer: 44641

Answer: 44641

Answer: 117

Answer: 47189

Answer: 1469


Let $S$ be the set of all real solutions $x$ to the equation $x^2 - 246x - 17271 = 0$. Let $m$ be the sum of all elements in $S$. Define
$$
x = \sum_{k=1}^{m} \phi(k) \cdot \left\lfloor \frac{246}{k} \right\rfloor,
$$
where $\phi(k)$ is Euler's totient function. Let $Q$ be the remainder when $80050 \cdot x$ is divided by $92349$. Find the value of $Q$.

Answer: 80484

graphs = [
    Graph(
        let={
            "x": Summation(var="k", start=Const(1), end=SumOverSet(set=SolutionsSet(var=Var("x"), condition=Eq(Sum(Pow(Var("x"), Const(2)), Mul(Const(-246), Var("x")), Const(-17271)), Const(0)))), expr=Mul(EulerPhi(n=Var("k")), Floor(Div(Const(246), Var("k"))))),
            "_c": Const(80050),
            "Q": Mod(value=Mul(Ref("_c"), Ref("x")), modulus=Const(92349)),
        },
        goal=Ref("Q"),
    )
]

Answer: 80484

Answer: 80484

Answer: 246


Let $N$ be the number of ordered triples $(x_1,x_2,x_3)$ of positive integers such that each of $x_1,x_2,x_3$ is odd and
$$x_1+x_2+x_3=7.$$
Let $K=\binom{6}{N}$ and let
$$F=K!.$$
Let $C_{11}$ be the $11$th Catalan number, and let
$$S=\sum_{n=F}^{\lvert C_{11}\rvert} d(n),$$
where $d(n)$ denotes the number of positive divisors of $n$.
Let $Q$ be the remainder when $S$ is divided by $98639$.

Find the value of $Q$.

Answer: 0

Answer: 62818

Answer: 62776

Answer: 62816

Answer: 1999

Answer: 58786

Answer: 0

Answer: 35

Answer: 0

Answer: 62814

Answer: 0

Answer: 1


Let $A$ be twice the area of a triangle with vertices at $(0, 0)$, $(222, 0)$, and $(0, 111)$, adjusted by subtracting $49$ times the number of ordered pairs $(i, j)$ of positive integers such that $i + j = 112$, $1 \leq i \leq 111$, and $1 \leq j \leq 112$. Let $B$ be the sum of the greatest common divisors of the following pairs: $\left( \left| \text{number of lattice points in } [1,6] \times [1,37] \right|, 49 \right)$, $\left( \left| 111 - m \right|, \left| 111 - 49 \right| \right)$ where $m$ is the minimum value of $x+y$ over all pairs of positive integers $(x, y)$ such that $xy = 12321$, and $\left( 111, 111 \right)$. Compute $\frac{A + 2 - B}{2}$.

Answer: 9546

graphs = [
    Graph(
        let={
            "_c": Const(49),
            "_m": Const(49),
            "_n": Const(111),
            "area_2x": Abs(arg=Sum(Mul(Const(value=222), Const(value=111)), Mul(CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var(name='i'), Var(name='j')]), condition=Eq(left=Sum(Var(name='i'), Var(name='j')), right=Const(value=112)), domain=CartesianProduct(left=IntegerRange(start=Const(value=1), end=Const(value=111)), right=IntegerRange(start=Const(value=1), end=Const(value=112))))), Sub(left=Const(value=0), right=Ref(name='_c'))))),
            "boundary": Sum(GCD(a=Abs(arg=CountOverSet(set=CartesianProduct(left=IntegerRange(start=Const(value=1), end=Const(value=6)), right=IntegerRange(start=Const(value=1), end=Const(value=37))))), b=Abs(arg=Const(value=49))), GCD(a=Abs(arg=Sub(left=Const(value=111), right=MinOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var(name='x'), Var(name='y')]), condition=And(IsPositive(arg=Var(name='x')), IsPositive(arg=Var(name='y')), Eq(left=Mul(Var(name='x'), Var(name='y')), right=Const(value=12321)))), expr=Sum(Var(name='x'), Var(name='y')))))), b=Abs(arg=Sub(left=Const(value=111), right=Ref(name='_m')))), GCD(a=Abs(arg=Sub(left=Const(value=0), right=Ref(name='_n'))), b=Abs(arg=Sub(left=Const(value=0), right=Const(value=111))))),
            "result": Div(Sum(Ref("area_2x"), Const(2), Mul(Const(-1), Ref("boundary"))), Const(2)),
        },
        goal=Ref("result"),
    )
]

Answer: 9546

Answer: 9546

Answer: 9415

Answer: 9546


A factory must cut a rectangular metal sheet of area $20736$ square centimeters into smaller identical rectangular tiles, where the side lengths (in centimeters) are positive integers. Among all such rectangles, consider those whose length plus width is as small as possible; let this minimum perimeter half-sum be $m = x + y$ for some optimal dimensions $(x, y)$ with $xy = 20736$.

Separately, an engineer examines all integer pairs $(a_1, b_1)$ with $1 \le a_1 \le 15$, $1 \le b_1 \le 15$, and $a_1 \le b_1$ that satisfy
$$2a_1^{2} - 4a_1b_1 + 2b_1^{2} = m,$$
and calls the number of such pairs $C$.

Now she designs a component using two parameters $(a, b)$, where $1 \le a \le 26$ and $1 \le b \le 26$. The cost of a design $(a, b)$ is
$$b^{3} + 3ab^{2} + C a^{2}b.$$
Let $k$ be the smallest possible cost over all allowed $(a, b)$, and define $Q = \binom{16}{k}$. Compute $Q$.

Answer: 11440

Answer: 11440

Answer: 11440

Answer: 11440

Answer: 1


Let $T$ be the set of all positive integers $t$ such that $9 \leq t \leq 971$ and there exist positive integers $a$, $b$ with $1 \leq a \leq 14$, $1 \leq b \leq 183$, satisfying $t = 4a + 5b$.

Let $m$ be the number of positive integers $n$ such that $1 \leq n \leq |T|$ and the sum of the decimal digits of $n$ is divisible by 2.

Let $A$ be the set of integers $n_1$ such that $37249 < n_1 \leq 37734$ and $\gcd(n_1, m) = 1$. Let $r$ be the smallest element of $A$.

Compute the remainder when $44121 \cdot r$ is divided by 77975.

Answer: 72296

graphs = [
    Graph(
        let={
            "_m": Const(77975),
            "_n": Const(2),
            "start": Const(37249),
            "upper": Const(37734),
            "modulus": CountOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(1)), Leq(Var("n"), CountOverSet(set=SolutionsSet(var=Var("t"), condition=Exists(var=Var(name='a'), condition=Exists(var=Var(name='b'), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=14)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=183)), Geq(left=Var(name='t'), right=Const(value=9)), Leq(left=Var(name='t'), right=Const(value=971)), Eq(left=Var(name='t'), right=Sum(Mul(Const(value=4), Var(name='a')), Mul(Const(value=5), Var(name='b')))))))))), Eq(Mod(value=DigitSum(Var("n")), modulus=Ref("_n")), Const(0))))),
            "result": MinOverSet(set=SolutionsSet(var=Var("n1"), condition=And(Gt(Var("n1"), Ref("start")), Leq(Var("n1"), Ref("upper")), Eq(GCD(a=Var("n1"), b=Ref("modulus")), Const(1))))),
            "Q": Mod(value=Mul(Const(44121), Ref("result")), modulus=Ref("_m")),
        },
        goal=Ref("Q"),
    )
]

Answer: 72296

Answer: 72296


Answer: 0

graphs = [
    Graph(
        let={
            "_c": Const(2),
            "_m": Const(3),
            "_n": CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("a1"), Var("b1")]), condition=And(Geq(Var("a1"), Const(1)), Leq(Var("a1"), Const(40)), Geq(Var("b1"), Const(1)), Leq(Var("b1"), Const(40)), Eq(Sum(Mul(Const(-68), Var("a1"), Pow(Var("b1"), Const(3))), Mul(Const(17), Pow(Var("a1"), Const(4))), Mul(Const(17), Pow(Var("b1"), Const(4))), Mul(Const(-68), Pow(Var("a1"), Const(3)), Var("b1")), Mul(Const(102), Pow(Var("a1"), Const(2)), Pow(Var("b1"), Const(2)))), Const(4352))))),
            "a": Const(1),
            "b": Const(-2),
            "c": Const(7),
            "D": Sub(Pow(Ref("b"), Const(2)), Mul(CountOverSet(set=SolutionsSet(var=Tuple(elements=[Var("a2"), Var("b2")]), condition=And(Geq(Var("a2"), Const(1)), Leq(Var("a2"), Const(10)), Geq(Var("b2"), Const(1)), Leq(Var("b2"), Const(10)), Leq(Var("a2"), Var("b2")), Eq(Sum(Mul(MinOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("a3"), Var("b3")]), condition=And(Geq(Var("a3"), Const(1)), Leq(Var("a3"), Const(26)), Geq(Var("b3"), Const(1)), Leq(Var("b3"), Const(26)))), expr=Sum(Mul(Const(98), Pow(Var("b3"), Ref("_m"))), Mul(Const(-96), Var("a3"), Pow(Var("b3"), Const(2))), Mul(Const(24), Pow(Var("a3"), Ref("_c")), Var("b3"))))), Pow(Var("b2"), Const(2))), Mul(Const(-4), Var("a2"), Var("b2")), Mul(Const(2), Pow(Var("a2"), Const(2)))), Ref("_n"))))), Ref("a"), Ref("c"))),
            "result": Sum(Mul(Const(2), Iverson(condition=Gt(Ref("D"), Const(0)))), Iverson(condition=Eq(Ref("D"), Const(0)))),
        },
        goal=Ref("result"),
    )
]

Answer: 0

Answer: 0

Answer: 0

Answer: 0

Answer: 2

Answer: 1


Answer: 34670

graphs = [
    Graph(
        let={
            "_d": Const(3),
            "_m": Const(51493),
            "_n": Const(3),
            "result": Mod(value=Summation(var="k", start=Const(0), end=Const(931), expr=Sum(Mul(CountOverSet(set=SolutionsSet(var=Var("a"), condition=And(Geq(Var("a"), Const(0)), Leq(Var("a"), Const(72)), Eq(Mod(value=Sum(Mul(Const(3), Pow(Mod(value=Sum(Mul(Const(3), Pow(Mod(value=Sum(Mul(Const(3), Pow(Var("a"), Const(3))), Var("a"), Const(-3)), modulus=Const(73)), Const(3))), Mod(value=Sum(Mul(Const(3), Pow(Var("a"), Const(3))), Var("a"), Const(-3)), modulus=CountOverSet(set=SolutionsSet(var=Var("v"), condition=And(Geq(Var("v"), Const(128)), Leq(Var("v"), Const(15488)), Exists(var=Tuple(elements=[Var(name='a'), Var(name='b')]), condition=And(Geq(left=Var(name='a'), right=Const(value=1)), Leq(left=Var(name='a'), right=Const(value=11)), Geq(left=Var(name='b'), right=Const(value=1)), Leq(left=Var(name='b'), right=Const(value=11)), Eq(left=Sum(Mul(Const(value=18), Pow(base=Var(name='b'), exp=Const(value=2))), Mul(Const(value=50), Pow(base=Var(name='a'), exp=Const(value=2))), Mul(Const(value=60), Var(name='a'), Var(name='b'))), right=Var(name='v')))))))), Const(-3)), modulus=Const(73)), Const(3))), Mod(value=Sum(Mul(Const(3), Pow(Mod(value=Sum(Mul(Const(3), Pow(Var("a"), Const(3))), Var("a"), Const(-3)), modulus=Const(73)), Const(3))), Mod(value=Sum(Mul(Ref("_n"), Pow(Var("a"), Ref("_d"))), Var("a"), Const(-3)), modulus=Const(73)), Const(-3)), modulus=Const(73)), Const(-3)), modulus=Const(73)), Var("a")), Neq(Mod(value=Sum(Mul(Const(3), Pow(Var("a"), Const(3))), Var("a"), Const(-3)), modulus=Const(73)), Var("a")), Neq(Mod(value=Sum(Mul(Const(3), Pow(Mod(value=Sum(Mul(Const(3), Pow(Var("a"), Const(3))), Var("a"), Const(-3)), modulus=Const(73)), Const(3))), Mod(value=Sum(Mul(Const(3), Pow(Var("a"), Const(3))), Var("a"), Const(-3)), modulus=Const(73)), Const(-3)), modulus=Const(73)), Var("a"))))), Pow(Var("k"), MinOverSet(set=MapOverSet(set=SolutionsSet(var=Tuple(elements=[Var("a1"), Var("b")]), condition=And(Geq(Var("a1"), Const(1)), Leq(Var("a1"), Const(17)), Geq(Var("b"), Const(1)), Leq(Var("b"), Const(17)))), expr=Sum(Mul(Const(98), Pow(Var("b"), Const(3))), Mul(Const(24), Pow(Var("a1"), Const(2)), Var("b")), Mul(Const(-96), Var("a1"), Pow(Var("b"), Const(2)))))))), Mul(Const(3), Var("k")), Const(1))), modulus=Const(3304)),
            "_c": Const(94709),
            "Q": Mod(value=Mul(Ref("_c"), Ref("result")), modulus=Ref("_m")),
        },
        goal=Ref("Q"),
    )
]

Answer: 34670

Answer: 22378

Answer: 0

Answer: 2688

Answer: 947

Answer: 0

Answer: 0


Let $m=12$. Let $T$ be the set of all integers $n$ such that $1\le n\le 62220$ and $m$ divides the $n$th Fibonacci number $F_n$. Let $N$ be the number of elements in $T$.

Let $D$ be the set of all nonnegative integers $j$ such that $0\le j\le 5185$ and
\[\binom{N}{j} \equiv 1 \pmod{2}.\]
Let $d$ be the number of elements in $D$.

Let $U$ be the set of all integers $n$ such that $1\le n\le 16384$ and the number of positive divisors of $n$ is equal to $d$. Let $R$ be the number of elements in $U$.

Compute $R$.

Answer: 1421

graphs = [
    Graph(
        let={
            "_m": Const(12),
            "_n": CountOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(1)), Leq(Var("n"), Const(62220)), Divides(divisor=Ref("_m"), dividend=Fibonacci(arg=Var(name='n')))))),
            "upper": Const(16384),
            "div_count": CountOverSet(set=SolutionsSet(var=Var("j"), condition=And(Geq(Var("j"), Const(0)), Leq(Var("j"), Const(5185)), Eq(Mod(value=Binom(n=Ref("_n"), k=Var("j")), modulus=Const(2)), Const(1))), domain='nonnegative_integers')),
            "result": CountOverSet(set=SolutionsSet(var=Var("n"), condition=And(Geq(Var("n"), Const(1)), Leq(Var("n"), Ref("upper")), Eq(NumDivisors(n=Var("n")), Ref("div_count"))))),
        },
        goal=Ref("result"),
    )
]

Answer: 1421

Answer: 1503

Answer: 3

Answer: 39

Answer: 5186

Answer: 140

Answer: 512