math / data /definitions /train.jsonl
birgermoell's picture
Add files using upload-large-folder tool
7931c0c verified
Raw History Blame Contribute Delete
116 kB
{"id": "definitions-count-d1-t0000", "env": "definitions", "msc": "11", "family": "count", "difficulty": 1, "seed": 0, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that the decimal digits of \\(k\\) read the same forwards and backwards.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 9\\)\n- \\(f(17) = 10\\)\n- \\(f(24) = 11\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d1-t0000"}
{"id": "definitions-divisors-d1-t0001", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 1, "seed": 1, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of positive divisors \\(d\\) of \\(n\\) such that the decimal digits of \\(d\\) read the same forwards and backwards. Take \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 3\\)\n- \\(f(17) = 1\\)\n- \\(f(24) = 6\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d1-t0001"}
{"id": "definitions-extremum-d1-t0002", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 1, "seed": 2, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the smallest integer \\(k\\) with \\(k \\ge n\\) and \\(k \\ge 1\\) such that \\(k\\) leaves remainder 2 on division by 3.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 5\\)\n- \\(f(10) = 11\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 26\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d1-t0002"}
{"id": "definitions-pairs-d1-t0003", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 1, "seed": 3, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a \\cdot b = n\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 4\\)\n- \\(f(17) = 2\\)\n- \\(f(24) = 8\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d1-t0003"}
{"id": "definitions-sequence-d1-t0004", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 1, "seed": 4, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 3\\), \\(a(1) = 3\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(3\\,a(n+1) + 3\\,a(n)\\) on division by 101. Then \\(f(n) = a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 63\\)\n- \\(f(10) = 100\\)\n- \\(f(17) = 70\\)\n- \\(f(24) = 62\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d1-t0004"}
{"id": "definitions-sum-d1-t0005", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 1, "seed": 5, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is prime. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 5\\)\n- \\(f(10) = 17\\)\n- \\(f(17) = 58\\)\n- \\(f(24) = 100\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d1-t0005"}
{"id": "definitions-count-d2-t0006", "env": "definitions", "msc": "11", "family": "count", "difficulty": 2, "seed": 6, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that the decimal digits of \\(k\\) read the same forwards and backwards but it is not the case that \\(k\\) leaves remainder 8 on division by 9.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 8\\)\n- \\(f(17) = 9\\)\n- \\(f(24) = 10\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d2-t0006"}
{"id": "definitions-divisors-d2-t0007", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 2, "seed": 7, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of the values \\(\\tau(d)\\), where \\(\\tau(m)\\) is the number of positive divisors of \\(m\\), over all positive divisors \\(d\\) of \\(n\\) such that \\(d\\) is divisible by 4. An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 0\\)\n- \\(f(17) = 0\\)\n- \\(f(24) = 21\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d2-t0007"}
{"id": "definitions-extremum-d2-t0008", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 2, "seed": 8, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the largest integer \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is coprime to 30 or \\(k\\) is prime (or both). If there is no such \\(k\\), then \\(f(n) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 23\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d2-t0008"}
{"id": "definitions-pairs-d2-t0009", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 2, "seed": 9, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a \\cdot b\\) is a perfect square and \\(a \\le b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 14\\)\n- \\(f(17) = 25\\)\n- \\(f(24) = 36\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d2-t0009"}
{"id": "definitions-sequence-d2-t0010", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 2, "seed": 10, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 1\\), \\(a(1) = 3\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(3\\,a(n+1) + 4\\,a(n) + 1\\) on division by 10. Then \\(f(n) = a(0) + a(1) + \\dots + a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 13\\)\n- \\(f(10) = 46\\)\n- \\(f(17) = 76\\)\n- \\(f(24) = 105\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d2-t0010"}
{"id": "definitions-sum-d2-t0011", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 2, "seed": 11, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of the digit sums \\(s(k)\\), where \\(s(m)\\) is the sum of the decimal digits of \\(m\\), over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is prime. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 5\\)\n- \\(f(10) = 17\\)\n- \\(f(17) = 31\\)\n- \\(f(24) = 46\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d2-t0011"}
{"id": "definitions-count-d3-t0012", "env": "definitions", "msc": "11", "family": "count", "difficulty": 3, "seed": 12, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that the sum of the decimal digits of \\(k\\) leaves remainder 1 on division by 4 and \\(k\\) is coprime to \\(n\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 2\\)\n- \\(f(17) = 5\\)\n- \\(f(24) = 3\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d3-t0012"}
{"id": "definitions-divisors-d3-t0013", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 3, "seed": 13, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of the values \\(\\tau(d)\\), where \\(\\tau(m)\\) is the number of positive divisors of \\(m\\), over all positive divisors \\(d\\) of \\(n\\) such that \\(d\\) is divisible by 2 but it is not the case that \\(d\\) is a perfect square. An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 6\\)\n- \\(f(17) = 0\\)\n- \\(f(24) = 24\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d3-t0013"}
{"id": "definitions-extremum-d3-t0014", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 3, "seed": 14, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the smallest integer \\(k\\) with \\(k > n\\) and \\(k \\ge 1\\) such that \\(k\\) is divisible by 7 or \\(k\\) is divisible by 6 (or both).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 6\\)\n- \\(f(10) = 12\\)\n- \\(f(17) = 18\\)\n- \\(f(24) = 28\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d3-t0014"}
{"id": "definitions-pairs-d3-t0015", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 3, "seed": 15, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a\\) divides \\(b\\), \\(a + b\\) is prime and \\(a \\le b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 5\\)\n- \\(f(17) = 7\\)\n- \\(f(24) = 9\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d3-t0015"}
{"id": "definitions-sequence-d3-t0016", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 3, "seed": 16, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 3\\), \\(a(1) = 3\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(\\,a(n+1) + \\,a(n) + 3\\) on division by 7. Then \\(f(n)\\) is the number of indices \\(i\\) with \\(0 \\le i < n\\) such that \\(a(i) < a(i+1)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 4\\)\n- \\(f(17) = 7\\)\n- \\(f(24) = 10\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d3-t0016"}
{"id": "definitions-sum-d3-t0017", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 3, "seed": 17, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is coprime to \\(n\\) or \\(k\\) is divisible by 4 (or both). An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 32\\)\n- \\(f(17) = 136\\)\n- \\(f(24) = 180\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d3-t0017"}
{"id": "definitions-count-d1-t0018", "env": "definitions", "msc": "11", "family": "count", "difficulty": 1, "seed": 18, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) leaves remainder 2 on division by 3.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 3\\)\n- \\(f(17) = 6\\)\n- \\(f(24) = 8\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d1-t0018"}
{"id": "definitions-divisors-d1-t0019", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 1, "seed": 19, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of positive divisors \\(d\\) of \\(n\\) such that \\(d\\) is coprime to 21. Take \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 4\\)\n- \\(f(17) = 2\\)\n- \\(f(24) = 4\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d1-t0019"}
{"id": "definitions-extremum-d1-t0020", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 1, "seed": 20, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the largest integer \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) leaves remainder 5 on division by 7. If there is no such \\(k\\), then \\(f(n) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 5\\)\n- \\(f(17) = 12\\)\n- \\(f(24) = 19\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d1-t0020"}
{"id": "definitions-pairs-d1-t0021", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 1, "seed": 21, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a + b\\) is divisible by 5.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 20\\)\n- \\(f(17) = 57\\)\n- \\(f(24) = 116\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d1-t0021"}
{"id": "definitions-sequence-d1-t0022", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 1, "seed": 22, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 0\\), \\(a(1) = 3\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(3\\,a(n+1) + \\,a(n)\\) on division by 100. Then \\(f(n) = a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 30\\)\n- \\(f(10) = 11\\)\n- \\(f(17) = 87\\)\n- \\(f(24) = 80\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d1-t0022"}
{"id": "definitions-sum-d1-t0023", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 1, "seed": 23, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is coprime to 6. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 13\\)\n- \\(f(17) = 54\\)\n- \\(f(24) = 96\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d1-t0023"}
{"id": "definitions-count-d2-t0024", "env": "definitions", "msc": "11", "family": "count", "difficulty": 2, "seed": 24, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) leaves remainder 1 on division by 4 or \\(k\\) is squarefree (no square larger than 1 divides it) (or both).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 8\\)\n- \\(f(17) = 13\\)\n- \\(f(24) = 17\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d2-t0024"}
{"id": "definitions-divisors-d2-t0025", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 2, "seed": 25, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(d\\) over all positive divisors \\(d\\) of \\(n\\) such that the sum of the decimal digits of \\(d\\) leaves remainder 0 on division by 3. An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 0\\)\n- \\(f(17) = 0\\)\n- \\(f(24) = 45\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d2-t0025"}
{"id": "definitions-extremum-d2-t0026", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 2, "seed": 26, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the largest integer \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is prime but it is not the case that the decimal digits of \\(k\\) read the same forwards and backwards. If there is no such \\(k\\), then \\(f(n) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 0\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 23\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d2-t0026"}
{"id": "definitions-pairs-d2-t0027", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 2, "seed": 27, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a + b\\) is divisible by 3 and \\(a \\le b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 18\\)\n- \\(f(17) = 51\\)\n- \\(f(24) = 100\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d2-t0027"}
{"id": "definitions-sequence-d2-t0028", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 2, "seed": 28, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 4\\), \\(a(1) = 1\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(\\,a(n+1) + \\,a(n)\\) on division by 101. Then \\(f(n) = a(0) + a(1) + \\dots + a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 16\\)\n- \\(f(10) = 297\\)\n- \\(f(17) = 780\\)\n- \\(f(24) = 1130\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d2-t0028"}
{"id": "definitions-sum-d2-t0029", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 2, "seed": 29, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k^2\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) leaves remainder 3 on division by 7. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 9\\)\n- \\(f(10) = 109\\)\n- \\(f(17) = 398\\)\n- \\(f(24) = 974\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d2-t0029"}
{"id": "definitions-count-d3-t0030", "env": "definitions", "msc": "11", "family": "count", "difficulty": 3, "seed": 30, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is coprime to \\(n\\) but it is not the case that \\(k\\) is a perfect square.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 2\\)\n- \\(f(17) = 12\\)\n- \\(f(24) = 7\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d3-t0030"}
{"id": "definitions-divisors-d3-t0031", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 3, "seed": 31, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(d\\) over all positive divisors \\(d\\) of \\(n\\) such that the sum of the decimal digits of \\(d\\) leaves remainder 2 on division by 3 but it is not the case that \\(d\\) is a perfect square. An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 10\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d3-t0031"}
{"id": "definitions-extremum-d3-t0032", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 3, "seed": 32, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the smallest integer \\(k\\) with \\(k > n\\) and \\(k \\ge 1\\) such that \\(k\\) is divisible by 4 or \\(k\\) is coprime to 15 (or both).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 4\\)\n- \\(f(10) = 11\\)\n- \\(f(17) = 19\\)\n- \\(f(24) = 26\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d3-t0032"}
{"id": "definitions-pairs-d3-t0033", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 3, "seed": 33, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a\\) divides \\(b\\), \\(a + b\\) is divisible by 5 and \\(a < b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 4\\)\n- \\(f(17) = 8\\)\n- \\(f(24) = 14\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d3-t0033"}
{"id": "definitions-sequence-d3-t0034", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 3, "seed": 34, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 0\\), \\(a(1) = 3\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(4\\,a(n+1) + 4\\,a(n)\\) on division by 17. Then \\(f(n)\\) is the number of indices \\(i\\) with \\(0 \\le i < n\\) such that \\(a(i) < a(i+1)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 5\\)\n- \\(f(17) = 9\\)\n- \\(f(24) = 12\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d3-t0034"}
{"id": "definitions-sum-d3-t0035", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 3, "seed": 35, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of the digit sums \\(s(k)\\), where \\(s(m)\\) is the sum of the decimal digits of \\(m\\), over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is prime and \\(k\\) is squarefree (no square larger than 1 divides it). An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 5\\)\n- \\(f(10) = 17\\)\n- \\(f(17) = 31\\)\n- \\(f(24) = 46\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d3-t0035"}
{"id": "definitions-count-d1-t0036", "env": "definitions", "msc": "11", "family": "count", "difficulty": 1, "seed": 36, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is squarefree (no square larger than 1 divides it).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 12\\)\n- \\(f(24) = 16\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d1-t0036"}
{"id": "definitions-divisors-d1-t0037", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 1, "seed": 37, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of positive divisors \\(d\\) of \\(n\\) such that the decimal digits of \\(d\\) read the same forwards and backwards. Take \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 3\\)\n- \\(f(17) = 1\\)\n- \\(f(24) = 6\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d1-t0037"}
{"id": "definitions-extremum-d1-t0038", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 1, "seed": 38, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the smallest integer \\(k\\) with \\(k \\ge n\\) and \\(k \\ge 1\\) such that \\(k\\) is coprime to 10.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 11\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 27\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d1-t0038"}
{"id": "definitions-pairs-d1-t0039", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 1, "seed": 39, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(\\gcd(a, b) = 2\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 19\\)\n- \\(f(17) = 43\\)\n- \\(f(24) = 91\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d1-t0039"}
{"id": "definitions-sequence-d1-t0040", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 1, "seed": 40, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 1\\), \\(a(1) = 5\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(2\\,a(n+1) + 3\\,a(n)\\) on division by 100. Then \\(f(n) = a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 41\\)\n- \\(f(10) = 73\\)\n- \\(f(17) = 45\\)\n- \\(f(24) = 21\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d1-t0040"}
{"id": "definitions-sum-d1-t0041", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 1, "seed": 41, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is a perfect square. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 14\\)\n- \\(f(17) = 30\\)\n- \\(f(24) = 30\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d1-t0041"}
{"id": "definitions-count-d2-t0042", "env": "definitions", "msc": "11", "family": "count", "difficulty": 2, "seed": 42, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is prime or \\(k\\) is a perfect square (or both).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 11\\)\n- \\(f(24) = 13\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d2-t0042"}
{"id": "definitions-divisors-d2-t0043", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 2, "seed": 43, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(d\\) over all positive divisors \\(d\\) of \\(n\\) such that \\(d\\) is divisible by 6. An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 0\\)\n- \\(f(17) = 0\\)\n- \\(f(24) = 42\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d2-t0043"}
{"id": "definitions-extremum-d2-t0044", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 2, "seed": 44, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the smallest integer \\(k\\) with \\(k \\ge n\\) and \\(k \\ge 1\\) such that \\(k\\) is coprime to 21 or \\(k\\) is divisible by 5 (or both).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 4\\)\n- \\(f(10) = 10\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 25\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d2-t0044"}
{"id": "definitions-pairs-d2-t0045", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 2, "seed": 45, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a\\) divides \\(b\\) and \\(a < b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 17\\)\n- \\(f(17) = 35\\)\n- \\(f(24) = 60\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d2-t0045"}
{"id": "definitions-sequence-d2-t0046", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 2, "seed": 46, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 3\\), \\(a(1) = 5\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(3\\,a(n+1) + 2\\,a(n) + 2\\) on division by 17. Then \\(f(n) = a(0) + a(1) + \\dots + a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 27\\)\n- \\(f(10) = 60\\)\n- \\(f(17) = 114\\)\n- \\(f(24) = 181\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d2-t0046"}
{"id": "definitions-sum-d2-t0047", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 2, "seed": 47, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of the values \\(\\tau(k)\\), where \\(\\tau(m)\\) is the number of positive divisors of \\(m\\), over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that the sum of the decimal digits of \\(k\\) leaves remainder 3 on division by 4. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 4\\)\n- \\(f(17) = 15\\)\n- \\(f(24) = 19\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d2-t0047"}
{"id": "definitions-count-d3-t0048", "env": "definitions", "msc": "11", "family": "count", "difficulty": 3, "seed": 48, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is coprime to \\(n\\) and the sum of the decimal digits of \\(k\\) leaves remainder 0 on division by 3.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 2\\)\n- \\(f(17) = 5\\)\n- \\(f(24) = 0\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d3-t0048"}
{"id": "definitions-divisors-d3-t0049", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 3, "seed": 49, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(d^2\\) over all positive divisors \\(d\\) of \\(n\\) such that \\(d\\) is a perfect square but it is not the case that \\(d\\) is prime. An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 1\\)\n- \\(f(17) = 1\\)\n- \\(f(24) = 17\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d3-t0049"}
{"id": "definitions-extremum-d3-t0050", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 3, "seed": 50, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the largest integer \\(k\\) with \\(1 \\le k \\le n\\) such that the decimal digits of \\(k\\) read the same forwards and backwards but it is not the case that \\(k\\) is prime. If there is no such \\(k\\), then \\(f(n) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 9\\)\n- \\(f(17) = 9\\)\n- \\(f(24) = 22\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d3-t0050"}
{"id": "definitions-pairs-d3-t0051", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 3, "seed": 51, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a \\cdot b\\) is a perfect square, \\(a + b\\) is divisible by 4 and \\(a \\le b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 5\\)\n- \\(f(17) = 9\\)\n- \\(f(24) = 14\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d3-t0051"}
{"id": "definitions-sequence-d3-t0052", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 3, "seed": 52, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 4\\), \\(a(1) = 2\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(4\\,a(n+1) + 3\\,a(n) + 1\\) on division by 7. Then \\(f(n)\\) is the number of indices \\(i\\) with \\(0 \\le i < n\\) such that \\(a(i) < a(i+1)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 0\\)\n- \\(f(10) = 4\\)\n- \\(f(17) = 7\\)\n- \\(f(24) = 9\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d3-t0052"}
{"id": "definitions-sum-d3-t0053", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 3, "seed": 53, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k^2\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is divisible by 2 but it is not the case that \\(k\\) is coprime to 10. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 4\\)\n- \\(f(10) = 220\\)\n- \\(f(17) = 816\\)\n- \\(f(24) = 2600\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d3-t0053"}
{"id": "definitions-count-d1-t0054", "env": "definitions", "msc": "11", "family": "count", "difficulty": 1, "seed": 54, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is squarefree (no square larger than 1 divides it).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 12\\)\n- \\(f(24) = 16\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d1-t0054"}
{"id": "definitions-divisors-d1-t0055", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 1, "seed": 55, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of positive divisors \\(d\\) of \\(n\\) such that the decimal digits of \\(d\\) read the same forwards and backwards. Take \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 3\\)\n- \\(f(17) = 1\\)\n- \\(f(24) = 6\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d1-t0055"}
{"id": "definitions-extremum-d1-t0056", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 1, "seed": 56, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the largest integer \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is a perfect square. If there is no such \\(k\\), then \\(f(n) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 9\\)\n- \\(f(17) = 16\\)\n- \\(f(24) = 16\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d1-t0056"}
{"id": "definitions-pairs-d1-t0057", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 1, "seed": 57, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a + b\\) is prime.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 5\\)\n- \\(f(10) = 37\\)\n- \\(f(17) = 89\\)\n- \\(f(24) = 157\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d1-t0057"}
{"id": "definitions-sequence-d1-t0058", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 1, "seed": 58, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 0\\), \\(a(1) = 5\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(\\,a(n+1) + 3\\,a(n)\\) on division by 11. Then \\(f(n) = a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 9\\)\n- \\(f(10) = 9\\)\n- \\(f(17) = 1\\)\n- \\(f(24) = 0\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d1-t0058"}
{"id": "definitions-sum-d1-t0059", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 1, "seed": 59, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is squarefree (no square larger than 1 divides it). An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 6\\)\n- \\(f(10) = 34\\)\n- \\(f(17) = 104\\)\n- \\(f(24) = 189\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d1-t0059"}
{"id": "definitions-count-d2-t0060", "env": "definitions", "msc": "11", "family": "count", "difficulty": 2, "seed": 60, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is a perfect square but it is not the case that \\(k\\) is prime.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 3\\)\n- \\(f(17) = 4\\)\n- \\(f(24) = 4\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d2-t0060"}
{"id": "definitions-divisors-d2-t0061", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 2, "seed": 61, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(d\\) over all positive divisors \\(d\\) of \\(n\\) such that \\(d\\) is coprime to 14. An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 4\\)\n- \\(f(10) = 6\\)\n- \\(f(17) = 18\\)\n- \\(f(24) = 4\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d2-t0061"}
{"id": "definitions-extremum-d2-t0062", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 2, "seed": 62, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the largest integer \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is prime but it is not the case that \\(k\\) leaves remainder 3 on division by 5. If there is no such \\(k\\), then \\(f(n) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 19\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d2-t0062"}
{"id": "definitions-pairs-d2-t0063", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 2, "seed": 63, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(\\gcd(a, b) = 1\\) and \\(a \\le b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 4\\)\n- \\(f(10) = 32\\)\n- \\(f(17) = 96\\)\n- \\(f(24) = 180\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d2-t0063"}
{"id": "definitions-sequence-d2-t0064", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 2, "seed": 64, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 3\\), \\(a(1) = 1\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(4\\,a(n+1) + 3\\,a(n) + 2\\) on division by 100. Then \\(f(n) = a(0) + a(1) + \\dots + a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 84\\)\n- \\(f(10) = 383\\)\n- \\(f(17) = 620\\)\n- \\(f(24) = 1015\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d2-t0064"}
{"id": "definitions-sum-d2-t0065", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 2, "seed": 65, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k^2\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is squarefree (no square larger than 1 divides it). An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 14\\)\n- \\(f(10) = 224\\)\n- \\(f(17) = 1224\\)\n- \\(f(24) = 3039\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d2-t0065"}
{"id": "definitions-count-d3-t0066", "env": "definitions", "msc": "11", "family": "count", "difficulty": 3, "seed": 66, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that the decimal digits of \\(k\\) read the same forwards and backwards but it is not the case that \\(k\\) leaves remainder 1 on division by 5.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 7\\)\n- \\(f(24) = 8\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d3-t0066"}
{"id": "definitions-divisors-d3-t0067", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 3, "seed": 67, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of the values \\(\\tau(d)\\), where \\(\\tau(m)\\) is the number of positive divisors of \\(m\\), over all positive divisors \\(d\\) of \\(n\\) such that \\(d\\) is coprime to 21 or \\(d\\) is divisible by 5 (or both). An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 9\\)\n- \\(f(17) = 3\\)\n- \\(f(24) = 10\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d3-t0067"}
{"id": "definitions-extremum-d3-t0068", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 3, "seed": 68, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the smallest integer \\(k\\) with \\(k > n\\) and \\(k \\ge 1\\) such that \\(k\\) is coprime to 6 or \\(k\\) is divisible by 6 (or both).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 5\\)\n- \\(f(10) = 11\\)\n- \\(f(17) = 18\\)\n- \\(f(24) = 25\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d3-t0068"}
{"id": "definitions-pairs-d3-t0069", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 3, "seed": 69, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(\\gcd(a, b) = 2\\), \\(a\\) divides \\(b\\) and \\(a \\le b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 5\\)\n- \\(f(17) = 8\\)\n- \\(f(24) = 12\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d3-t0069"}
{"id": "definitions-sequence-d3-t0070", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 3, "seed": 70, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 0\\), \\(a(1) = 2\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(3\\,a(n+1) + 3\\,a(n)\\) on division by 10. Then \\(f(n)\\) is the number of indices \\(i\\) with \\(0 \\le i < n\\) such that \\(a(i) < a(i+1)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 6\\)\n- \\(f(17) = 9\\)\n- \\(f(24) = 12\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d3-t0070"}
{"id": "definitions-sum-d3-t0071", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 3, "seed": 71, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k^2\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) divides \\(n\\) but it is not the case that \\(k\\) is prime. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 101\\)\n- \\(f(17) = 1\\)\n- \\(f(24) = 837\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d3-t0071"}
{"id": "definitions-count-d1-t0072", "env": "definitions", "msc": "11", "family": "count", "difficulty": 1, "seed": 72, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is squarefree (no square larger than 1 divides it).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 12\\)\n- \\(f(24) = 16\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d1-t0072"}
{"id": "definitions-divisors-d1-t0073", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 1, "seed": 73, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of positive divisors \\(d\\) of \\(n\\) such that the decimal digits of \\(d\\) read the same forwards and backwards. Take \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 3\\)\n- \\(f(17) = 1\\)\n- \\(f(24) = 6\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d1-t0073"}
{"id": "definitions-extremum-d1-t0074", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 1, "seed": 74, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the largest integer \\(k\\) with \\(1 \\le k \\le n\\) such that the sum of the decimal digits of \\(k\\) leaves remainder 2 on division by 3. If there is no such \\(k\\), then \\(f(n) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 2\\)\n- \\(f(10) = 8\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 23\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d1-t0074"}
{"id": "definitions-pairs-d1-t0075", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 1, "seed": 75, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a + b\\) is divisible by 3.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 33\\)\n- \\(f(17) = 97\\)\n- \\(f(24) = 192\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d1-t0075"}
{"id": "definitions-sequence-d1-t0076", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 1, "seed": 76, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 0\\), \\(a(1) = 1\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(2\\,a(n+1) + 3\\,a(n)\\) on division by 100. Then \\(f(n) = a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 7\\)\n- \\(f(10) = 62\\)\n- \\(f(17) = 41\\)\n- \\(f(24) = 20\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d1-t0076"}
{"id": "definitions-sum-d1-t0077", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 1, "seed": 77, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is coprime to 6. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 13\\)\n- \\(f(17) = 54\\)\n- \\(f(24) = 96\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d1-t0077"}
{"id": "definitions-count-d2-t0078", "env": "definitions", "msc": "11", "family": "count", "difficulty": 2, "seed": 78, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is coprime to 15 or \\(k\\) is squarefree (no square larger than 1 divides it) (or both).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 9\\)\n- \\(f(17) = 15\\)\n- \\(f(24) = 19\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-count-d2-t0078"}
{"id": "definitions-divisors-d2-t0079", "env": "definitions", "msc": "11", "family": "divisors", "difficulty": 2, "seed": 79, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(d^2\\) over all positive divisors \\(d\\) of \\(n\\) such that the decimal digits of \\(d\\) read the same forwards and backwards. An empty sum is 0, and \\(f(0) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 10\\)\n- \\(f(10) = 30\\)\n- \\(f(17) = 1\\)\n- \\(f(24) = 130\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-divisors-d2-t0079"}
{"id": "definitions-extremum-d2-t0080", "env": "definitions", "msc": "11", "family": "extremum", "difficulty": 2, "seed": 80, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the largest integer \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) is coprime to 30 but it is not the case that \\(k\\) leaves remainder 3 on division by 5. If there is no such \\(k\\), then \\(f(n) = 0\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 1\\)\n- \\(f(10) = 7\\)\n- \\(f(17) = 17\\)\n- \\(f(24) = 19\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-extremum-d2-t0080"}
{"id": "definitions-pairs-d2-t0081", "env": "definitions", "msc": "11", "family": "pairs", "difficulty": 2, "seed": 81, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the number of ordered pairs \\((a, b)\\) of integers with \\(1 \\le a \\le n\\) and \\(1 \\le b \\le n\\) such that \\(a + b\\) is prime and \\(a \\le b\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 3\\)\n- \\(f(10) = 19\\)\n- \\(f(17) = 45\\)\n- \\(f(24) = 79\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-pairs-d2-t0081"}
{"id": "definitions-sequence-d2-t0082", "env": "definitions", "msc": "11", "family": "sequence", "difficulty": 2, "seed": 82, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\nLet \\(a(0) = 4\\), \\(a(1) = 4\\) and, for \\(n \\ge 0\\), let \\(a(n+2)\\) be the remainder of \\(\\,a(n+1) + \\,a(n) + 2\\) on division by 7. Then \\(f(n) = a(0) + a(1) + \\dots + a(n)\\).\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 13\\)\n- \\(f(10) = 40\\)\n- \\(f(17) = 67\\)\n- \\(f(24) = 93\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sequence-d2-t0082"}
{"id": "definitions-sum-d2-t0083", "env": "definitions", "msc": "11", "family": "sum", "difficulty": 2, "seed": 83, "kind": "define", "instruction": "# Define a function from its description\n\nDefine the function \\(f\\) from the natural numbers (including 0) to the natural numbers as follows.\n\n\\(f(n)\\) is the sum of \\(k^2\\) over all integers \\(k\\) with \\(1 \\le k \\le n\\) such that \\(k\\) leaves remainder 3 on division by 4. An empty sum is 0.\n\n## What to do\n\n`Solution.lean` in the working directory declares `f` with `sorry` as its body. Replace each `sorry` with a definition that matches the description above.\n\n- Keep the name and the type exactly as given. You may add helper definitions.\n- The definition must be computable: it is checked by running it on hidden inputs, so do not use `noncomputable` or classical choice.\n- Check that the file compiles with `lake env lean Solution.lean` (run it inside `/opt/arena/lean`, giving the full path to the file), and test your definition with `#eval`.\n- The reward is 1 if the definition agrees with the description on every hidden input, and 0 otherwise.\n\n## Examples\n\n- \\(f(3) = 9\\)\n- \\(f(10) = 58\\)\n- \\(f(17) = 404\\)\n- \\(f(24) = 1294\\)\n", "start_file": "import Mathlib\n\ndef f (n : ℕ) : ℕ := sorry\n", "path": "tasks/definitions/definitions-sum-d2-t0083"}