diff --git "a/all/deepmind_mathematics_numbertheory.json" "b/all/deepmind_mathematics_numbertheory.json" new file mode 100644--- /dev/null +++ "b/all/deepmind_mathematics_numbertheory.json" @@ -0,0 +1,10355 @@ +{ + "Source": [ + "mathematics" + ], + "Categories": [ + { + "Math complexity": 4, + "Language complexity": 7, + "Domain knowledge complexity": 3 + } + ], + "Instances": [ + { + "Input": "What is the hundred thousands digit of 2118916372?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2118916372))[4])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Suppose -4*f + 3089 = 9*z - 8*z, 3094 = z + 3*f. List the prime factors of z.", + "Output Program": [ + "from sympy import *\nz, f = symbols(\"z f\")\nz = solve([Eq(-4*f + 3089, 9*z - 8*z), Eq(3094, z + 3*f)])[z]\nprint(primefactors(3109))" + ], + "Output Answer": [ + "[3109]" + ], + "split": "train" + }, + { + "Input": "Suppose -10*l + 3*l + 623 = 0. Is l a prime number?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\nl = solve([Eq(-10*l + 3*l + 623, 0)])[l]\nprint(isprime(89))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose 2*s + 221*p - 298779 = 216*p, 4 = 4*p. Is s composite?", + "Output Program": [ + "from sympy import *\ns, p = symbols(\"s p\")\ns = solve([Eq(2*s + 221*p - 298779, 216*p), Eq(4, 4*p)])[s]\nprint(not isprime(149387))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 417854?", + "Output Program": [ + "from sympy import *\nprint(primefactors(417854))" + ], + "Output Answer": [ + "[2, 208927]" + ], + "split": "train" + }, + { + "Input": "Is 326493353 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(326493353))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let w(f) = f**2 - 20. Let o be w(6). Let n be 0/(-13) - (-2 - 1). Suppose n*i = 9, 0 = q - i - 0*i - 45. Calculate the greatest common divisor of o and q.", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\ndef w(f):\n\treturn f**2 - 20\no = w(6)\nn = 0/(-13) - (-2 - 1)\nq, i = symbols(\"q i\")\nq = solve([Eq(n*i, 9), Eq(0, q - i - 0*i - 45)])[q]\nprint(gcd(o, q))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Let t(o) = 37*o + 67. Let a(j) = -18*j - 33. Let f(k) = 5*a(k) + 2*t(k). What are the prime factors of f(-7)?", + "Output Program": [ + "from sympy import *\no = symbols(\"o\")\ndef t(o):\n\treturn 37*o + 67\nj = symbols(\"j\")\ndef a(j):\n\treturn -18*j - 33\ndef f(k):\n\treturn 5*a(k) + 2*t(k)\nd = f(-7)\nprint(primefactors(81))" + ], + "Output Answer": [ + "[3]" + ], + "split": "train" + }, + { + "Input": "Let y = -7 - -23. Let c(w) = w**2 + w + 2. Let v = 1 - -5. Calculate the remainder when c(v) is divided by y.", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef c(w):\n\treturn w**2 + w + 2\nv = 1 - -5\na = c(v)\ny = -7 - -23\nprint(a % y)" + ], + "Output Answer": [ + "12" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 110.", + "Output Program": [ + "from sympy import *\nprint(primefactors(110))" + ], + "Output Answer": [ + "[2, 5, 11]" + ], + "split": "train" + }, + { + "Input": "What is the greatest common factor of 152 and 209?", + "Output Program": [ + "from sympy import *\nprint(gcd(152, 209))" + ], + "Output Answer": [ + "19" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 2003666?", + "Output Program": [ + "from sympy import *\nprint(primefactors(2003666))" + ], + "Output Answer": [ + "[2, 7, 167, 857]" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 111476?", + "Output Program": [ + "from sympy import *\nprint(primefactors(111476))" + ], + "Output Answer": [ + "[2, 29, 31]" + ], + "split": "train" + }, + { + "Input": "Let g(x) = 43251*x + 2063. Is g(30) composite?", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\ndef g(x):\n\treturn 43251*x + 2063\nz = g(30)\nprint(not isprime(1299593))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let v = 32 - 40. Let c(f) = 4 - f. Let k be c(v). Calculate the remainder when 76 is divided by 2/((-2)/3) + (k - -2).", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\ndef c(f):\n\treturn 4 - f\nv = 32 - 40\nk = c(v)\no = 2/((-2)/3) + (k - -2)\nprint(76 % o)" + ], + "Output Answer": [ + "10.0" + ], + "split": "train" + }, + { + "Input": "Let g(j) = j**2 + 8*j + 6. Suppose -32 = 2*y + 4*i, 28 = -6*y + 3*y - i. Let m be g(y). Let w(s) = -s**3 + 7*s**2 + s - 9. Is w(m) prime?", + "Output Program": [ + "from sympy import *\ns = symbols(\"s\")\ndef w(s):\n\treturn -s**3 + 7*s**2 + s - 9\nj = symbols(\"j\")\ndef g(j):\n\treturn j**2 + 8*j + 6\ny, i = symbols(\"y i\")\ny = solve([Eq(-32, 2*y + 4*i), Eq(28, -6*y + 3*y - i)])[y]\nm = g(y)\nr = w(m)\nprint(isprime(33))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let o = 512 - 427. Calculate the remainder when o is divided by 75.", + "Output Program": [ + "from sympy import *\no = 512 - 427\nprint(o % 75)" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Calculate the greatest common factor of 27080622 and 6.", + "Output Program": [ + "from sympy import *\nprint(gcd(27080622, 6))" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "Let h(g) = g**3 - 32*g**2 + 114*g - 32. Let z be h(28). Let w = 8 + -17. Let s = z + w. Does 7 divide s?", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ndef h(g):\n\treturn g**3 - 32*g**2 + 114*g - 32\nz = h(28)\nw = 8 + -17\ns = z + w\nprint(15 % 7 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Is (7 - 7) + 418/2 prime?", + "Output Program": [ + "from sympy import *\nk = (7 - 7) + 418/2\nprint(isprime(209))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let s = -10 + 14. Suppose c + s = -3*c. Let h = 4 + c. What are the prime factors of h?", + "Output Program": [ + "from sympy import *\ns = -10 + 14\nc = symbols(\"c\")\nc = solve([Eq(c + s, -3*c)])[c]\nh = 4 + c\nprint(primefactors(3))" + ], + "Output Answer": [ + "[3]" + ], + "split": "train" + }, + { + "Input": "What is the hundred thousands digit of 6055258?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(6055258))[1])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "Suppose -6 = -w + 1. Let o = 9 - w. Suppose 3*h - 18 = -o*f + 5*f, 0 = -5*h + 2*f + 33. What is the units digit of h?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\nw = solve([Eq(-6, -w + 1)])[w]\no = 9 - w\nh, f = symbols(\"h f\")\nh = solve([Eq(3*h - 18, -o*f + 5*f), Eq(0, -5*h + 2*f + 33)])[h]\ndigit = int(str(int(7))[0])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Let k = 758 - -4548. What is the units digit of k?", + "Output Program": [ + "from sympy import *\nk = 758 - -4548\ndigit = int(str(int(5306))[3])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 23323469 and 2470.", + "Output Program": [ + "from sympy import *\nprint(gcd(23323469, 2470))" + ], + "Output Answer": [ + "247" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 39 + -1 + (-4)/4?", + "Output Program": [ + "from sympy import *\nq = 39 + -1 + (-4)/4\nprint(primefactors(37))" + ], + "Output Answer": [ + "[37]" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 79553971.", + "Output Program": [ + "from sympy import *\nprint(primefactors(79553971))" + ], + "Output Answer": [ + "[7, 11364853]" + ], + "split": "train" + }, + { + "Input": "Let b be (20/8)/((-2)/(-4)). Suppose 0 = 4*r - 11 - b. What is the units digit of r?", + "Output Program": [ + "from sympy import *\nb = (20/8)/((-2)/(-4))\nr = symbols(\"r\")\nr = solve([Eq(0, 4*r - 11 - b)])[r]\ndigit = int(str(int(4))[0])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Suppose -t = 5, -5*h = -4*t + 8*t - 5. Calculate the remainder when 3631 is divided by h.", + "Output Program": [ + "from sympy import *\nh, t = symbols(\"h t\")\nh = solve([Eq(-t, 5), Eq(-5*h, -4*t + 8*t - 5)])[h]\nprint(3631 % h)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common divisor of 69 and 41446.", + "Output Program": [ + "from sympy import *\nprint(gcd(69, 41446))" + ], + "Output Answer": [ + "23" + ], + "split": "train" + }, + { + "Input": "Let o = -328 + 418. Calculate the highest common divisor of 72 and o.", + "Output Program": [ + "from sympy import *\no = -328 + 418\nprint(gcd(72, o))" + ], + "Output Answer": [ + "18" + ], + "split": "train" + }, + { + "Input": "Suppose -4*n + 5085 = -n. Let v be ((-36)/(-5))/2*n. Is v/42 + 4/(-14) a prime number?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\nn = solve([Eq(-4*n + 5085, -n)])[n]\nv = ((-36)/(-5))/2*n\nl = v/42 + 4/(-14)\nprint(isprime(145))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let g be 2*3/3*19. Let p = -18 + g. List the prime factors of p.", + "Output Program": [ + "from sympy import *\ng = 2*3/3*19\np = -18 + g\nprint(primefactors(20))" + ], + "Output Answer": [ + "[2, 5]" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of 83777?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(83777))[3])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 8168301.", + "Output Program": [ + "from sympy import *\nprint(primefactors(8168301))" + ], + "Output Answer": [ + "[3, 907589]" + ], + "split": "train" + }, + { + "Input": "Let l be (-2)/((-7)/(-2) + -4). Suppose -33 = l*y - 133. Calculate the highest common divisor of y and 125.", + "Output Program": [ + "from sympy import *\nl = (-2)/((-7)/(-2) + -4)\ny = symbols(\"y\")\ny = solve([Eq(-33, l*y - 133)])[y]\nprint(gcd(y, 125))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Let h be (-4)/3*(-54)/4. Let q = h - 7. Is q a prime number?", + "Output Program": [ + "from sympy import *\nh = (-4)/3*(-54)/4\nq = h - 7\nprint(isprime(11))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Is 5034541 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(5034541))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the thousands digit of 394016?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(394016))[2])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Is 1035722 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(1035722))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let q = 8809 + -1214. What is the highest common factor of 868 and q?", + "Output Program": [ + "from sympy import *\nq = 8809 + -1214\nprint(gcd(868, q))" + ], + "Output Answer": [ + "217" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 85/3 - (-16)/24 is divided by 8?", + "Output Program": [ + "from sympy import *\ny = 85/3 - (-16)/24\nprint(y % 8)" + ], + "Output Answer": [ + "5.0" + ], + "split": "train" + }, + { + "Input": "Suppose -2*x + 7*x - 4*c - 32 = 0, x = -4*c + 40. Let z(q) = 6*q - 17. Calculate the remainder when z(8) is divided by x.", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef z(q):\n\treturn 6*q - 17\nt = z(8)\nx, c = symbols(\"x c\")\nx = solve([Eq(-2*x + 7*x - 4*c - 32, 0), Eq(x, -4*c + 40)])[x]\nprint(t % x)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 19120 and 1673.", + "Output Program": [ + "from sympy import *\nprint(gcd(19120, 1673))" + ], + "Output Answer": [ + "239" + ], + "split": "train" + }, + { + "Input": "Does 3 divide 87?", + "Output Program": [ + "from sympy import *\nprint(87 % 3 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -t + 2*t = 5*c - 25, 3*c = -5*t + 15. Let a be 2*-1*(-35)/(-14). What is the remainder when c is divided by (-8)/(-16) - a/2?", + "Output Program": [ + "from sympy import *\nc, t = symbols(\"c t\")\nc = solve([Eq(-t + 2*t, 5*c - 25), Eq(3*c, -5*t + 15)])[c]\na = 2*-1*(-35)/(-14)\ns = (-8)/(-16) - a/2\nprint(c % s)" + ], + "Output Answer": [ + "2.00000000000000" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 1055 is divided by 11?", + "Output Program": [ + "from sympy import *\nprint(1055 % 11)" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Let v be ((-18)/4)/(33/44). Let z(k) = -k**2 - 6*k + 5. Does 4 divide z(v)?", + "Output Program": [ + "from sympy import *\nk = symbols(\"k\")\ndef z(k):\n\treturn -k**2 - 6*k + 5\nv = ((-18)/4)/(33/44)\ns = z(v)\nprint(5 % 4 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Is 19853 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(19853))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the greatest common factor of 35292455 and 2640?", + "Output Program": [ + "from sympy import *\nprint(gcd(35292455, 2640))" + ], + "Output Answer": [ + "55" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 124 is divided by 19?", + "Output Program": [ + "from sympy import *\nprint(124 % 19)" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Let t be (-2)/(-4)*2*(-121)/(-11). Let a be (-1 + 2)/(-1) - -12. What is the highest common divisor of t and a?", + "Output Program": [ + "from sympy import *\nt = (-2)/(-4)*2*(-121)/(-11)\na = (-1 + 2)/(-1) - -12\nprint(gcd(t, a))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of (1 + -20)*(7 + -4 + -106)?", + "Output Program": [ + "from sympy import *\nw = (1 + -20)*(7 + -4 + -106)\nprint(primefactors(1957))" + ], + "Output Answer": [ + "[19, 103]" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 715 and 2653079.", + "Output Program": [ + "from sympy import *\nprint(gcd(715, 2653079))" + ], + "Output Answer": [ + "143" + ], + "split": "train" + }, + { + "Input": "Let t = -5 + 0. Let i(h) = -2*h**3 - 6*h**2 - 2*h - 5. Let j be i(t). What is the greatest common divisor of 21 and j?", + "Output Program": [ + "from sympy import *\nh = symbols(\"h\")\ndef i(h):\n\treturn -2*h**3 - 6*h**2 - 2*h - 5\nt = -5 + 0\nj = i(t)\nprint(gcd(21, j))" + ], + "Output Answer": [ + "21" + ], + "split": "train" + }, + { + "Input": "Let t(l) = -9*l - 3. Let n = -15 - -9. Is t(n) composite?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef t(l):\n\treturn -9*l - 3\nn = -15 - -9\nf = t(n)\nprint(not isprime(51))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 65 and 1941017.", + "Output Program": [ + "from sympy import *\nprint(gcd(65, 1941017))" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "Let z = 738 + -735. Suppose -4*b - 16 = 0, -2*b = 2*p + 7 - 29. Suppose 0 = z*k - 12 - p. What is the remainder when k is divided by 3?", + "Output Program": [ + "from sympy import *\nz = 738 + -735\np, b = symbols(\"p b\")\np = solve([Eq(-4*b - 16, 0), Eq(-2*b, 2*p + 7 - 29)])[p]\nk = symbols(\"k\")\nk = solve([Eq(0, z*k - 12 - p)])[k]\nprint(k % 3)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "Let n(i) = 2 + 16*i + 10*i + 6*i + 8*i. Let b be n(1). What is the greatest common factor of 28 and b?", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ndef n(i):\n\treturn 2 + 16*i + 10*i + 6*i + 8*i\nb = n(1)\nprint(gcd(28, b))" + ], + "Output Answer": [ + "14" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 2253658448?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2253658448))[9])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of 3703?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(3703))[2])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "What is the hundreds digit of 11723?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(11723))[2])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Let s(n) = 59*n**2 - 184*n - 61. Is s(-18) prime?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef s(n):\n\treturn 59*n**2 - 184*n - 61\nw = s(-18)\nprint(isprime(22367))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let n be -1*((-47)/9 - (-24)/108). Suppose -n*z + 350 = 165. Calculate the greatest common divisor of 296 and z.", + "Output Program": [ + "from sympy import *\nn = -1*((-47)/9 - (-24)/108)\nz = symbols(\"z\")\nz = solve([Eq(-n*z + 350, 165)])[z]\nprint(gcd(296, z))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Is 66140209 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(66140209))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Is 11176734347 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(11176734347))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 2900887.", + "Output Program": [ + "from sympy import *\nprint(primefactors(2900887))" + ], + "Output Answer": [ + "[11, 31, 47, 181]" + ], + "split": "train" + }, + { + "Input": "What is the highest common divisor of 4991 and 136927?", + "Output Program": [ + "from sympy import *\nprint(gcd(4991, 136927))" + ], + "Output Answer": [ + "217" + ], + "split": "train" + }, + { + "Input": "Let w = 111 - 117. What is the tens digit of w - (5 - 644)/((-8)/(-8))?", + "Output Program": [ + "from sympy import *\nw = 111 - 117\nb = w - (5 - 644)/((-8)/(-8))\ndigit = int(str(int(633))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Suppose 2*d - 6 = 0, -6*g + 2*d = -5*g + 2. Calculate the remainder when 6 is divided by g.", + "Output Program": [ + "from sympy import *\ng, d = symbols(\"g d\")\ng = solve([Eq(2*d - 6, 0), Eq(-6*g + 2*d, -5*g + 2)])[g]\nprint(6 % g)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Let z(k) = -k**2 - 10*k + 20. Let p(h) = -h**2 + 2*h + 3. Let w be p(-3). Let c be z(w). List the prime factors of (c/(-6))/((-9)/(-405)).", + "Output Program": [ + "from sympy import *\nk = symbols(\"k\")\ndef z(k):\n\treturn -k**2 - 10*k + 20\nh = symbols(\"h\")\ndef p(h):\n\treturn -h**2 + 2*h + 3\nw = p(-3)\nc = z(w)\nj = (c/(-6))/((-9)/(-405))\nprint(primefactors(30))" + ], + "Output Answer": [ + "[2, 3, 5]" + ], + "split": "train" + }, + { + "Input": "Suppose 57 + 8 = 5*c. What is the remainder when 38 is divided by c?", + "Output Program": [ + "from sympy import *\nc = symbols(\"c\")\nc = solve([Eq(57 + 8, 5*c)])[c]\nprint(38 % c)" + ], + "Output Answer": [ + "12" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 75898963.", + "Output Program": [ + "from sympy import *\nprint(primefactors(75898963))" + ], + "Output Answer": [ + "[7, 347, 31247]" + ], + "split": "train" + }, + { + "Input": "Let l = 0 + -135. Let f = l - -184. What is the units digit of f?", + "Output Program": [ + "from sympy import *\nl = 0 + -135\nf = l - -184\ndigit = int(str(int(49))[1])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Is 1671 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(1671))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 1579?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1579))[3])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Suppose 1 = 19*q - 20*q. Is (2 + -925)/q*(0 + 1) a prime number?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\nq = solve([Eq(1, 19*q - 20*q)])[q]\nx = (2 + -925)/q*(0 + 1)\nprint(isprime(923))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 1087 is divided by 64?", + "Output Program": [ + "from sympy import *\nprint(1087 % 64)" + ], + "Output Answer": [ + "63" + ], + "split": "train" + }, + { + "Input": "Let n be 336*3/(-5 - -8). Suppose -18*r - n = -22*r. Does 12 divide r?", + "Output Program": [ + "from sympy import *\nn = 336*3/(-5 - -8)\nr = symbols(\"r\")\nr = solve([Eq(-18*r - n, -22*r)])[r]\nprint(84 % 12 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose 6 = -2*y + 3*h + 13, -3*y + 4*h = -11. Suppose z - 3 = -3*z + y*i, 0 = z + i - 12. Calculate the highest common divisor of 77 and z.", + "Output Program": [ + "from sympy import *\ny, h = symbols(\"y h\")\ny = solve([Eq(6, -2*y + 3*h + 13), Eq(-3*y + 4*h, -11)])[y]\nz, i = symbols(\"z i\")\nz = solve([Eq(z - 3, -3*z + y*i), Eq(0, z + i - 12)])[z]\nprint(gcd(77, z))" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Let z = 146 - 146. Suppose z = 10*c - 580 - 820. What is the remainder when c is divided by 52?", + "Output Program": [ + "from sympy import *\nz = 146 - 146\nc = symbols(\"c\")\nc = solve([Eq(z, 10*c - 580 - 820)])[c]\nprint(c % 52)" + ], + "Output Answer": [ + "36" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 160 is divided by 125.", + "Output Program": [ + "from sympy import *\nprint(160 % 125)" + ], + "Output Answer": [ + "35" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 37211.", + "Output Program": [ + "from sympy import *\nprint(primefactors(37211))" + ], + "Output Answer": [ + "[127, 293]" + ], + "split": "train" + }, + { + "Input": "Let r(q) = 52*q**2 + 3*q + 3. What is the units digit of r(-1)?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef r(q):\n\treturn 52*q**2 + 3*q + 3\no = r(-1)\ndigit = int(str(int(52))[1])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Is 63090003 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(63090003))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of ((-8168)/(-6))/(4232/207 + -20)?", + "Output Program": [ + "from sympy import *\nb = ((-8168)/(-6))/(4232/207 + -20)\nprint(primefactors(3063))" + ], + "Output Answer": [ + "[3, 1021]" + ], + "split": "train" + }, + { + "Input": "Let c(u) = -u - 2. Let k(j) = 27 - 2*j. Let o be k(19). Let p be c(o). Let y(w) = 4*w**2 - 12*w + 7. Is y(p) prime?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef y(w):\n\treturn 4*w**2 - 12*w + 7\nu = symbols(\"u\")\ndef c(u):\n\treturn -u - 2\nj = symbols(\"j\")\ndef k(j):\n\treturn 27 - 2*j\no = k(19)\np = c(o)\ns = y(p)\nprint(isprime(223))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Calculate the greatest common divisor of 386893 and 1222.", + "Output Program": [ + "from sympy import *\nprint(gcd(386893, 1222))" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "Is 4066207949 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(4066207949))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let x(g) = 39*g**2 - 27*g + 1161. Does 50 divide x(20)?", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ndef x(g):\n\treturn 39*g**2 - 27*g + 1161\nu = x(20)\nprint(16221 % 50 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the ten thousands digit of 1841503?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1841503))[2])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Is 787 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(787))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -3*d - 5 - 7 = 0. Let t(u) = u**2 + 4*u + 13. Let q be t(d). Let o = 93 - q. Does 15 divide o?", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\ndef t(u):\n\treturn u**2 + 4*u + 13\nd = symbols(\"d\")\nd = solve([Eq(-3*d - 5 - 7, 0)])[d]\nq = t(d)\no = 93 - q\nprint(80 % 15 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let x(v) = 15*v**3 + 46*v**2 + v - 65. Let f(d) = -5*d**3 - 16*d**2 + 22. Let m(l) = 17*f(l) + 6*x(l). List the prime factors of m(6).", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\ndef f(d):\n\treturn -5*d**3 - 16*d**2 + 22\nv = symbols(\"v\")\ndef x(v):\n\treturn 15*v**3 + 46*v**2 + v - 65\ndef m(l):\n\treturn 17*f(l) + 6*x(l)\nk = m(6)\nprint(primefactors(1244))" + ], + "Output Answer": [ + "[2, 311]" + ], + "split": "train" + }, + { + "Input": "Suppose -32 = -2*w + 5*v, 0*w + v + 19 = w. Let t(g) = -9*g**2 + g - 1. Let r be t(1). Let x = w + r. What are the prime factors of x?", + "Output Program": [ + "from sympy import *\nw, v = symbols(\"w v\")\nw = solve([Eq(-32, -2*w + 5*v), Eq(0*w + v + 19, w)])[w]\ng = symbols(\"g\")\ndef t(g):\n\treturn -9*g**2 + g - 1\nr = t(1)\nx = w + r\nprint(primefactors(12))" + ], + "Output Answer": [ + "[2, 3]" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 2090 is divided by 51.", + "Output Program": [ + "from sympy import *\nprint(2090 % 51)" + ], + "Output Answer": [ + "50" + ], + "split": "train" + }, + { + "Input": "Let k(w) = -2*w**3 + 3*w**2 - 4*w + 22. Let p be k(3). Let u(y) = y**3 + 15*y**2 - 40*y - 72. Let o be u(p). What is the greatest common divisor of 190 and o?", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef u(y):\n\treturn y**3 + 15*y**2 - 40*y - 72\nw = symbols(\"w\")\ndef k(w):\n\treturn -2*w**3 + 3*w**2 - 4*w + 22\np = k(3)\no = u(p)\nprint(gcd(190, o))" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 134198 is divided by 12191.", + "Output Program": [ + "from sympy import *\nprint(134198 % 12191)" + ], + "Output Answer": [ + "97" + ], + "split": "train" + }, + { + "Input": "Is 19774619 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(19774619))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Is 26160873659 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(26160873659))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -432 = -3*x - 4*a, -3*a - 25 = -x + 132. What is the remainder when x is divided by 38?", + "Output Program": [ + "from sympy import *\nx, a = symbols(\"x a\")\nx = solve([Eq(-432, -3*x - 4*a), Eq(-3*a - 25, -x + 132)])[x]\nprint(x % 38)" + ], + "Output Answer": [ + "34" + ], + "split": "train" + }, + { + "Input": "Suppose -48 = 7*d + 5*d. List the prime factors of (d - 1934/(-5)) + (-5)/(-25).", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\nd = solve([Eq(-48, 7*d + 5*d)])[d]\nf = (d - 1934/(-5)) + (-5)/(-25)\nprint(primefactors(383))" + ], + "Output Answer": [ + "[383]" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 5577 is divided by 31.", + "Output Program": [ + "from sympy import *\nprint(5577 % 31)" + ], + "Output Answer": [ + "28" + ], + "split": "train" + }, + { + "Input": "Does 1242 divide 16780662?", + "Output Program": [ + "from sympy import *\nprint(16780662 % 1242 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let a = -21 - -44. Suppose -a = -3*k + 2*b, -k = -b - 2*b - 3. Suppose -4*w + 56 = 4*u, -k = 3*w - u - 47. What are the prime factors of w?", + "Output Program": [ + "from sympy import *\na = -21 - -44\nk, b = symbols(\"k b\")\nk = solve([Eq(-a, -3*k + 2*b), Eq(-k, -b - 2*b - 3)])[k]\nw, u = symbols(\"w u\")\nw = solve([Eq(-4*w + 56, 4*u), Eq(-k, 3*w - u - 47)])[w]\nprint(primefactors(13))" + ], + "Output Answer": [ + "[13]" + ], + "split": "train" + }, + { + "Input": "Let g(b) = -b**2 - 5*b + 7. Let u be g(-6). Let t be 36/(-4)*u/(-1). Let h be (0 - -1)*351/t. Calculate the greatest common divisor of h and 26.", + "Output Program": [ + "from sympy import *\nb = symbols(\"b\")\ndef g(b):\n\treturn -b**2 - 5*b + 7\nu = g(-6)\nt = 36/(-4)*u/(-1)\nh = (0 - -1)*351/t\nprint(gcd(h, 26))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Suppose 4*u - 21 - 14 = 1. Suppose 2*w = 4*w - 42. What is the highest common divisor of w and u?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\nw = solve([Eq(2*w, 4*w - 42)])[w]\nu = symbols(\"u\")\nu = solve([Eq(4*u - 21 - 14, 1)])[u]\nprint(gcd(w, u))" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 4121131?", + "Output Program": [ + "from sympy import *\nprint(primefactors(4121131))" + ], + "Output Answer": [ + "[7, 588733]" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 6567176989?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(6567176989))[9])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 6341 is divided by 234.", + "Output Program": [ + "from sympy import *\nprint(6341 % 234)" + ], + "Output Answer": [ + "23" + ], + "split": "train" + }, + { + "Input": "What is the hundreds digit of 13451?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(13451))[2])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 8180679?", + "Output Program": [ + "from sympy import *\nprint(primefactors(8180679))" + ], + "Output Answer": [ + "[3, 13, 47, 4463]" + ], + "split": "train" + }, + { + "Input": "Let g be (-4)/(12/4 - 5). Suppose -g*s + 3*k + 42 = -s, 5*k - 5 = 0. List the prime factors of s.", + "Output Program": [ + "from sympy import *\ng = (-4)/(12/4 - 5)\ns, k = symbols(\"s k\")\ns = solve([Eq(-g*s + 3*k + 42, -s), Eq(5*k - 5, 0)])[s]\nprint(primefactors(45))" + ], + "Output Answer": [ + "[3, 5]" + ], + "split": "train" + }, + { + "Input": "Let b(s) = -s**3 - 18*s**2 - 35*s + 20. Let o be b(-16). What is the greatest common factor of o and 4?", + "Output Program": [ + "from sympy import *\ns = symbols(\"s\")\ndef b(s):\n\treturn -s**3 - 18*s**2 - 35*s + 20\no = b(-16)\nprint(gcd(o, 4))" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 613 is divided by 197.", + "Output Program": [ + "from sympy import *\nprint(613 % 197)" + ], + "Output Answer": [ + "22" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of ((-3)/(-5))/(1/55)?", + "Output Program": [ + "from sympy import *\ns = ((-3)/(-5))/(1/55)\ndigit = int(str(int(33))[0])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Let c(m) = 9*m + 111. Let q be c(-6). What are the prime factors of (q/(-15))/((-2)/430)?", + "Output Program": [ + "from sympy import *\nm = symbols(\"m\")\ndef c(m):\n\treturn 9*m + 111\nq = c(-6)\nx = (q/(-15))/((-2)/430)\nprint(primefactors(817))" + ], + "Output Answer": [ + "[19, 43]" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 1734091509?", + "Output Program": [ + "from sympy import *\nprint(primefactors(1734091509))" + ], + "Output Answer": [ + "[3, 23, 25131761]" + ], + "split": "train" + }, + { + "Input": "Let x(v) = 2*v + 20. Let p be x(-1). Let r be 4*(10/4 - 2). What is the highest common factor of p and r?", + "Output Program": [ + "from sympy import *\nv = symbols(\"v\")\ndef x(v):\n\treturn 2*v + 20\np = x(-1)\nr = 4*(10/4 - 2)\nprint(gcd(p, r))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Suppose -16 = 4*u - 0. List the prime factors of -1*(u - -3)*11.", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\nu = solve([Eq(-16, 4*u - 0)])[u]\ns = -1*(u - -3)*11\nprint(primefactors(11))" + ], + "Output Answer": [ + "[11]" + ], + "split": "train" + }, + { + "Input": "What is the highest common factor of 2 and 694?", + "Output Program": [ + "from sympy import *\nprint(gcd(2, 694))" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Suppose 3214 = 4*f - 2890. Is 3/(4 - f/382) prime?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\nf = solve([Eq(3214, 4*f - 2890)])[f]\nx = 3/(4 - f/382)\nprint(isprime(573))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose 5*m + 5 = h - 80, 2*m - 4 = 0. Calculate the highest common factor of 38 and h.", + "Output Program": [ + "from sympy import *\nh, m = symbols(\"h m\")\nh = solve([Eq(5*m + 5, h - 80), Eq(2*m - 4, 0)])[h]\nprint(gcd(38, h))" + ], + "Output Answer": [ + "19" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 105282 is divided by 35070?", + "Output Program": [ + "from sympy import *\nprint(105282 % 35070)" + ], + "Output Answer": [ + "72" + ], + "split": "train" + }, + { + "Input": "What is the hundred thousands digit of 113368?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(113368))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Let d = 3 + 11. Suppose r - 70 = d. What is the units digit of r?", + "Output Program": [ + "from sympy import *\nd = 3 + 11\nr = symbols(\"r\")\nr = solve([Eq(r - 70, d)])[r]\ndigit = int(str(int(84))[1])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Let n(a) = 2*a**2 + 9*a - 5. Suppose 70 = 5*c + 5*r, -2*r + 32 = c - 7*r. Suppose -2*u + 35 = -5*y - c, 0 = -3*y + 3*u - 33. What are the prime factors of n(y)?", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\ndef n(a):\n\treturn 2*a**2 + 9*a - 5\nc, r = symbols(\"c r\")\nc = solve([Eq(70, 5*c + 5*r), Eq(-2*r + 32, c - 7*r)])[c]\ny, u = symbols(\"y u\")\ny = solve([Eq(-2*u + 35, -5*y - c), Eq(0, -3*y + 3*u - 33)])[y]\nt = n(y)\nprint(primefactors(105))" + ], + "Output Answer": [ + "[3, 5, 7]" + ], + "split": "train" + }, + { + "Input": "Let t be ((9 + 1)/1)/(52/78). Let y(c) = 91 + t*c - 6*c + 197 + 131. Is y(0) prime?", + "Output Program": [ + "from sympy import *\nt = ((9 + 1)/1)/(52/78)\nc = symbols(\"c\")\ndef y(c):\n\treturn 91 + t*c - 6*c + 197 + 131\ns = y(0)\nprint(isprime(419))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 527297693?", + "Output Program": [ + "from sympy import *\nprint(primefactors(527297693))" + ], + "Output Answer": [ + "[13, 31, 37, 35363]" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 65513092?", + "Output Program": [ + "from sympy import *\nprint(primefactors(65513092))" + ], + "Output Answer": [ + "[2, 16378273]" + ], + "split": "train" + }, + { + "Input": "Let j = 63 - 60. Let r = -8 + 1. Let v = r + 9. What is the remainder when j is divided by v?", + "Output Program": [ + "from sympy import *\nj = 63 - 60\nr = -8 + 1\nv = r + 9\nprint(j % v)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Suppose 30 = 3*d - 78. Calculate the remainder when d is divided by 13.", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\nd = solve([Eq(30, 3*d - 78)])[d]\nprint(d % 13)" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 34555588?", + "Output Program": [ + "from sympy import *\nprint(primefactors(34555588))" + ], + "Output Answer": [ + "[2, 29, 297893]" + ], + "split": "train" + }, + { + "Input": "Let s = -96 - -157. What is the tens digit of s?", + "Output Program": [ + "from sympy import *\ns = -96 - -157\ndigit = int(str(int(61))[0])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "Suppose l = -2*l + 9. Suppose 14 - l = -i. Let n = i - -37. Does 11 divide n?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\nl = solve([Eq(l, -2*l + 9)])[l]\ni = symbols(\"i\")\ni = solve([Eq(14 - l, -i)])[i]\nn = i - -37\nprint(26 % 11 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose 5*f = 4*z - 73, 26 = 3*z - f + 3*f. What is the units digit of z?", + "Output Program": [ + "from sympy import *\nz, f = symbols(\"z f\")\nz = solve([Eq(5*f, 4*z - 73), Eq(26, 3*z - f + 3*f)])[z]\ndigit = int(str(int(12))[1])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Let q be (255/68)/(-1 - 327/(-328)). Let g = q - -3839. Is g composite?", + "Output Program": [ + "from sympy import *\nq = (255/68)/(-1 - 327/(-328))\ng = q - -3839\nprint(not isprime(2609))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose -119*n = -125*n + 354. Calculate the remainder when n is divided by 23.", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\nn = solve([Eq(-119*n, -125*n + 354)])[n]\nprint(n % 23)" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "Is 155473609 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(155473609))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 1944903.", + "Output Program": [ + "from sympy import *\nprint(primefactors(1944903))" + ], + "Output Answer": [ + "[3, 23, 71, 397]" + ], + "split": "train" + }, + { + "Input": "Is 1721 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(1721))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let o = 11451 + -1996. What is the tens digit of o?", + "Output Program": [ + "from sympy import *\no = 11451 + -1996\ndigit = int(str(int(9455))[2])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "Is 76307779 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(76307779))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 7000 and 17410750.", + "Output Program": [ + "from sympy import *\nprint(gcd(7000, 17410750))" + ], + "Output Answer": [ + "1750" + ], + "split": "train" + }, + { + "Input": "Does 1179 divide 131075325?", + "Output Program": [ + "from sympy import *\nprint(131075325 % 1179 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Is 263 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(263))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -2*t = 5*k - 62, 5*k + 2*t = -t + 63. Suppose -4*j + 3 = -3*j. Suppose -24 = -j*y - 6. Calculate the highest common factor of y and k.", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\nj = solve([Eq(-4*j + 3, -3*j)])[j]\ny = symbols(\"y\")\ny = solve([Eq(-24, -j*y - 6)])[y]\nk, t = symbols(\"k t\")\nk = solve([Eq(-2*t, 5*k - 62), Eq(5*k + 2*t, -t + 63)])[k]\nprint(gcd(y, k))" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 10855 is divided by 18?", + "Output Program": [ + "from sympy import *\nprint(10855 % 18)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Is 47878188637 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(47878188637))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Calculate the greatest common factor of 62227827 and 3378.", + "Output Program": [ + "from sympy import *\nprint(gcd(62227827, 3378))" + ], + "Output Answer": [ + "1689" + ], + "split": "train" + }, + { + "Input": "Let l be ((-24)/(-9))/(2/9). Suppose 3*g = 3*i - g + l, -4*i - g = -3. Let p = 66 - i. What is the greatest common factor of 22 and p?", + "Output Program": [ + "from sympy import *\nl = ((-24)/(-9))/(2/9)\ni, g = symbols(\"i g\")\ni = solve([Eq(3*g, 3*i - g + l), Eq(-4*i - g, -3)])[i]\np = 66 - i\nprint(gcd(22, p))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Let q(a) = a**3 - 6*a**2 + 2*a - 5. Let i be (4 + -2)*3*1. Is q(i) composite?", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\ndef q(a):\n\treturn a**3 - 6*a**2 + 2*a - 5\ni = (4 + -2)*3*1\nw = q(i)\nprint(not isprime(7))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the greatest common factor of 2566 and 4?", + "Output Program": [ + "from sympy import *\nprint(gcd(2566, 4))" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Suppose -4*x = -5*p - 143 - 165, 0 = -2*x - 2*p + 136. Calculate the greatest common divisor of x and 9.", + "Output Program": [ + "from sympy import *\nx, p = symbols(\"x p\")\nx = solve([Eq(-4*x, -5*p - 143 - 165), Eq(0, -2*x - 2*p + 136)])[x]\nprint(gcd(x, 9))" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Let j = 54 - 0. List the prime factors of j.", + "Output Program": [ + "from sympy import *\nj = 54 - 0\nprint(primefactors(54))" + ], + "Output Answer": [ + "[2, 3]" + ], + "split": "train" + }, + { + "Input": "Let l(g) = -1151*g - 432. List the prime factors of l(-6).", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ndef l(g):\n\treturn -1151*g - 432\nc = l(-6)\nprint(primefactors(6474))" + ], + "Output Answer": [ + "[2, 3, 13, 83]" + ], + "split": "train" + }, + { + "Input": "Suppose 301 = a + 5*r, 5*a = -0*a + 4*r + 1621. Suppose b - a = 125. Suppose -4*v - 4 = 0, -4*f + v + b = -1343. Is f prime?", + "Output Program": [ + "from sympy import *\na, r = symbols(\"a r\")\na = solve([Eq(301, a + 5*r), Eq(5*a, -0*a + 4*r + 1621)])[a]\nb = symbols(\"b\")\nb = solve([Eq(b - a, 125)])[b]\nf, v = symbols(\"f v\")\nf = solve([Eq(-4*v - 4, 0), Eq(-4*f + v + b, -1343)])[f]\nprint(isprime(447))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let r(j) = 4*j - 12. Let i be r(11). Let k = i + -21. Does 3 divide k?", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\ndef r(j):\n\treturn 4*j - 12\ni = r(11)\nk = i + -21\nprint(11 % 3 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let d be (20/16)/((-1)/4). Let t = 7 + d. Suppose 0 = v + 4*v - t*b - 275, 0 = v - 5*b - 78. Is v composite?", + "Output Program": [ + "from sympy import *\nd = (20/16)/((-1)/4)\nt = 7 + d\nv, b = symbols(\"v b\")\nv = solve([Eq(0, v + 4*v - t*b - 275), Eq(0, v - 5*b - 78)])[v]\nprint(not isprime(53))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the thousands digit of 3960?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(3960))[0])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Suppose -76*i = r - 81*i - 30986, 5*r = 2*i + 155068. List the prime factors of r.", + "Output Program": [ + "from sympy import *\nr, i = symbols(\"r i\")\nr = solve([Eq(-76*i, r - 81*i - 30986), Eq(5*r, 2*i + 155068)])[r]\nprint(primefactors(31016))" + ], + "Output Answer": [ + "[2, 3877]" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of -129*((-4)/(-30))/((-12)/60)?", + "Output Program": [ + "from sympy import *\ny = -129*((-4)/(-30))/((-12)/60)\nprint(primefactors(86))" + ], + "Output Answer": [ + "[2, 43]" + ], + "split": "train" + }, + { + "Input": "Let l = -166 + 176. What is the remainder when 46 is divided by l?", + "Output Program": [ + "from sympy import *\nl = -166 + 176\nprint(46 % l)" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 54?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(54))[1])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Let j be 0 - 1 - (-41 + 2). Suppose -y + 107 = 5*h, -2*h - 5*y + 3*y = -j. Is h composite?", + "Output Program": [ + "from sympy import *\nj = 0 - 1 - (-41 + 2)\nh, y = symbols(\"h y\")\nh = solve([Eq(-y + 107, 5*h), Eq(-2*h - 5*y + 3*y, -j)])[h]\nprint(not isprime(22))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of 7001?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(7001))[2])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "Let x(v) = v**2 - 2*v + 39. What is the units digit of x(0)?", + "Output Program": [ + "from sympy import *\nv = symbols(\"v\")\ndef x(v):\n\treturn v**2 - 2*v + 39\na = x(0)\ndigit = int(str(int(39))[1])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Is 10273224077 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(10273224077))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose 0 = 2*x - 3 + 1. Calculate the remainder when x is divided by 1.", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\nx = solve([Eq(0, 2*x - 3 + 1)])[x]\nprint(x % 1)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 1927 is divided by 71?", + "Output Program": [ + "from sympy import *\nprint(1927 % 71)" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Does 10 divide 1372130?", + "Output Program": [ + "from sympy import *\nprint(1372130 % 10 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the highest common divisor of 120 and 12680?", + "Output Program": [ + "from sympy import *\nprint(gcd(120, 12680))" + ], + "Output Answer": [ + "40" + ], + "split": "train" + }, + { + "Input": "What is the greatest common divisor of 10141938 and 2610?", + "Output Program": [ + "from sympy import *\nprint(gcd(10141938, 2610))" + ], + "Output Answer": [ + "522" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 239849.", + "Output Program": [ + "from sympy import *\nprint(primefactors(239849))" + ], + "Output Answer": [ + "[239849]" + ], + "split": "train" + }, + { + "Input": "Let f(i) = 9*i**2 - 2*i - 6. What is the remainder when f(3) is divided by 14?", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ndef f(i):\n\treturn 9*i**2 - 2*i - 6\nt = f(3)\nprint(t % 14)" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 373.", + "Output Program": [ + "from sympy import *\nprint(primefactors(373))" + ], + "Output Answer": [ + "[373]" + ], + "split": "train" + }, + { + "Input": "Let j(l) = l**3 + 7*l**2 - 3*l - 62. Let f be j(-5). Suppose -f*u = 5*r - 1261, -4*u + 4*r + 1716 = 2*r. What is the units digit of u?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef j(l):\n\treturn l**3 + 7*l**2 - 3*l - 62\nf = j(-5)\nu, r = symbols(\"u r\")\nu = solve([Eq(-f*u, 5*r - 1261), Eq(-4*u + 4*r + 1716, 2*r)])[u]\ndigit = int(str(int(427))[2])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Let z be 3/1*(0 - 1). Let a be (-3)/(-6) + 11/(-2). Let l = z - a. What is the units digit of l?", + "Output Program": [ + "from sympy import *\nz = 3/1*(0 - 1)\na = (-3)/(-6) + 11/(-2)\nl = z - a\ndigit = int(str(int(2))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "What is the hundreds digit of 2213502?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2213502))[4])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "Suppose 4*t + x = 401, 3*t + 3*x = 4*t - 97. Let v = 75 + -50. Calculate the greatest common divisor of t and v.", + "Output Program": [ + "from sympy import *\nt, x = symbols(\"t x\")\nt = solve([Eq(4*t + x, 401), Eq(3*t + 3*x, 4*t - 97)])[t]\nv = 75 + -50\nprint(gcd(t, v))" + ], + "Output Answer": [ + "25" + ], + "split": "train" + }, + { + "Input": "Is 240250411 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(240250411))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let v = 2 + 3. Suppose -24 = -2*i + 2*x, -i + 2*x + v = -2. What are the prime factors of i?", + "Output Program": [ + "from sympy import *\nv = 2 + 3\ni, x = symbols(\"i x\")\ni = solve([Eq(-24, -2*i + 2*x), Eq(-i + 2*x + v, -2)])[i]\nprint(primefactors(17))" + ], + "Output Answer": [ + "[17]" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 7241 is divided by 1034?", + "Output Program": [ + "from sympy import *\nprint(7241 % 1034)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Let k(n) = 9*n**3 - 13*n**2 + 101*n + 40. Is k(13) composite?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef k(n):\n\treturn 9*n**3 - 13*n**2 + 101*n + 40\ng = k(13)\nprint(not isprime(18929))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Is 62379467 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(62379467))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose x - 2*d + 0 = -5, 4*d = -20. Let u be (-5)/(x/34) + (-13)/39. Let b(z) = z**2 - 5*z + 5. What is the tens digit of b(u)?", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\ndef b(z):\n\treturn z**2 - 5*z + 5\nx, d = symbols(\"x d\")\nx = solve([Eq(x - 2*d + 0, -5), Eq(4*d, -20)])[x]\nu = (-5)/(x/34) + (-13)/39\na = b(u)\ndigit = int(str(int(71))[0])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "What is the greatest common factor of 1411632 and 744?", + "Output Program": [ + "from sympy import *\nprint(gcd(1411632, 744))" + ], + "Output Answer": [ + "24" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 123404?", + "Output Program": [ + "from sympy import *\nprint(primefactors(123404))" + ], + "Output Answer": [ + "[2, 30851]" + ], + "split": "train" + }, + { + "Input": "Let d(m) = -27*m**2 - 623*m - 33. Let a(q) = 74*q**3 - q**2 + q. Calculate the remainder when a(1) is divided by d(-23).", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef a(q):\n\treturn 74*q**3 - q**2 + q\ny = a(1)\nm = symbols(\"m\")\ndef d(m):\n\treturn -27*m**2 - 623*m - 33\no = d(-23)\nprint(y % o)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Is 3114509 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(3114509))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let w(j) = 3394*j + 6*j**2 - 43 - 3384*j + 2*j**2. Is w(-17) a prime number?", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\ndef w(j):\n\treturn 3394*j + 6*j**2 - 43 - 3384*j + 2*j**2\ns = w(-17)\nprint(isprime(2099))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let t be 140/(-8)*54/(-15). What is the highest common factor of 9 and t?", + "Output Program": [ + "from sympy import *\nt = 140/(-8)*54/(-15)\nprint(gcd(9, t))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Calculate the greatest common divisor of 4150 and 512350.", + "Output Program": [ + "from sympy import *\nprint(gcd(4150, 512350))" + ], + "Output Answer": [ + "50" + ], + "split": "train" + }, + { + "Input": "Is 16883639 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(16883639))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let h = 160 + 2492. What are the prime factors of h?", + "Output Program": [ + "from sympy import *\nh = 160 + 2492\nprint(primefactors(2652))" + ], + "Output Answer": [ + "[2, 3, 13, 17]\n" + ], + "split": "train" + }, + { + "Input": "Calculate the greatest common factor of 1272502 and 15092.", + "Output Program": [ + "from sympy import *\nprint(gcd(1272502, 15092))" + ], + "Output Answer": [ + "154" + ], + "split": "train" + }, + { + "Input": "What is the hundred thousands digit of 57166438?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(57166438))[2])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 16167 and 1717.", + "Output Program": [ + "from sympy import *\nprint(gcd(16167, 1717))" + ], + "Output Answer": [ + "17" + ], + "split": "train" + }, + { + "Input": "What is the greatest common divisor of 61864 and 684?", + "Output Program": [ + "from sympy import *\nprint(gcd(61864, 684))" + ], + "Output Answer": [ + "76" + ], + "split": "train" + }, + { + "Input": "Let c = 6554 + -2439. Suppose -3963 = -7*w + c. What is the thousands digit of w?", + "Output Program": [ + "from sympy import *\nc = 6554 + -2439\nw = symbols(\"w\")\nw = solve([Eq(-3963, -7*w + c)])[w]\ndigit = int(str(int(1154))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common divisor of 4684080 and 1680.", + "Output Program": [ + "from sympy import *\nprint(gcd(4684080, 1680))" + ], + "Output Answer": [ + "240" + ], + "split": "train" + }, + { + "Input": "Let j be 3 + (2 - (-4)/(-2)). Calculate the remainder when (-55 + -3)*j/(-6) is divided by ((-2)/6)/((-1)/45).", + "Output Program": [ + "from sympy import *\nj = 3 + (2 - (-4)/(-2))\nl = (-55 + -3)*j/(-6)\nm = ((-2)/6)/((-1)/45)\nprint(l % m)" + ], + "Output Answer": [ + "14.000000000000002" + ], + "split": "train" + }, + { + "Input": "Suppose -12*s + s = -66. Suppose -294 = 4*h - s*h - 4*k, 163 = h - 2*k. List the prime factors of h.", + "Output Program": [ + "from sympy import *\ns = symbols(\"s\")\ns = solve([Eq(-12*s + s, -66)])[s]\nh, k = symbols(\"h k\")\nh = solve([Eq(-294, 4*h - s*h - 4*k), Eq(163, h - 2*k)])[h]\nprint(primefactors(155))" + ], + "Output Answer": [ + "[5, 31]" + ], + "split": "train" + }, + { + "Input": "What is the greatest common divisor of 3269 and 21?", + "Output Program": [ + "from sympy import *\nprint(gcd(3269, 21))" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 1142?", + "Output Program": [ + "from sympy import *\nprint(primefactors(1142))" + ], + "Output Answer": [ + "[2, 571]" + ], + "split": "train" + }, + { + "Input": "Suppose 0 = c - b - 4, -4*c - 4*b + 9 = -b. Suppose -3*p + 33 + 2 = o, 0 = 5*o - c*p - 175. Is o prime?", + "Output Program": [ + "from sympy import *\nc, b = symbols(\"c b\")\nc = solve([Eq(0, c - b - 4), Eq(-4*c - 4*b + 9, -b)])[c]\no, p = symbols(\"o p\")\no = solve([Eq(-3*p + 33 + 2, o), Eq(0, 5*o - c*p - 175)])[o]\nprint(isprime(35))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 77346?", + "Output Program": [ + "from sympy import *\nprint(primefactors(77346))" + ], + "Output Answer": [ + "[2, 3, 4297]" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 544901?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(544901))[5])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Let y = 1216 - 1209. What is the greatest common divisor of 553 and y?", + "Output Program": [ + "from sympy import *\ny = 1216 - 1209\nprint(gcd(553, y))" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 558 is divided by 158?", + "Output Program": [ + "from sympy import *\nprint(558 % 158)" + ], + "Output Answer": [ + "84" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of 8155452?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(8155452))[5])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "Let x be -2*(3 - 11/2). Suppose 5*g = x, -2*g = 2*w - 0*w - 26. Does 3 divide w?", + "Output Program": [ + "from sympy import *\nx = -2*(3 - 11/2)\nw, g = symbols(\"w g\")\nw = solve([Eq(5*g, x), Eq(-2*g, 2*w - 0*w - 26)])[w]\nprint(12 % 3 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the hundreds digit of 7373?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(7373))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Let n be 1/((-70)/(-25) + -3) - -9. Is 4/(-16)*n*(-3322 + -1) a prime number?", + "Output Program": [ + "from sympy import *\nn = 1/((-70)/(-25) + -3) - -9\nl = 4/(-16)*n*(-3322 + -1)\nprint(isprime(3323))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let j = 0 - -5. Suppose h - 6*h = 3*i - 75, -5*i = j*h - 75. Let x = h - 14. Calculate the greatest common factor of x and 7.", + "Output Program": [ + "from sympy import *\nj = 0 - -5\nh, i = symbols(\"h i\")\nh = solve([Eq(h - 6*h, 3*i - 75), Eq(-5*i, j*h - 75)])[h]\nx = h - 14\nprint(gcd(x, 7))" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 16567 is divided by 610.", + "Output Program": [ + "from sympy import *\nprint(16567 % 610)" + ], + "Output Answer": [ + "97" + ], + "split": "train" + }, + { + "Input": "Let w = 37 - 13. What is the greatest common divisor of w and 16?", + "Output Program": [ + "from sympy import *\nw = 37 - 13\nprint(gcd(w, 16))" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "What is the ten thousands digit of 2521309171?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2521309171))[5])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "Let f(j) = 38*j - 13. Let h be f(-8). Let q = h - -182. Let s = q - -201. What are the prime factors of s?", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\ndef f(j):\n\treturn 38*j - 13\nh = f(-8)\nq = h - -182\ns = q - -201\nprint(primefactors(66))" + ], + "Output Answer": [ + "[2, 3, 11]" + ], + "split": "train" + }, + { + "Input": "Let a = -2 - -6. Suppose t = -a*t - 35. Let l = -1 - t. What is the units digit of l?", + "Output Program": [ + "from sympy import *\na = -2 - -6\nt = symbols(\"t\")\nt = solve([Eq(t, -a*t - 35)])[t]\nl = -1 - t\ndigit = int(str(int(6))[0])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "What is the hundreds digit of 545593223?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(545593223))[6])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Let f = -67 - -64. Let m be 14/3 + -5 - 937/f. Suppose m = 13*j - 7*j. Calculate the highest common divisor of j and 13.", + "Output Program": [ + "from sympy import *\nf = -67 - -64\nm = 14/3 + -5 - 937/f\nj = symbols(\"j\")\nj = solve([Eq(m, 13*j - 7*j)])[j]\nprint(gcd(j, 13))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 680843.", + "Output Program": [ + "from sympy import *\nprint(primefactors(680843))" + ], + "Output Answer": [ + "[97, 7019]" + ], + "split": "train" + }, + { + "Input": "Let a be (-6)/12 + 114/4. Suppose 0 = 3*h - 26 - a. What is the units digit of h?", + "Output Program": [ + "from sympy import *\na = (-6)/12 + 114/4\nh = symbols(\"h\")\nh = solve([Eq(0, 3*h - 26 - a)])[h]\ndigit = int(str(int(18))[1])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "Suppose -2*k + 3*b + 11 = 2, -3*k = 2*b - 20. Suppose 207 + 411 = k*a. What are the prime factors of a?", + "Output Program": [ + "from sympy import *\nk, b = symbols(\"k b\")\nk = solve([Eq(-2*k + 3*b + 11, 2), Eq(-3*k, 2*b - 20)])[k]\na = symbols(\"a\")\na = solve([Eq(207 + 411, k*a)])[a]\nprint(primefactors(103))" + ], + "Output Answer": [ + "[103]" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common divisor of 117 and 676.", + "Output Program": [ + "from sympy import *\nprint(gcd(117, 676))" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 22622 is divided by 796.", + "Output Program": [ + "from sympy import *\nprint(22622 % 796)" + ], + "Output Answer": [ + "334" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 34925 is divided by 53?", + "Output Program": [ + "from sympy import *\nprint(34925 % 53)" + ], + "Output Answer": [ + "51" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of ((-6606)/15)/(14/(-1225))?", + "Output Program": [ + "from sympy import *\nv = ((-6606)/15)/(14/(-1225))\ndigit = int(str(int(38535))[3])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Is 72849733 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(72849733))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let w be (-1)/(((-3)/9)/(-1)). What is the remainder when 28 - (0/w)/1 is divided by 15?", + "Output Program": [ + "from sympy import *\nw = (-1)/(((-3)/9)/(-1))\nf = 28 - (0/w)/1\nprint(f % 15)" + ], + "Output Answer": [ + "13.0" + ], + "split": "train" + }, + { + "Input": "Suppose 2*z - 118 = 174. Suppose -f = f - z. What is the units digit of f?", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\nz = solve([Eq(2*z - 118, 174)])[z]\nf = symbols(\"f\")\nf = solve([Eq(-f, f - z)])[f]\ndigit = int(str(int(73))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Let u = 7 - -18. List the prime factors of u.", + "Output Program": [ + "from sympy import *\nu = 7 - -18\nprint(primefactors(25))" + ], + "Output Answer": [ + "[5]" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 434.", + "Output Program": [ + "from sympy import *\nprint(primefactors(434))" + ], + "Output Answer": [ + "[2, 7, 31]" + ], + "split": "train" + }, + { + "Input": "Is 1422479629 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(1422479629))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Is 3137 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(3137))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the remainder when ((-17487)/783)/(2/(-18)) is divided by 126?", + "Output Program": [ + "from sympy import *\nw = ((-17487)/783)/(2/(-18))\nprint(w % 126)" + ], + "Output Answer": [ + "75.0" + ], + "split": "train" + }, + { + "Input": "Does 10 divide 229460?", + "Output Program": [ + "from sympy import *\nprint(229460 % 10 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let z be 2 + (3 + -2)/(-1). Suppose -5*x = -2*j - 45, -5*j + x - 35 = -2*j. Let p = z - j. What are the prime factors of p?", + "Output Program": [ + "from sympy import *\nz = 2 + (3 + -2)/(-1)\nj, x = symbols(\"j x\")\nj = solve([Eq(-5*x, -2*j - 45), Eq(-5*j + x - 35, -2*j)])[j]\np = z - j\nprint(primefactors(11))" + ], + "Output Answer": [ + "[11]" + ], + "split": "train" + }, + { + "Input": "Let y = -17765 - -17822. Calculate the remainder when (-1)/2 - (-223)/2 is divided by y.", + "Output Program": [ + "from sympy import *\nm = (-1)/2 - (-223)/2\ny = -17765 - -17822\nprint(m % y)" + ], + "Output Answer": [ + "54.0" + ], + "split": "train" + }, + { + "Input": "Suppose 0 = -2*n + 3*g + 374, 4*n = 3*g + 924 - 182. Does 23 divide n?", + "Output Program": [ + "from sympy import *\nn, g = symbols(\"n g\")\nn = solve([Eq(0, -2*n + 3*g + 374), Eq(4*n, 3*g + 924 - 182)])[n]\nprint(184 % 23 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let i = 827 + -824. What is the remainder when (-2)/(-4) - 17/(-2) is divided by i?", + "Output Program": [ + "from sympy import *\na = (-2)/(-4) - 17/(-2)\ni = 827 + -824\nprint(a % i)" + ], + "Output Answer": [ + "0.0" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 209 is divided by 30.", + "Output Program": [ + "from sympy import *\nprint(209 % 30)" + ], + "Output Answer": [ + "29" + ], + "split": "train" + }, + { + "Input": "Let j(q) = -5*q - 1553*q**2 + 4 + 1552*q**2 - 3. Let x be j(-5). What is the tens digit of (0 - x/6) + 3465/54?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef j(q):\n\treturn -5*q - 1553*q**2 + 4 + 1552*q**2 - 3\nx = j(-5)\ny = (0 - x/6) + 3465/54\ndigit = int(str(int(64))[0])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 188?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(188))[2])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "Let k(w) = 20528*w + 84. Let z be k(7). What is the remainder when z/336 - -1*2/24 is divided by 10?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef k(w):\n\treturn 20528*w + 84\nz = k(7)\np = z/336 - -1*2/24\nprint(p % 10)" + ], + "Output Answer": [ + "8.0" + ], + "split": "train" + }, + { + "Input": "Does 196 divide 63564519?", + "Output Program": [ + "from sympy import *\nprint(63564519 % 196 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose -8*j = -619 + 483. Let c = -95 - -146. Calculate the highest common factor of c and j.", + "Output Program": [ + "from sympy import *\nc = -95 - -146\nj = symbols(\"j\")\nj = solve([Eq(-8*j, -619 + 483)])[j]\nprint(gcd(c, j))" + ], + "Output Answer": [ + "17" + ], + "split": "train" + }, + { + "Input": "Suppose -v + 2*t = -2*t - 3, -4*v + 5*t + 12 = 0. Suppose -v*a = -4*a + 13. What is the remainder when 36 is divided by a?", + "Output Program": [ + "from sympy import *\nv, t = symbols(\"v t\")\nv = solve([Eq(-v + 2*t, -2*t - 3), Eq(-4*v + 5*t + 12, 0)])[v]\na = symbols(\"a\")\na = solve([Eq(-v*a, -4*a + 13)])[a]\nprint(36 % a)" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Let s be 3/2*12/(-9). Let h = s + 6. Suppose 5*y - 50 = -5*k, h*k - y = y + 22. What are the prime factors of k?", + "Output Program": [ + "from sympy import *\ns = 3/2*12/(-9)\nh = s + 6\nk, y = symbols(\"k y\")\nk = solve([Eq(5*y - 50, -5*k), Eq(h*k - y, y + 22)])[k]\nprint(primefactors(7))" + ], + "Output Answer": [ + "[7]" + ], + "split": "train" + }, + { + "Input": "Let j = -21 - -9. Let w be (-2 + j/(-1))/2. Suppose -c + 78 = w*v - 12, 2*c = -4*v + 72. List the prime factors of v.", + "Output Program": [ + "from sympy import *\nj = -21 - -9\nw = (-2 + j/(-1))/2\nv, c = symbols(\"v c\")\nv = solve([Eq(-c + 78, w*v - 12), Eq(2*c, -4*v + 72)])[v]\nprint(primefactors(18))" + ], + "Output Answer": [ + "[2, 3]" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 143682293?", + "Output Program": [ + "from sympy import *\nprint(primefactors(143682293))" + ], + "Output Answer": [ + "[143682293]" + ], + "split": "train" + }, + { + "Input": "What is the millions digit of 15941470?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(15941470))[1])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "Let g(c) = c**2 + 12. Let k = 3 - 3. Let y be g(k). What is the remainder when (-1 - -1 - -1) + y is divided by 4?", + "Output Program": [ + "from sympy import *\nc = symbols(\"c\")\ndef g(c):\n\treturn c**2 + 12\nk = 3 - 3\ny = g(k)\nm = (-1 - -1 - -1) + y\nprint(m % 4)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Let g be (176/(-6))/(852/54 + -16). Calculate the greatest common factor of g and 220.", + "Output Program": [ + "from sympy import *\ng = (176/(-6))/(852/54 + -16)\nprint(gcd(g, 220))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 345134 is divided by 8481?", + "Output Program": [ + "from sympy import *\nprint(345134 % 8481)" + ], + "Output Answer": [ + "5894" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 1457909.", + "Output Program": [ + "from sympy import *\nprint(primefactors(1457909))" + ], + "Output Answer": [ + "[89, 16381]" + ], + "split": "train" + }, + { + "Input": "What is the millions digit of 35900248?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(35900248))[1])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "Let u(w) be the third derivative of w**6/120 + 11*w**5/30 + 19*w**4/24 - 10*w**3/3 + 21*w**2. Let i be u(-21). What is the highest common factor of 11 and i?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef r(w):\n\treturn w**6/120 + 11*w**5/30 + 19*w**4/24 - 10*w**3/3 + 21*w**2\ndef u(val):\n\treturn diff(w**6/120 + 11*w**5/30 + 19*w**4/24 - 10*w**3/3 + 21*w**2, w, 3).subs(w, val)\ni = u(-21)\nprint(gcd(11, i))" + ], + "Output Answer": [ + "11" + ], + "split": "train" + }, + { + "Input": "What is the highest common factor of 672 and 95396?", + "Output Program": [ + "from sympy import *\nprint(gcd(672, 95396))" + ], + "Output Answer": [ + "28" + ], + "split": "train" + }, + { + "Input": "What is the highest common divisor of 693 and 24015537?", + "Output Program": [ + "from sympy import *\nprint(gcd(693, 24015537))" + ], + "Output Answer": [ + "63" + ], + "split": "train" + }, + { + "Input": "Let j(c) = 14 - 4*c. Let u be j(3). Is (1/(2/u))/((-1)/(-545)) prime?", + "Output Program": [ + "from sympy import *\nc = symbols(\"c\")\ndef j(c):\n\treturn 14 - 4*c\nu = j(3)\nr = (1/(2/u))/((-1)/(-545))\nprint(isprime(545))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common divisor of 57 and 1444.", + "Output Program": [ + "from sympy import *\nprint(gcd(57, 1444))" + ], + "Output Answer": [ + "19" + ], + "split": "train" + }, + { + "Input": "What is the ten thousands digit of 2465212?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2465212))[2])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 38715?", + "Output Program": [ + "from sympy import *\nprint(primefactors(38715))" + ], + "Output Answer": [ + "[3, 5, 29, 89]" + ], + "split": "train" + }, + { + "Input": "Calculate the greatest common divisor of 414 and 486.", + "Output Program": [ + "from sympy import *\nprint(gcd(414, 486))" + ], + "Output Answer": [ + "18" + ], + "split": "train" + }, + { + "Input": "Let m(j) = 20*j**2 - 4*j - 3. Calculate the remainder when m(-2) is divided by 8.", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\ndef m(j):\n\treturn 20*j**2 - 4*j - 3\no = m(-2)\nprint(o % 8)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 17739309.", + "Output Program": [ + "from sympy import *\nprint(primefactors(17739309))" + ], + "Output Answer": [ + "[3, 7, 353, 2393]" + ], + "split": "train" + }, + { + "Input": "Let g(z) be the second derivative of z**4/12 - 31*z**3/6 + 84*z**2 + 68*z. Let j be g(25). What is the greatest common factor of j and 99?", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\ndef w(z):\n\treturn z**4/12 - 31*z**3/6 + 84*z**2 + 68*z\ndef g(val):\n\treturn diff(z**4/12 - 31*z**3/6 + 84*z**2 + 68*z, z, 2).subs(z, val)\nj = g(25)\nprint(gcd(j, 99))" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 112263 is divided by 16027.", + "Output Program": [ + "from sympy import *\nprint(112263 % 16027)" + ], + "Output Answer": [ + "74" + ], + "split": "train" + }, + { + "Input": "Suppose d - 6*d + 20 = 0. Suppose v - 4*q = d*v - 118, -3*v + 111 = -3*q. Is v a prime number?", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\nd = solve([Eq(d - 6*d + 20, 0)])[d]\nv, q = symbols(\"v q\")\nv = solve([Eq(v - 4*q, d*v - 118), Eq(-3*v + 111, -3*q)])[v]\nprint(isprime(38))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 3118.", + "Output Program": [ + "from sympy import *\nprint(primefactors(3118))" + ], + "Output Answer": [ + "[2, 1559]" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 50851 is divided by 1498?", + "Output Program": [ + "from sympy import *\nprint(50851 % 1498)" + ], + "Output Answer": [ + "1417" + ], + "split": "train" + }, + { + "Input": "Let c(y) = y**2 - 37*y - 71. Let w be c(40). Suppose -g + 15 = 5*d - 4*d, -3*g + d = -w. Does 3 divide g?", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef c(y):\n\treturn y**2 - 37*y - 71\nw = c(40)\ng, d = symbols(\"g d\")\ng = solve([Eq(-g + 15, 5*d - 4*d), Eq(-3*g + d, -w)])[g]\nprint(16 % 3 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose 5*v - 335 = 5*q, -q + 4*q + v = -209. Let k = q - -179. Let t = k - 94. Calculate the highest common factor of t and 56.", + "Output Program": [ + "from sympy import *\nq, v = symbols(\"q v\")\nq = solve([Eq(5*v - 335, 5*q), Eq(-q + 4*q + v, -209)])[q]\nk = q - -179\nt = k - 94\nprint(gcd(t, 56))" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "Let o = 283 - 199. Let q be o/9*3*1. What is the greatest common divisor of 7 and q?", + "Output Program": [ + "from sympy import *\no = 283 - 199\nq = o/9*3*1\nprint(gcd(7, q))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "What is the greatest common divisor of 17292 and 8580?", + "Output Program": [ + "from sympy import *\nprint(gcd(17292, 8580))" + ], + "Output Answer": [ + "132" + ], + "split": "train" + }, + { + "Input": "Let b(f) = -3*f**2 + 13*f - 6. Let q be b(4). Let s be ((-1 + -2)/3)/(q/958). Let z = s - 242. What is the hundreds digit of z?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\ndef b(f):\n\treturn -3*f**2 + 13*f - 6\nq = b(4)\ns = ((-1 + -2)/3)/(q/958)\nz = s - 242\ndigit = int(str(int(237))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "What is the greatest common divisor of 1261757 and 19159?", + "Output Program": [ + "from sympy import *\nprint(gcd(1261757, 19159))" + ], + "Output Answer": [ + "2737" + ], + "split": "train" + }, + { + "Input": "What is the hundred millions digit of 1880250616?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1880250616))[1])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "Let j(h) = -h - 28. Let t be j(-18). Let m be (11 - 14)*t/(-27). Do m and -1/3 have the same value?", + "Output Program": [ + "from sympy import *\nh = symbols(\"h\")\ndef j(h):\n\treturn -h - 28\nt = j(-18)\nm = (11 - 14)*t/(-27)\nprint(m == -1/3)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let o(x) = -7*x**3 + 5*x**2 + 9*x + 10. Let c(u) = -8*u**3 + 5*u**2 + 9*u + 10. Let s(j) = 6*c(j) - 7*o(j). Does 10 divide s(7)?", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\ndef o(x):\n\treturn -7*x**3 + 5*x**2 + 9*x + 10\nu = symbols(\"u\")\ndef c(u):\n\treturn -8*u**3 + 5*u**2 + 9*u + 10\ndef s(j):\n\treturn 6*c(j) - 7*o(j)\nt = s(7)\nprint(25 % 10 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let b(l) = -l**3 - 18*l**2 - 55*l + 18. Let i be b(-14). Let q(n) be the first derivative of n**3/3 - 6*n + 1. Does 5 divide q(i)?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef o(n):\n\treturn n**3/3 - 6*n + 1\ndef q(val):\n\treturn diff(n**3/3 - 6*n + 1, n, 1).subs(n, val)\nl = symbols(\"l\")\ndef b(l):\n\treturn -l**3 - 18*l**2 - 55*l + 18\ni = b(-14)\np = q(i)\nprint(10 % 5 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the thousands digit of 10720?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(10720))[1])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "Is 31795337177 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(31795337177))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -3*q = -0*q + 126. Does 7 divide (q/4)/((-2)/4)?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\nq = solve([Eq(-3*q, -0*q + 126)])[q]\nd = (q/4)/((-2)/4)\nprint(21 % 7 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 345 is divided by 48.", + "Output Program": [ + "from sympy import *\nprint(345 % 48)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Let s(r) = 9*r**2 - r. Let w be s(2). Let n = 18 + -13. Suppose 5*v - 2*c = -5*c + 440, -n*c = 5*v - 450. What is the greatest common factor of v and w?", + "Output Program": [ + "from sympy import *\nn = 18 + -13\nv, c = symbols(\"v c\")\nv = solve([Eq(5*v - 2*c, -5*c + 440), Eq(-n*c, 5*v - 450)])[v]\nr = symbols(\"r\")\ndef s(r):\n\treturn 9*r**2 - r\nw = s(2)\nprint(gcd(v, w))" + ], + "Output Answer": [ + "17" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 904699?", + "Output Program": [ + "from sympy import *\nprint(primefactors(904699))" + ], + "Output Answer": [ + "[311, 2909]" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 3296092?", + "Output Program": [ + "from sympy import *\nprint(primefactors(3296092))" + ], + "Output Answer": [ + "[2, 887, 929]" + ], + "split": "train" + }, + { + "Input": "Let h = 1817 - 427. What is the highest common factor of 60 and h?", + "Output Program": [ + "from sympy import *\nh = 1817 - 427\nprint(gcd(60, h))" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 816530484?", + "Output Program": [ + "from sympy import *\nprint(primefactors(816530484))" + ], + "Output Answer": [ + "[2, 3, 7, 11, 883691]" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 117 is divided by 10?", + "Output Program": [ + "from sympy import *\nprint(117 % 10)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "What is the millions digit of 1267448?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1267448))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Let d be (-8*4/(-20))/(4/50). Calculate the remainder when (-30)/(-25)*d/3 is divided by 4.", + "Output Program": [ + "from sympy import *\nd = (-8*4/(-20))/(4/50)\nj = (-30)/(-25)*d/3\nprint(j % 4)" + ], + "Output Answer": [ + "0.0" + ], + "split": "train" + }, + { + "Input": "Let w = 6 + -2. Suppose 12 = 5*a - 4*o, 3*o + 3 = -6. Suppose -w*t + 6*t - 10 = a. Is t even?", + "Output Program": [ + "from sympy import *\nw = 6 + -2\na, o = symbols(\"a o\")\na = solve([Eq(12, 5*a - 4*o), Eq(3*o + 3, -6)])[a]\nt = symbols(\"t\")\nt = solve([Eq(-w*t + 6*t - 10, a)])[t]\nprint(5 % 2 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 55249 is divided by 560.", + "Output Program": [ + "from sympy import *\nprint(55249 % 560)" + ], + "Output Answer": [ + "369" + ], + "split": "train" + }, + { + "Input": "Let j(q) = -2*q**3 - 205*q**2 - 1068*q - 6. Let s be j(-97). Suppose -2*c - 52 = -6*c. Calculate the highest common divisor of s and c.", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef j(q):\n\treturn -2*q**3 - 205*q**2 - 1068*q - 6\ns = j(-97)\nc = symbols(\"c\")\nc = solve([Eq(-2*c - 52, -6*c)])[c]\nprint(gcd(s, c))" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 992162475?", + "Output Program": [ + "from sympy import *\nprint(primefactors(992162475))" + ], + "Output Answer": [ + "[3, 5, 4409611]" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 727925800.", + "Output Program": [ + "from sympy import *\nprint(primefactors(727925800))" + ], + "Output Answer": [ + "[2, 5, 7, 519947]" + ], + "split": "train" + }, + { + "Input": "Suppose 0 = 2*j - 3*j. Suppose -3*l + 3 + 6 = j. Suppose f = l + 10. What is the greatest common factor of f and 104?", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\nj = solve([Eq(0, 2*j - 3*j)])[j]\nl = symbols(\"l\")\nl = solve([Eq(-3*l + 3 + 6, j)])[l]\nf = symbols(\"f\")\nf = solve([Eq(f, l + 10)])[f]\nprint(gcd(f, 104))" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common divisor of 13583 and 54043.", + "Output Program": [ + "from sympy import *\nprint(gcd(13583, 54043))" + ], + "Output Answer": [ + "289" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of 101900?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(101900))[4])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "Let u(k) = -k**3 - 10*k**2 + 2*k - 7. Let l(j) = -j**2 + j. Let x(r) = 3*l(r) - u(r). Is x(-6) prime?", + "Output Program": [ + "from sympy import *\nk = symbols(\"k\")\ndef u(k):\n\treturn -k**3 - 10*k**2 + 2*k - 7\nj = symbols(\"j\")\ndef l(j):\n\treturn -j**2 + j\ndef x(r):\n\treturn 3*l(r) - u(r)\no = x(-6)\nprint(isprime(37))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 133702 is divided by 52?", + "Output Program": [ + "from sympy import *\nprint(133702 % 52)" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Let a(x) = -x**3 - x**2 + 3*x + 2. Let d be (-6)/2*4/6. Let q be a(d). Suppose 3*j - j - 88 = q. Calculate the highest common divisor of 11 and j.", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\ndef a(x):\n\treturn -x**3 - x**2 + 3*x + 2\nd = (-6)/2*4/6\nq = a(d)\nj = symbols(\"j\")\nj = solve([Eq(3*j - j - 88, q)])[j]\nprint(gcd(11, j))" + ], + "Output Answer": [ + "11" + ], + "split": "train" + }, + { + "Input": "What is the highest common divisor of 10573 and 2533543?", + "Output Program": [ + "from sympy import *\nprint(gcd(10573, 2533543))" + ], + "Output Answer": [ + "97" + ], + "split": "train" + }, + { + "Input": "Let a(y) = 124*y - 386. Let j be a(4). Calculate the greatest common divisor of 140 and j.", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef a(y):\n\treturn 124*y - 386\nj = a(4)\nprint(gcd(140, j))" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 174 is divided by 25.", + "Output Program": [ + "from sympy import *\nprint(174 % 25)" + ], + "Output Answer": [ + "24" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 335 is divided by 28.", + "Output Program": [ + "from sympy import *\nprint(335 % 28)" + ], + "Output Answer": [ + "27" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 248563?", + "Output Program": [ + "from sympy import *\nprint(primefactors(248563))" + ], + "Output Answer": [ + "[7, 35509]" + ], + "split": "train" + }, + { + "Input": "Suppose 7*x + 5*x - 144 = 0. Let f(r) = 6*r**2 - 3*r - 3. Let d be f(-1). What is the greatest common divisor of x and d?", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\nx = solve([Eq(7*x + 5*x - 144, 0)])[x]\nr = symbols(\"r\")\ndef f(r):\n\treturn 6*r**2 - 3*r - 3\nd = f(-1)\nprint(gcd(x, d))" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 7031475501?", + "Output Program": [ + "from sympy import *\nprint(primefactors(7031475501))" + ], + "Output Answer": [ + "[3, 79, 227, 130699]" + ], + "split": "train" + }, + { + "Input": "Suppose -14*q + 68 = -16. Calculate the greatest common factor of 18 and q.", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\nq = solve([Eq(-14*q + 68, -16)])[q]\nprint(gcd(18, q))" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 4014704515?", + "Output Program": [ + "from sympy import *\nprint(primefactors(4014704515))" + ], + "Output Answer": [ + "[5, 47, 991, 17239]" + ], + "split": "train" + }, + { + "Input": "Is 1715124291 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(1715124291))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let o = -10 - -285. What are the prime factors of o?", + "Output Program": [ + "from sympy import *\no = -10 - -285\nprint(primefactors(275))" + ], + "Output Answer": [ + "[5, 11]" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common divisor of 27148 and 80060686.", + "Output Program": [ + "from sympy import *\nprint(gcd(27148, 80060686))" + ], + "Output Answer": [ + "1234" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 1777?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1777))[3])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Let n = -146 + 325. List the prime factors of n.", + "Output Program": [ + "from sympy import *\nn = -146 + 325\nprint(primefactors(179))" + ], + "Output Answer": [ + "[179]" + ], + "split": "train" + }, + { + "Input": "Does 42 divide 31668?", + "Output Program": [ + "from sympy import *\nprint(31668 % 42 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 106?", + "Output Program": [ + "from sympy import *\nprint(primefactors(106))" + ], + "Output Answer": [ + "[2, 53]" + ], + "split": "train" + }, + { + "Input": "Let w(c) = 4*c**2 - c + 7. What is the remainder when 238 is divided by w(3)?", + "Output Program": [ + "from sympy import *\nc = symbols(\"c\")\ndef w(c):\n\treturn 4*c**2 - c + 7\no = w(3)\nprint(238 % o)" + ], + "Output Answer": [ + "38" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 31 is divided by (11 - -3 - 2) + (-1 - -1).", + "Output Program": [ + "from sympy import *\nn = (11 - -3 - 2) + (-1 - -1)\nprint(31 % n)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Is 32203 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(32203))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let r(w) be the first derivative of -14*w**4 - 3*w**2/2 - 2*w - 24. List the prime factors of r(-1).", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef g(w):\n\treturn -14*w**4 - 3*w**2/2 - 2*w - 24\ndef r(val):\n\treturn diff(-14*w**4 - 3*w**2/2 - 2*w - 24, w, 1).subs(w, val)\nv = r(-1)\nprint(primefactors(57))" + ], + "Output Answer": [ + "[3, 19]" + ], + "split": "train" + }, + { + "Input": "Let s = 15552 + -8381. What is the thousands digit of s?", + "Output Program": [ + "from sympy import *\ns = 15552 + -8381\ndigit = int(str(int(7171))[0])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Is 683049229 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(683049229))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the thousands digit of 221308293?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(221308293))[5])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 34 is divided by 10?", + "Output Program": [ + "from sympy import *\nprint(34 % 10)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Let x be 15/6 - (-3)/6. What is the tens digit of x/18 + 142/12?", + "Output Program": [ + "from sympy import *\nx = 15/6 - (-3)/6\nd = x/18 + 142/12\ndigit = int(str(int(12))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 1090 is divided by 531?", + "Output Program": [ + "from sympy import *\nprint(1090 % 531)" + ], + "Output Answer": [ + "28" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 29105714 is divided by 954?", + "Output Program": [ + "from sympy import *\nprint(29105714 % 954)" + ], + "Output Answer": [ + "128" + ], + "split": "train" + }, + { + "Input": "Is 148849 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(148849))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose 62*t = 406355 + 44943. Is t composite?", + "Output Program": [ + "from sympy import *\nt = symbols(\"t\")\nt = solve([Eq(62*t, 406355 + 44943)])[t]\nprint(not isprime(7279))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 28394 is divided by 14189?", + "Output Program": [ + "from sympy import *\nprint(28394 % 14189)" + ], + "Output Answer": [ + "16" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 689.", + "Output Program": [ + "from sympy import *\nprint(primefactors(689))" + ], + "Output Answer": [ + "[13, 53]" + ], + "split": "train" + }, + { + "Input": "Suppose 0 = -2*q - 3*q + 120. Calculate the highest common factor of q and 12.", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\nq = solve([Eq(0, -2*q - 3*q + 120)])[q]\nprint(gcd(q, 12))" + ], + "Output Answer": [ + "12" + ], + "split": "train" + }, + { + "Input": "Let h(t) be the first derivative of 7*t**4/4 + 13*t**3/3 + 5*t**2 + t - 16. Is h(7) prime?", + "Output Program": [ + "from sympy import *\nt = symbols(\"t\")\ndef o(t):\n\treturn 7*t**4/4 + 13*t**3/3 + 5*t**2 + t - 16\ndef h(val):\n\treturn diff(7*t**4/4 + 13*t**3/3 + 5*t**2 + t - 16, t, 1).subs(t, val)\nq = h(7)\nprint(isprime(3109))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Does 20 divide 696?", + "Output Program": [ + "from sympy import *\nprint(696 % 20 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose 49*p - 5*o = 46*p + 452121, -3*p + 6*o = -452127. Is p a prime number?", + "Output Program": [ + "from sympy import *\np, o = symbols(\"p o\")\np = solve([Eq(49*p - 5*o, 46*p + 452121), Eq(-3*p + 6*o, -452127)])[p]\nprint(isprime(150697))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let t(x) = x**2 - 18*x - 10. Suppose -2*h + a = -36, -4*a = -3*h - 2*a + 53. Let f be t(h). Suppose -k = -f*k + 440. What are the prime factors of k?", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\ndef t(x):\n\treturn x**2 - 18*x - 10\nh, a = symbols(\"h a\")\nh = solve([Eq(-2*h + a, -36), Eq(-4*a, -3*h - 2*a + 53)])[h]\nf = t(h)\nk = symbols(\"k\")\nk = solve([Eq(-k, -f*k + 440)])[k]\nprint(primefactors(55))" + ], + "Output Answer": [ + "[5, 11]" + ], + "split": "train" + }, + { + "Input": "Suppose -4*h - 12 = -p, 0 = -5*h - 0*h - 10. Let m(l) = -l**3 + 3*l**2 + 8*l - 10. Let c be m(p). Is (-19 - 4)*(c/(-3))/2 prime?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef m(l):\n\treturn -l**3 + 3*l**2 + 8*l - 10\np, h = symbols(\"p h\")\np = solve([Eq(-4*h - 12, -p), Eq(0, -5*h - 0*h - 10)])[p]\nc = m(p)\nw = (-19 - 4)*(c/(-3))/2\nprint(isprime(23))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the highest common divisor of 175 and 475?", + "Output Program": [ + "from sympy import *\nprint(gcd(175, 475))" + ], + "Output Answer": [ + "25" + ], + "split": "train" + }, + { + "Input": "What is the hundreds digit of 220?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(220))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Let k(v) = v**2 + 3*v + 3. Let z be k(-4). Suppose 3 + z = -5*d. Let u(y) = 40*y**2 + y + 1. Is u(d) a prime number?", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef u(y):\n\treturn 40*y**2 + y + 1\nv = symbols(\"v\")\ndef k(v):\n\treturn v**2 + 3*v + 3\nz = k(-4)\nd = symbols(\"d\")\nd = solve([Eq(3 + z, -5*d)])[d]\nw = u(d)\nprint(isprime(159))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the ten thousands digit of 1835096829?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1835096829))[5])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Let g = -302 - -540. What are the prime factors of g?", + "Output Program": [ + "from sympy import *\ng = -302 - -540\nprint(primefactors(238))" + ], + "Output Answer": [ + "[2, 7, 17]" + ], + "split": "train" + }, + { + "Input": "Suppose -4*x + 198*j - 201*j = -26125, 2*x - 2*j = 13080. List the prime factors of x.", + "Output Program": [ + "from sympy import *\nx, j = symbols(\"x j\")\nx = solve([Eq(-4*x + 198*j - 201*j, -26125), Eq(2*x - 2*j, 13080)])[x]\nprint(primefactors(6535))" + ], + "Output Answer": [ + "[5, 1307]" + ], + "split": "train" + }, + { + "Input": "Let c(n) = 16*n + 2. Let b = -5 + 2. Let l = -1 - b. Calculate the remainder when c(l) is divided by 12.", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef c(n):\n\treturn 16*n + 2\nb = -5 + 2\nl = -1 - b\nk = c(l)\nprint(k % 12)" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 554 is divided by 43.", + "Output Program": [ + "from sympy import *\nprint(554 % 43)" + ], + "Output Answer": [ + "38" + ], + "split": "train" + }, + { + "Input": "Is 95657 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(95657))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 267196 is divided by 41.", + "Output Program": [ + "from sympy import *\nprint(267196 % 41)" + ], + "Output Answer": [ + "40" + ], + "split": "train" + }, + { + "Input": "Does 127 divide 1336156?", + "Output Program": [ + "from sympy import *\nprint(1336156 % 127 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Is 64147 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(64147))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the hundreds digit of 150921?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(150921))[3])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Let p = -16 - -32. What is the units digit of (p*-3)/(-3) - 1?", + "Output Program": [ + "from sympy import *\np = -16 - -32\nr = (p*-3)/(-3) - 1\ndigit = int(str(int(15))[1])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common divisor of 1449 and 3703.", + "Output Program": [ + "from sympy import *\nprint(gcd(1449, 3703))" + ], + "Output Answer": [ + "161" + ], + "split": "train" + }, + { + "Input": "Let x(l) = -l**3 + 5*l**2 + 5*l + 7. Suppose -5*p + 7 = 4*o - 3, -3*o = 2*p + 3. What is the units digit of x(p)?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef x(l):\n\treturn -l**3 + 5*l**2 + 5*l + 7\np, o = symbols(\"p o\")\np = solve([Eq(-5*p + 7, 4*o - 3), Eq(-3*o, 2*p + 3)])[p]\nw = x(p)\ndigit = int(str(int(1))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 108084.", + "Output Program": [ + "from sympy import *\nprint(primefactors(108084))" + ], + "Output Answer": [ + "[2, 3, 9007]" + ], + "split": "train" + }, + { + "Input": "Is 209402839 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(209402839))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let v(u) = -27*u**3 + 16*u**2 + 27*u - 2. Let f be v(-2). What is the greatest common divisor of 14 and f?", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\ndef v(u):\n\treturn -27*u**3 + 16*u**2 + 27*u - 2\nf = v(-2)\nprint(gcd(14, f))" + ], + "Output Answer": [ + "14" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 178089952?", + "Output Program": [ + "from sympy import *\nprint(primefactors(178089952))" + ], + "Output Answer": [ + "[2, 5565311]" + ], + "split": "train" + }, + { + "Input": "Is 897227 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(897227))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 349 is divided by 60.", + "Output Program": [ + "from sympy import *\nprint(349 % 60)" + ], + "Output Answer": [ + "49" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 53 is divided by 12.", + "Output Program": [ + "from sympy import *\nprint(53 % 12)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "What is the ten thousands digit of 1651096826?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1651096826))[5])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "Let i(h) be the first derivative of 6*h**3 + 3. List the prime factors of i(1).", + "Output Program": [ + "from sympy import *\nh = symbols(\"h\")\ndef o(h):\n\treturn 6*h**3 + 3\ndef i(val):\n\treturn diff(6*h**3 + 3, h, 1).subs(h, val)\np = i(1)\nprint(primefactors(18))" + ], + "Output Answer": [ + "[2, 3]" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 88551174?", + "Output Program": [ + "from sympy import *\nprint(primefactors(88551174))" + ], + "Output Answer": [ + "[2, 3, 14758529]" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 643105917.", + "Output Program": [ + "from sympy import *\nprint(primefactors(643105917))" + ], + "Output Answer": [ + "[3, 37, 1187, 1627]" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 13498?", + "Output Program": [ + "from sympy import *\nprint(primefactors(13498))" + ], + "Output Answer": [ + "[2, 17, 397]" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 392 and 1000.", + "Output Program": [ + "from sympy import *\nprint(gcd(392, 1000))" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "Let l(p) be the third derivative of p**5/20 - 5*p**4/24 + 2*p**3 - 5*p**2. Let f be l(9). Suppose 4*c + 2*c = f. Does 7 divide c?", + "Output Program": [ + "from sympy import *\np = symbols(\"p\")\ndef m(p):\n\treturn p**5/20 - 5*p**4/24 + 2*p**3 - 5*p**2\ndef l(val):\n\treturn diff(p**5/20 - 5*p**4/24 + 2*p**3 - 5*p**2, p, 3).subs(p, val)\nf = l(9)\nc = symbols(\"c\")\nc = solve([Eq(4*c + 2*c, f)])[c]\nprint(35 % 7 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 26566?", + "Output Program": [ + "from sympy import *\nprint(primefactors(26566))" + ], + "Output Answer": [ + "[2, 37, 359]" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 234409 is divided by 234323.", + "Output Program": [ + "from sympy import *\nprint(234409 % 234323)" + ], + "Output Answer": [ + "86" + ], + "split": "train" + }, + { + "Input": "Let h(y) = 91*y**2 - 2*y - 1. Let u be h(-1). Calculate the highest common divisor of 253 and u.", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef h(y):\n\treturn 91*y**2 - 2*y - 1\nu = h(-1)\nprint(gcd(253, u))" + ], + "Output Answer": [ + "23" + ], + "split": "train" + }, + { + "Input": "Let p be 10*3*(-2)/(-12). Let i(a) = a**3 + 7*a - 6. Let t be i(p). What is the highest common factor of t and 14?", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\ndef i(a):\n\treturn a**3 + 7*a - 6\np = 10*3*(-2)/(-12)\nt = i(p)\nprint(gcd(t, 14))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Let s(q) = q**3 - 9*q**2 + q - 9. Let x be s(9). Suppose -m = -i + 3, x*i + 2*m + 9 = -i. Let k(w) = -2768*w - 1. Is k(i) composite?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef k(w):\n\treturn -2768*w - 1\nq = symbols(\"q\")\ndef s(q):\n\treturn q**3 - 9*q**2 + q - 9\nx = s(9)\ni, m = symbols(\"i m\")\ni = solve([Eq(-m, -i + 3), Eq(x*i + 2*m + 9, -i)])[i]\nz = k(i)\nprint(not isprime(2767))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let o(l) = -97*l - 17. Let w be o(7). Let i = -441 - w. What are the prime factors of i?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef o(l):\n\treturn -97*l - 17\nw = o(7)\ni = -441 - w\nprint(primefactors(255))" + ], + "Output Answer": [ + "[3, 5, 17]" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 16334901.", + "Output Program": [ + "from sympy import *\nprint(primefactors(16334901))" + ], + "Output Answer": [ + "[3, 11, 164999]" + ], + "split": "train" + }, + { + "Input": "Let w = 889 + -596. What is the hundreds digit of w?", + "Output Program": [ + "from sympy import *\nw = 889 + -596\ndigit = int(str(int(293))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Suppose 1060 = 6*g - g. Suppose 0 = -2*r - 2, a + 3*r = 2*a - 312. Let o = a - g. Is o prime?", + "Output Program": [ + "from sympy import *\na, r = symbols(\"a r\")\na = solve([Eq(0, -2*r - 2), Eq(a + 3*r, 2*a - 312)])[a]\ng = symbols(\"g\")\ng = solve([Eq(1060, 6*g - g)])[g]\no = a - g\nprint(isprime(97))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -5*s + 4*s + 2 = 0. Let v(q) = 4*q**2 + 3*q - 3. Let r(n) = -9*n**2 - 5*n + 6. Let c(t) = s*r(t) + 5*v(t). Is c(10) a prime number?", + "Output Program": [ + "from sympy import *\ns = symbols(\"s\")\ns = solve([Eq(-5*s + 4*s + 2, 0)])[s]\nn = symbols(\"n\")\ndef r(n):\n\treturn -9*n**2 - 5*n + 6\nq = symbols(\"q\")\ndef v(q):\n\treturn 4*q**2 + 3*q - 3\ndef c(t):\n\treturn s*r(t) + 5*v(t)\ng = c(10)\nprint(isprime(247))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let d = -6 - 10. What is the units digit of 55 + d - (0 - 4)?", + "Output Program": [ + "from sympy import *\nd = -6 - 10\no = 55 + d - (0 - 4)\ndigit = int(str(int(43))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 34311 is divided by 138.", + "Output Program": [ + "from sympy import *\nprint(34311 % 138)" + ], + "Output Answer": [ + "87" + ], + "split": "train" + }, + { + "Input": "Does 145 divide 1127230?", + "Output Program": [ + "from sympy import *\nprint(1127230 % 145 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let o = 18521 + -10287. What are the prime factors of o?", + "Output Program": [ + "from sympy import *\no = 18521 + -10287\nprint(primefactors(8234))" + ], + "Output Answer": [ + "[2, 23, 179]" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 5907523 is divided by 938?", + "Output Program": [ + "from sympy import *\nprint(5907523 % 938)" + ], + "Output Answer": [ + "937" + ], + "split": "train" + }, + { + "Input": "Let i(d) = 3*d**2 + 38*d - 14. Calculate the remainder when i(-14) is divided by 30.", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\ndef i(d):\n\treturn 3*d**2 + 38*d - 14\nb = i(-14)\nprint(b % 30)" + ], + "Output Answer": [ + "12" + ], + "split": "train" + }, + { + "Input": "Let c = 3267 + -1732. Suppose -3*m - 2*m = 5*w - 2525, -m - c = -3*w. What is the hundreds digit of w?", + "Output Program": [ + "from sympy import *\nc = 3267 + -1732\nw, m = symbols(\"w m\")\nw = solve([Eq(-3*m - 2*m, 5*w - 2525), Eq(-m - c, -3*w)])[w]\ndigit = int(str(int(510))[0])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "What is the millions digit of 188653022?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(188653022))[2])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "Let s(o) = -4*o**3 + 27*o**2 + 7*o - 3. Let l be s(11). What is the tens digit of 56/(-196) - l/7?", + "Output Program": [ + "from sympy import *\no = symbols(\"o\")\ndef s(o):\n\treturn -4*o**3 + 27*o**2 + 7*o - 3\nl = s(11)\ng = 56/(-196) - l/7\ndigit = int(str(int(283))[1])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 226527.", + "Output Program": [ + "from sympy import *\nprint(primefactors(226527))" + ], + "Output Answer": [ + "[3, 7, 23, 67]" + ], + "split": "train" + }, + { + "Input": "What is the greatest common divisor of 1337 and 322?", + "Output Program": [ + "from sympy import *\nprint(gcd(1337, 322))" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 2298878 is divided by 104466.", + "Output Program": [ + "from sympy import *\nprint(2298878 % 104466)" + ], + "Output Answer": [ + "626" + ], + "split": "train" + }, + { + "Input": "Is 78707 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(78707))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -f = 4*f. Let b be (-2 - 4/(-1)) + f. Suppose b*p - 1 = 5*d, -6*p = -p - 5*d - 25. What is the highest common factor of p and 12?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\nf = solve([Eq(-f, 4*f)])[f]\nb = (-2 - 4/(-1)) + f\np, d = symbols(\"p d\")\np = solve([Eq(b*p - 1, 5*d), Eq(-6*p, -p - 5*d - 25)])[p]\nprint(gcd(p, 12))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 80904 is divided by 26788.", + "Output Program": [ + "from sympy import *\nprint(80904 % 26788)" + ], + "Output Answer": [ + "540" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 954 is divided by 460?", + "Output Program": [ + "from sympy import *\nprint(954 % 460)" + ], + "Output Answer": [ + "34" + ], + "split": "train" + }, + { + "Input": "Suppose 98 = -0*w + w + 2*t, -5*w + 446 = -t. Suppose 3*o = -3*o + w. Suppose 20*q - 375 = o*q. Calculate the remainder when q is divided by 19.", + "Output Program": [ + "from sympy import *\nw, t = symbols(\"w t\")\nw = solve([Eq(98, -0*w + w + 2*t), Eq(-5*w + 446, -t)])[w]\no = symbols(\"o\")\no = solve([Eq(3*o, -3*o + w)])[o]\nq = symbols(\"q\")\nq = solve([Eq(20*q - 375, o*q)])[q]\nprint(q % 19)" + ], + "Output Answer": [ + "18" + ], + "split": "train" + }, + { + "Input": "Let a(w) = 7*w + 35. Let p be a(-6). Is ((-98336)/p)/8 - (5 + -2) a prime number?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef a(w):\n\treturn 7*w + 35\np = a(-6)\nf = ((-98336)/p)/8 - (5 + -2)\nprint(isprime(1753))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 26771467.", + "Output Program": [ + "from sympy import *\nprint(primefactors(26771467))" + ], + "Output Answer": [ + "[89, 233, 1291]" + ], + "split": "train" + }, + { + "Input": "What is the highest common divisor of 168 and 129712884?", + "Output Program": [ + "from sympy import *\nprint(gcd(168, 129712884))" + ], + "Output Answer": [ + "84" + ], + "split": "train" + }, + { + "Input": "List the prime factors of (1/3)/(15/7650).", + "Output Program": [ + "from sympy import *\nd = (1/3)/(15/7650)\nprint(primefactors(170))" + ], + "Output Answer": [ + "[2, 5, 17]" + ], + "split": "train" + }, + { + "Input": "Suppose -6*d + 2 - 26 = 0. What are the prime factors of 6/8 + (-2 - 721/d)?", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\nd = solve([Eq(-6*d + 2 - 26, 0)])[d]\ng = 6/8 + (-2 - 721/d)\nprint(primefactors(179))" + ], + "Output Answer": [ + "[179]" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common divisor of 572964 and 1710.", + "Output Program": [ + "from sympy import *\nprint(gcd(572964, 1710))" + ], + "Output Answer": [ + "114" + ], + "split": "train" + }, + { + "Input": "Suppose -n + 2*l = -34218, 2*l - 396 = -404. What is the thousands digit of n?", + "Output Program": [ + "from sympy import *\nn, l = symbols(\"n l\")\nn = solve([Eq(-n + 2*l, -34218), Eq(2*l - 396, -404)])[n]\ndigit = int(str(int(34210))[1])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 4613323 is divided by 25.", + "Output Program": [ + "from sympy import *\nprint(4613323 % 25)" + ], + "Output Answer": [ + "23" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 274791092?", + "Output Program": [ + "from sympy import *\nprint(primefactors(274791092))" + ], + "Output Answer": [ + "[2, 61, 241, 4673]" + ], + "split": "train" + }, + { + "Input": "Let q = -2 + 10. Suppose 4*l - q - 6 = -b, -5*l + 130 = 5*b. What is the units digit of b?", + "Output Program": [ + "from sympy import *\nq = -2 + 10\nb, l = symbols(\"b l\")\nb = solve([Eq(4*l - q - 6, -b), Eq(-5*l + 130, 5*b)])[b]\ndigit = int(str(int(30))[1])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 5202148?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(5202148))[6])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of 1853704688?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1853704688))[8])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "What is the ten thousands digit of (16 - 3680/16)/(1/(-47))?", + "Output Program": [ + "from sympy import *\nz = (16 - 3680/16)/(1/(-47))\ndigit = int(str(int(10058))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "What is the highest common divisor of 1 and 53?", + "Output Program": [ + "from sympy import *\nprint(gcd(1, 53))" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Suppose 15*j + 23888 = 31*j. Suppose -593 = -2*p - 8*x + 11*x, 0 = -5*p + 4*x + j. List the prime factors of p.", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\nj = solve([Eq(15*j + 23888, 31*j)])[j]\np, x = symbols(\"p x\")\np = solve([Eq(-593, -2*p - 8*x + 11*x), Eq(0, -5*p + 4*x + j)])[p]\nprint(primefactors(301))" + ], + "Output Answer": [ + "[7, 43]" + ], + "split": "train" + }, + { + "Input": "Let w(z) = -22*z - 8. Let q be w(-6). Does 9 divide q/7 - 4/(-14)?", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\ndef w(z):\n\treturn -22*z - 8\nq = w(-6)\nk = q/7 - 4/(-14)\nprint(18 % 9 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 1572 is divided by 75?", + "Output Program": [ + "from sympy import *\nprint(1572 % 75)" + ], + "Output Answer": [ + "72" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 8940.", + "Output Program": [ + "from sympy import *\nprint(primefactors(8940))" + ], + "Output Answer": [ + "[2, 3, 5, 149]" + ], + "split": "train" + }, + { + "Input": "Does 247 divide 2641940?", + "Output Program": [ + "from sympy import *\nprint(2641940 % 247 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose -4*g + 26 = -6. Suppose -4*p + 4*m + g = 0, 0 = -4*p + 2*m + 5 + 5. Suppose -2*y - 24 = -p*y. What is the tens digit of y?", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ng = solve([Eq(-4*g + 26, -6)])[g]\np, m = symbols(\"p m\")\np = solve([Eq(-4*p + 4*m + g, 0), Eq(0, -4*p + 2*m + 5 + 5)])[p]\ny = symbols(\"y\")\ny = solve([Eq(-2*y - 24, -p*y)])[y]\ndigit = int(str(int(24))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Let w(o) be the second derivative of o**4/4 - 7*o**3/2 + 3*o**2 + 7*o. Let p(j) = -j**2 + 7*j - 2. Let h(u) = 17*p(u) + 6*w(u). List the prime factors of h(8).", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\ndef p(j):\n\treturn -j**2 + 7*j - 2\no = symbols(\"o\")\ndef f(o):\n\treturn o**4/4 - 7*o**3/2 + 3*o**2 + 7*o\ndef w(val):\n\treturn diff(o**4/4 - 7*o**3/2 + 3*o**2 + 7*o, o, 2).subs(o, val)\ndef h(u):\n\treturn 17*p(u) + 6*w(u)\nb = h(8)\nprint(primefactors(10))" + ], + "Output Answer": [ + "[2, 5]" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 151 is divided by 23.", + "Output Program": [ + "from sympy import *\nprint(151 % 23)" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "What is the thousands digit of 91987?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(91987))[1])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 12953386?", + "Output Program": [ + "from sympy import *\nprint(primefactors(12953386))" + ], + "Output Answer": [ + "[2, 6476693]" + ], + "split": "train" + }, + { + "Input": "Let p(y) = -y**2 - 8*y + 20. Let q be p(-9). Let g be 75/(-9) - 2/3. Let a = 31 + g. What is the highest common factor of q and a?", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef p(y):\n\treturn -y**2 - 8*y + 20\nq = p(-9)\ng = 75/(-9) - 2/3\na = 31 + g\nprint(gcd(q, a))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "What is the hundred thousands digit of 368669530?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(368669530))[3])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 762354?", + "Output Program": [ + "from sympy import *\nprint(primefactors(762354))" + ], + "Output Answer": [ + "[2, 3, 41, 1033]" + ], + "split": "train" + }, + { + "Input": "Let z(s) = -48*s**2 - 462*s - 9. Let v be z(-9). Let h be ((-58)/(-8))/((-1)/(-4)). Calculate the highest common factor of h and v.", + "Output Program": [ + "from sympy import *\nh = ((-58)/(-8))/((-1)/(-4))\ns = symbols(\"s\")\ndef z(s):\n\treturn -48*s**2 - 462*s - 9\nv = z(-9)\nprint(gcd(h, v))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Let b = 31 - 27. Suppose -5 = -2*p - t + 35, 2*p = -b*t + 46. What is the highest common factor of 152 and p?", + "Output Program": [ + "from sympy import *\nb = 31 - 27\np, t = symbols(\"p t\")\np = solve([Eq(-5, -2*p - t + 35), Eq(2*p, -b*t + 46)])[p]\nprint(gcd(152, p))" + ], + "Output Answer": [ + "19" + ], + "split": "train" + }, + { + "Input": "Suppose 4*f - 8*f = 2*x + 2, -4*f = -2*x + 14. Suppose 2*s - 4*c - 876 = 0, 4*s - 8*c = -x*c + 1761. Let n = s + -294. What is the units digit of n?", + "Output Program": [ + "from sympy import *\nx, f = symbols(\"x f\")\nx = solve([Eq(4*f - 8*f, 2*x + 2), Eq(-4*f, -2*x + 14)])[x]\ns, c = symbols(\"s c\")\ns = solve([Eq(2*s - 4*c - 876, 0), Eq(4*s - 8*c, -x*c + 1761)])[s]\nn = s + -294\ndigit = int(str(int(150))[2])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "Is 1109473 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(1109473))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 3121 is divided by 3035.", + "Output Program": [ + "from sympy import *\nprint(3121 % 3035)" + ], + "Output Answer": [ + "86" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 6079632?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(6079632))[6])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 1632?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1632))[3])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Let u = 79 - -15. Suppose 0*p = -4*p + 4*t + 56, 0 = -5*p - t + u. Is 4/6 - ((-5124)/p)/2 a prime number?", + "Output Program": [ + "from sympy import *\nu = 79 - -15\np, t = symbols(\"p t\")\np = solve([Eq(0*p, -4*p + 4*t + 56), Eq(0, -5*p - t + u)])[p]\nd = 4/6 - ((-5124)/p)/2\nprint(isprime(143))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the tens digit of (-6)/51 + 13368/51?", + "Output Program": [ + "from sympy import *\nt = (-6)/51 + 13368/51\ndigit = int(str(int(262))[1])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "train" + }, + { + "Input": "Let c = 1 - -80. Calculate the remainder when c is divided by 12.", + "Output Program": [ + "from sympy import *\nc = 1 - -80\nprint(c % 12)" + ], + "Output Answer": [ + "9" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 8158 is divided by 51?", + "Output Program": [ + "from sympy import *\nprint(8158 % 51)" + ], + "Output Answer": [ + "49" + ], + "split": "train" + }, + { + "Input": "Let n(w) be the first derivative of 15/2*w**2 - 1/3*w**3 + 6 - w. What are the prime factors of n(6)?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef k(w):\n\treturn 15/2*w**2 - 1/3*w**3 + 6 - w\ndef n(val):\n\treturn diff(15/2*w**2 - 1/3*w**3 + 6 - w, w, 1).subs(w, val)\nl = n(6)\nprint(primefactors(53))" + ], + "Output Answer": [ + "[53]" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 30398127 is divided by 1470?", + "Output Program": [ + "from sympy import *\nprint(30398127 % 1470)" + ], + "Output Answer": [ + "1467" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 203426.", + "Output Program": [ + "from sympy import *\nprint(primefactors(203426))" + ], + "Output Answer": [ + "[2, 37, 2749]" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 28/2*(-3)/(-6)?", + "Output Program": [ + "from sympy import *\nk = 28/2*(-3)/(-6)\ndigit = int(str(int(7))[0])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 832341535.", + "Output Program": [ + "from sympy import *\nprint(primefactors(832341535))" + ], + "Output Answer": [ + "[5, 479, 347533]" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 177585 is divided by 621?", + "Output Program": [ + "from sympy import *\nprint(177585 % 621)" + ], + "Output Answer": [ + "600" + ], + "split": "train" + }, + { + "Input": "Is 649 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(649))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let o = -274 + 379. Let h be (o/140)/((-6)/(-64)). What is the highest common factor of 196 and h?", + "Output Program": [ + "from sympy import *\no = -274 + 379\nh = (o/140)/((-6)/(-64))\nprint(gcd(196, h))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Suppose 0 = 5*o - s + 174, 3*s - 14 = -2. Let j = 26 + o. Let v be ((-12)/21)/(j/140). What is the highest common factor of v and 80?", + "Output Program": [ + "from sympy import *\no, s = symbols(\"o s\")\no = solve([Eq(0, 5*o - s + 174), Eq(3*s - 14, -2)])[o]\nj = 26 + o\nv = ((-12)/21)/(j/140)\nprint(gcd(v, 80))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "train" + }, + { + "Input": "Suppose x + 1624 = 5*t, -6 + 3 = -3*x. Suppose 3*h - 2*i - 3*i = t, -587 = -5*h - 3*i. List the prime factors of h.", + "Output Program": [ + "from sympy import *\nt, x = symbols(\"t x\")\nt = solve([Eq(x + 1624, 5*t), Eq(-6 + 3, -3*x)])[t]\nh, i = symbols(\"h i\")\nh = solve([Eq(3*h - 2*i - 3*i, t), Eq(-587, -5*h - 3*i)])[h]\nprint(primefactors(115))" + ], + "Output Answer": [ + "[5, 23]" + ], + "split": "train" + }, + { + "Input": "Let h(j) = -3*j**2 - 27*j - 18. Let d be h(-8). Let g(n) = 22*n + 11. Let r be g(5). Let x = r - d. What are the prime factors of x?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef g(n):\n\treturn 22*n + 11\nr = g(5)\nj = symbols(\"j\")\ndef h(j):\n\treturn -3*j**2 - 27*j - 18\nd = h(-8)\nx = r - d\nprint(primefactors(115))" + ], + "Output Answer": [ + "[5, 23]" + ], + "split": "train" + }, + { + "Input": "Let d be 16272/40 - 8/10. Let p = 3225 + d. Is p a prime number?", + "Output Program": [ + "from sympy import *\nd = 16272/40 - 8/10\np = 3225 + d\nprint(isprime(3631))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Is 943372361 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(943372361))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Is 2470245139 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(2470245139))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -z + 3*a + 1 = -13, -2*z = 2*a - 28. Calculate the remainder when z is divided by 3.", + "Output Program": [ + "from sympy import *\nz, a = symbols(\"z a\")\nz = solve([Eq(-z + 3*a + 1, -13), Eq(-2*z, 2*a - 28)])[z]\nprint(z % 3)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "Suppose u = -4*a + 45561, 0 = u - 5*u - 4*a + 182244. Is u composite?", + "Output Program": [ + "from sympy import *\nu, a = symbols(\"u a\")\nu = solve([Eq(u, -4*a + 45561), Eq(0, u - 5*u - 4*a + 182244)])[u]\nprint(not isprime(45561))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -24*t = -733 - 6539. What is the units digit of t?", + "Output Program": [ + "from sympy import *\nt = symbols(\"t\")\nt = solve([Eq(-24*t, -733 - 6539)])[t]\ndigit = int(str(int(303))[2])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Is 3566473 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(3566473))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Does 67 divide 101808041?", + "Output Program": [ + "from sympy import *\nprint(101808041 % 67 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let r(y) = y**3 + 9*y**2 + 9*y - 8. What is the remainder when r(-7) is divided by 8?", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef r(y):\n\treturn y**3 + 9*y**2 + 9*y - 8\nd = r(-7)\nprint(d % 8)" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Let s = 1596 + -1585. What are the prime factors of s?", + "Output Program": [ + "from sympy import *\ns = 1596 + -1585\nprint(primefactors(11))" + ], + "Output Answer": [ + "[11]" + ], + "split": "train" + }, + { + "Input": "What is the remainder when 1949 is divided by 279?", + "Output Program": [ + "from sympy import *\nprint(1949 % 279)" + ], + "Output Answer": [ + "275" + ], + "split": "train" + }, + { + "Input": "Is 43947096643 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(43947096643))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let r(x) = x - 1. Let s(j) = 1 - 4*j. Let c(d) = -3*r(d) - s(d). What are the prime factors of c(1)?", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\ndef r(x):\n\treturn x - 1\nj = symbols(\"j\")\ndef s(j):\n\treturn 1 - 4*j\ndef c(d):\n\treturn -3*r(d) - s(d)\np = c(1)\nprint(primefactors(3))" + ], + "Output Answer": [ + "[3]" + ], + "split": "train" + }, + { + "Input": "Is 3234092177 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(3234092177))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let y = -2 - 1. What is the units digit of (-1)/y + (-35)/(-3)?", + "Output Program": [ + "from sympy import *\ny = -2 - 1\nu = (-1)/y + (-35)/(-3)\ndigit = int(str(int(12))[1])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "What is the hundreds digit of 1427?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1427))[1])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Let l = -162 + 227. Calculate the highest common divisor of 13 and l.", + "Output Program": [ + "from sympy import *\nl = -162 + 227\nprint(gcd(13, l))" + ], + "Output Answer": [ + "13" + ], + "split": "train" + }, + { + "Input": "Suppose 4*q + 4*a + a - 30 = 0, 0 = 2*q + 3*a - 16. Suppose -3*p + q + 4 = 0. What is the highest common divisor of p and 24?", + "Output Program": [ + "from sympy import *\nq, a = symbols(\"q a\")\nq = solve([Eq(4*q + 4*a + a - 30, 0), Eq(0, 2*q + 3*a - 16)])[q]\np = symbols(\"p\")\np = solve([Eq(-3*p + q + 4, 0)])[p]\nprint(gcd(p, 24))" + ], + "Output Answer": [ + "3" + ], + "split": "train" + }, + { + "Input": "Let b = 3281 - 2226. What is the units digit of b?", + "Output Program": [ + "from sympy import *\nb = 3281 - 2226\ndigit = int(str(int(1055))[3])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "Suppose -73803 = -5*u - 2*a, -u - 23*a + 14760 = -22*a. List the prime factors of u.", + "Output Program": [ + "from sympy import *\nu, a = symbols(\"u a\")\nu = solve([Eq(-73803, -5*u - 2*a), Eq(-u - 23*a + 14760, -22*a)])[u]\nprint(primefactors(14761))" + ], + "Output Answer": [ + "[29, 509]" + ], + "split": "train" + }, + { + "Input": "What is the hundred thousands digit of 52534232?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(52534232))[2])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 56511 and 144846.", + "Output Program": [ + "from sympy import *\nprint(gcd(56511, 144846))" + ], + "Output Answer": [ + "117" + ], + "split": "train" + }, + { + "Input": "Let h(c) = -3*c**3 - c**2 + 141*c + 90. Calculate the remainder when h(-12) is divided by 46.", + "Output Program": [ + "from sympy import *\nc = symbols(\"c\")\ndef h(c):\n\treturn -3*c**3 - c**2 + 141*c + 90\ni = h(-12)\nprint(i % 46)" + ], + "Output Answer": [ + "34" + ], + "split": "train" + }, + { + "Input": "What is the highest common factor of 2535 and 60?", + "Output Program": [ + "from sympy import *\nprint(gcd(2535, 60))" + ], + "Output Answer": [ + "15" + ], + "split": "train" + }, + { + "Input": "Is 34863737 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(34863737))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 1227.", + "Output Program": [ + "from sympy import *\nprint(primefactors(1227))" + ], + "Output Answer": [ + "[3, 409]" + ], + "split": "train" + }, + { + "Input": "Suppose 771 = 3*y - v - 1128, 0 = -y - 2*v + 633. What are the prime factors of y?", + "Output Program": [ + "from sympy import *\ny, v = symbols(\"y v\")\ny = solve([Eq(771, 3*y - v - 1128), Eq(0, -y - 2*v + 633)])[y]\nprint(primefactors(633))" + ], + "Output Answer": [ + "[3, 211]" + ], + "split": "train" + }, + { + "Input": "Does 574 divide 2918509?", + "Output Program": [ + "from sympy import *\nprint(2918509 % 574 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the units digit of 1110?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1110))[3])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "train" + }, + { + "Input": "Let v be 174/15 - 12/(-30). Suppose v*t - 1465 = 7*t. Is t a prime number?", + "Output Program": [ + "from sympy import *\nv = 174/15 - 12/(-30)\nt = symbols(\"t\")\nt = solve([Eq(v*t - 1465, 7*t)])[t]\nprint(isprime(293))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let w(v) = 12 - v. Let l be w(8). Let j be -1 - (7 - l) - -1. Let x = 14 - j. What are the prime factors of x?", + "Output Program": [ + "from sympy import *\nv = symbols(\"v\")\ndef w(v):\n\treturn 12 - v\nl = w(8)\nj = -1 - (7 - l) - -1\nx = 14 - j\nprint(primefactors(17))" + ], + "Output Answer": [ + "[17]" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 5127/12 + ((-85)/20 - -5).", + "Output Program": [ + "from sympy import *\nl = 5127/12 + ((-85)/20 - -5)\nprint(primefactors(428))" + ], + "Output Answer": [ + "[2, 107]" + ], + "split": "train" + }, + { + "Input": "Is 26546173 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(26546173))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 3903?", + "Output Program": [ + "from sympy import *\nprint(primefactors(3903))" + ], + "Output Answer": [ + "[3, 1301]" + ], + "split": "train" + }, + { + "Input": "Let f(u) = -2*u**3 + 11*u**2 + 8*u + 2. Suppose 3*p - 265 = -2*p. Calculate the remainder when p is divided by f(6).", + "Output Program": [ + "from sympy import *\np = symbols(\"p\")\np = solve([Eq(3*p - 265, -2*p)])[p]\nu = symbols(\"u\")\ndef f(u):\n\treturn -2*u**3 + 11*u**2 + 8*u + 2\ny = f(6)\nprint(p % y)" + ], + "Output Answer": [ + "11" + ], + "split": "train" + }, + { + "Input": "What is the thousands digit of 1545?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1545))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 2694514 is divided by 9910.", + "Output Program": [ + "from sympy import *\nprint(2694514 % 9910)" + ], + "Output Answer": [ + "8904" + ], + "split": "train" + }, + { + "Input": "Let n(q) = 0 - 5 + 5*q + 0. Let k be n(6). Suppose -2458 = -273*f + 4367. What is the highest common factor of f and k?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\nf = solve([Eq(-2458, -273*f + 4367)])[f]\nq = symbols(\"q\")\ndef n(q):\n\treturn 0 - 5 + 5*q + 0\nk = n(6)\nprint(gcd(f, k))" + ], + "Output Answer": [ + "25" + ], + "split": "train" + }, + { + "Input": "Does 985 divide 105280740?", + "Output Program": [ + "from sympy import *\nprint(105280740 % 985 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Suppose -3*n = 3*y - 18, -7*y - 10 = -5*n - 2*y. Suppose -n*m + 404 = -260. Does 22 divide m?", + "Output Program": [ + "from sympy import *\nn, y = symbols(\"n y\")\nn = solve([Eq(-3*n, 3*y - 18), Eq(-7*y - 10, -5*n - 2*y)])[n]\nm = symbols(\"m\")\nm = solve([Eq(-n*m + 404, -260)])[m]\nprint(166 % 22 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose 5*d = -f + 14817, 10387 + 4409 = 5*d - 2*f. Calculate the remainder when d is divided by 90.", + "Output Program": [ + "from sympy import *\nd, f = symbols(\"d f\")\nd = solve([Eq(5*d, -f + 14817), Eq(10387 + 4409, 5*d - 2*f)])[d]\nprint(d % 90)" + ], + "Output Answer": [ + "82" + ], + "split": "train" + }, + { + "Input": "What is the ten thousands digit of 771982370?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(771982370))[4])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 6150958 is divided by 2801.", + "Output Program": [ + "from sympy import *\nprint(6150958 % 2801)" + ], + "Output Answer": [ + "2763" + ], + "split": "train" + }, + { + "Input": "Let k(j) = 4*j**2 - j + 713. Let v be k(0). Suppose g = 17 - 1. Suppose -x + v = 3*f, 0 = -3*f - f + g. Is x composite?", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\ndef k(j):\n\treturn 4*j**2 - j + 713\nv = k(0)\ng = symbols(\"g\")\ng = solve([Eq(g, 17 - 1)])[g]\nx, f = symbols(\"x f\")\nx = solve([Eq(-x + v, 3*f), Eq(0, -3*f - f + g)])[x]\nprint(not isprime(701))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 9762903?", + "Output Program": [ + "from sympy import *\nprint(primefactors(9762903))" + ], + "Output Answer": [ + "[3, 19, 19031]" + ], + "split": "train" + }, + { + "Input": "Let p(k) = k + 11. Let i be p(9). Suppose -556*f + 559*f - 90 = 0. Calculate the highest common divisor of i and f.", + "Output Program": [ + "from sympy import *\nk = symbols(\"k\")\ndef p(k):\n\treturn k + 11\ni = p(9)\nf = symbols(\"f\")\nf = solve([Eq(-556*f + 559*f - 90, 0)])[f]\nprint(gcd(i, f))" + ], + "Output Answer": [ + "10" + ], + "split": "train" + }, + { + "Input": "Let v(r) = 583*r + 35. What are the prime factors of v(6)?", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\ndef v(r):\n\treturn 583*r + 35\nx = v(6)\nprint(primefactors(3533))" + ], + "Output Answer": [ + "[3533]" + ], + "split": "train" + }, + { + "Input": "Does 1023 divide 1326482?", + "Output Program": [ + "from sympy import *\nprint(1326482 % 1023 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "What is the thousands digit of 13628877?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(13628877))[4])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "What are the prime factors of 544170?", + "Output Program": [ + "from sympy import *\nprint(primefactors(544170))" + ], + "Output Answer": [ + "[2, 3, 5, 11, 17, 97]" + ], + "split": "train" + }, + { + "Input": "Let q = -0.4 + 0.3. Let t = -0.3 - -0.2. Let u = 0.1 + t. Do q and u have different values?", + "Output Program": [ + "from sympy import *\nq = -0.4 + 0.3\nt = -0.3 - -0.2\nu = 0.1 + t\nprint(q != u)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Does 1063 divide 149462015?", + "Output Program": [ + "from sympy import *\nprint(149462015 % 1063 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Let y = 1379 - 748. Is y composite?", + "Output Program": [ + "from sympy import *\ny = 1379 - 748\nprint(not isprime(631))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose -3*t + 2*k = -28, 4*t - 4*k + 2*k - 34 = 0. Suppose t*c = 9*c - 84. What is the units digit of c?", + "Output Program": [ + "from sympy import *\nt, k = symbols(\"t k\")\nt = solve([Eq(-3*t + 2*k, -28), Eq(4*t - 4*k + 2*k - 34, 0)])[t]\nc = symbols(\"c\")\nc = solve([Eq(t*c, 9*c - 84)])[c]\ndigit = int(str(int(28))[1])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "train" + }, + { + "Input": "Let c(i) be the second derivative of 2*i**3/3 - i**2/2 + 2*i. Let d be c(6). Let o be (0 - -1 - 0)*115. Calculate the greatest common divisor of o and d.", + "Output Program": [ + "from sympy import *\no = (0 - -1 - 0)*115\ni = symbols(\"i\")\ndef j(i):\n\treturn 2*i**3/3 - i**2/2 + 2*i\ndef c(val):\n\treturn diff(2*i**3/3 - i**2/2 + 2*i, i, 2).subs(i, val)\nd = c(6)\nprint(gcd(o, d))" + ], + "Output Answer": [ + "23" + ], + "split": "train" + }, + { + "Input": "Let f be (15/(-2))/(6/(-4)). Suppose -591 = -f*g + 994. Is g prime?", + "Output Program": [ + "from sympy import *\nf = (15/(-2))/(6/(-4))\ng = symbols(\"g\")\ng = solve([Eq(-591, -f*g + 994)])[g]\nprint(isprime(317))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 1197 and 66519.", + "Output Program": [ + "from sympy import *\nprint(gcd(1197, 66519))" + ], + "Output Answer": [ + "171" + ], + "split": "train" + }, + { + "Input": "What is the greatest common divisor of 1132 and 243346040?", + "Output Program": [ + "from sympy import *\nprint(gcd(1132, 243346040))" + ], + "Output Answer": [ + "1132" + ], + "split": "train" + }, + { + "Input": "Is 562201 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(562201))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Let u be 0 + (-3 - 3*-2). Let a(d) = -1 + 99*d**2 + u*d - 2*d - 19*d**2. Is a(-2) a prime number?", + "Output Program": [ + "from sympy import *\nu = 0 + (-3 - 3*-2)\nd = symbols(\"d\")\ndef a(d):\n\treturn -1 + 99*d**2 + u*d - 2*d - 19*d**2\nn = a(-2)\nprint(isprime(317))" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Is 26929 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(26929))" + ], + "Output Answer": [ + "False" + ], + "split": "train" + }, + { + "Input": "Suppose 3*n + 3*y - 2*y = 512, 2*n - 4*y = 332. Let p = n + -165. Calculate the remainder when 47 is divided by p.", + "Output Program": [ + "from sympy import *\nn, y = symbols(\"n y\")\nn = solve([Eq(3*n + 3*y - 2*y, 512), Eq(2*n - 4*y, 332)])[n]\np = n + -165\nprint(47 % p)" + ], + "Output Answer": [ + "2" + ], + "split": "train" + }, + { + "Input": "List the prime factors of 9/15 - (-548)/20.", + "Output Program": [ + "from sympy import *\na = 9/15 - (-548)/20\nprint(primefactors(28))" + ], + "Output Answer": [ + "[2, 7]" + ], + "split": "train" + }, + { + "Input": "What is the units digit of (-4)/(3/(6/(-2)))?", + "Output Program": [ + "from sympy import *\ni = (-4)/(3/(6/(-2)))\ndigit = int(str(int(4))[0])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "train" + }, + { + "Input": "Let i be (3 - 1)*-1 - -49. Let v = -34 + i. Does 13 divide v?", + "Output Program": [ + "from sympy import *\ni = (3 - 1)*-1 - -49\nv = -34 + i\nprint(13 % 13 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "train" + }, + { + "Input": "Calculate the highest common factor of 2641000 and 1710.", + "Output Program": [ + "from sympy import *\nprint(gcd(2641000, 1710))" + ], + "Output Answer": [ + "190" + ], + "split": "train" + }, + { + "Input": "Calculate the remainder when 470 is divided by 142.", + "Output Program": [ + "from sympy import *\nprint(470 % 142)" + ], + "Output Answer": [ + "44" + ], + "split": "train" + }, + { + "Input": "What is the greatest common divisor of 1691354 and 98?", + "Output Program": [ + "from sympy import *\nprint(gcd(1691354, 98))" + ], + "Output Answer": [ + "14" + ], + "split": "train" + }, + { + "Input": "Let q(l) = l**2 + 9*l - 15. Let u be q(5). Calculate the highest common factor of u and 10.", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef q(l):\n\treturn l**2 + 9*l - 15\nu = q(5)\nprint(gcd(u, 10))" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "List the prime factors of (1 - (2 - 2))/((-48)/(-607392)).", + "Output Program": [ + "from sympy import *\nk = (1 - (2 - 2))/((-48)/(-607392))\nprint(primefactors(12654))" + ], + "Output Answer": [ + "[2, 3, 19, 37]" + ], + "split": "dev" + }, + { + "Input": "What is the hundreds digit of 56716?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(56716))[2])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "dev" + }, + { + "Input": "Suppose 3*j - 1528 = -f - j, 5*f = 2*j + 7552. Suppose 0 = -38*a + 46*a - f. Does 11 divide a?", + "Output Program": [ + "from sympy import *\nf, j = symbols(\"f j\")\nf = solve([Eq(3*j - 1528, -f - j), Eq(5*f, 2*j + 7552)])[f]\na = symbols(\"a\")\na = solve([Eq(0, -38*a + 46*a - f)])[a]\nprint(189 % 11 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Suppose -4*b - 4*s + 1942 = 42, 487 = b + 5*s. Suppose -2*x = -0*x - 3*u - 313, -3*x + 5*u = -b. Is x prime?", + "Output Program": [ + "from sympy import *\nb, s = symbols(\"b s\")\nb = solve([Eq(-4*b - 4*s + 1942, 42), Eq(487, b + 5*s)])[b]\nx, u = symbols(\"x u\")\nx = solve([Eq(-2*x, -0*x - 3*u - 313), Eq(-3*x + 5*u, -b)])[x]\nprint(isprime(149))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "What is the ten thousands digit of 578592711?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(578592711))[4])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "dev" + }, + { + "Input": "Let l be 492/36 + 1/3. Let h = -10 + l. Suppose h*x = -734 + 2218. Is x prime?", + "Output Program": [ + "from sympy import *\nl = 492/36 + 1/3\nh = -10 + l\nx = symbols(\"x\")\nx = solve([Eq(h*x, -734 + 2218)])[x]\nprint(isprime(371))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Let f(d) = 10*d**2 - 120*d + 94. List the prime factors of f(-21).", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\ndef f(d):\n\treturn 10*d**2 - 120*d + 94\nj = f(-21)\nprint(primefactors(7024))" + ], + "Output Answer": [ + "[2, 439]" + ], + "split": "dev" + }, + { + "Input": "Let k be ((-6)/(-9))/((-4)/6). Let t = 7 - k. What are the prime factors of t?", + "Output Program": [ + "from sympy import *\nk = ((-6)/(-9))/((-4)/6)\nt = 7 - k\nprint(primefactors(8))" + ], + "Output Answer": [ + "[2]" + ], + "split": "dev" + }, + { + "Input": "Let y(r) = -11*r**3 - r**2 - r. What is the units digit of y(-1)?", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\ndef y(r):\n\treturn -11*r**3 - r**2 - r\ns = y(-1)\ndigit = int(str(int(11))[1])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Let c = -13 - -5. What is the units digit of 55 + -6*(-4)/c?", + "Output Program": [ + "from sympy import *\nc = -13 - -5\nb = 55 + -6*(-4)/c\ndigit = int(str(int(52))[1])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "List the prime factors of 2487591.", + "Output Program": [ + "from sympy import *\nprint(primefactors(2487591))" + ], + "Output Answer": [ + "[3, 29, 353]" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 1418024?", + "Output Program": [ + "from sympy import *\nprint(primefactors(1418024))" + ], + "Output Answer": [ + "[2, 157, 1129]" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 27805 is divided by 31?", + "Output Program": [ + "from sympy import *\nprint(27805 % 31)" + ], + "Output Answer": [ + "29" + ], + "split": "dev" + }, + { + "Input": "Let k be -1*250/(-65) - 2/(-13). Suppose 0 = -o + 4*p + 57, -k*o + p - 5*p + 228 = 0. Calculate the remainder when o is divided by 6.", + "Output Program": [ + "from sympy import *\nk = -1*250/(-65) - 2/(-13)\no, p = symbols(\"o p\")\no = solve([Eq(0, -o + 4*p + 57), Eq(-k*o + p - 5*p + 228, 0)])[o]\nprint(o % 6)" + ], + "Output Answer": [ + "3.00000000000000" + ], + "split": "dev" + }, + { + "Input": "Let s be ((-16)/6)/((-30)/225). Calculate the greatest common factor of 30 and s.", + "Output Program": [ + "from sympy import *\ns = ((-16)/6)/((-30)/225)\nprint(gcd(30, s))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "dev" + }, + { + "Input": "Is 15757 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(15757))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Is 40063 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(40063))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Suppose -f - 3*x = 2*x - 6, 0 = 4*f - 5*x + 26. Let s(z) = -6*z**3 - 5*z**2 + 2. Calculate the remainder when s(f) is divided by 11.", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\ndef s(z):\n\treturn -6*z**3 - 5*z**2 + 2\nf, x = symbols(\"f x\")\nf = solve([Eq(-f - 3*x, 2*x - 6), Eq(0, 4*f - 5*x + 26)])[f]\no = s(f)\nprint(o % 11)" + ], + "Output Answer": [ + "9" + ], + "split": "dev" + }, + { + "Input": "Calculate the highest common factor of 8628417 and 1988.", + "Output Program": [ + "from sympy import *\nprint(gcd(8628417, 1988))" + ], + "Output Answer": [ + "497" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 3999380 is divided by 1209.", + "Output Program": [ + "from sympy import *\nprint(3999380 % 1209)" + ], + "Output Answer": [ + "8" + ], + "split": "dev" + }, + { + "Input": "What is the tens digit of 976?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(976))[1])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "dev" + }, + { + "Input": "Suppose -5*q + 4 = -2*u - 2, 4*q + 2 = 5*u. Let s(y) be the first derivative of y**3 + 3*y**2/2 - 3*y + 1. What are the prime factors of s(u)?", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef t(y):\n\treturn y**3 + 3*y**2/2 - 3*y + 1\ndef s(val):\n\treturn diff(y**3 + 3*y**2/2 - 3*y + 1, y, 1).subs(y, val)\nu, q = symbols(\"u q\")\nu = solve([Eq(-5*q + 4, -2*u - 2), Eq(4*q + 2, 5*u)])[u]\nw = s(u)\nprint(primefactors(15))" + ], + "Output Answer": [ + "[3, 5]" + ], + "split": "dev" + }, + { + "Input": "Does 50 divide 6359016?", + "Output Program": [ + "from sympy import *\nprint(6359016 % 50 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What is the thousands digit of 1524?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1524))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Does 17 divide 3944497?", + "Output Program": [ + "from sympy import *\nprint(3944497 % 17 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 278823?", + "Output Program": [ + "from sympy import *\nprint(primefactors(278823))" + ], + "Output Answer": [ + "[3, 92941]" + ], + "split": "dev" + }, + { + "Input": "List the prime factors of 118146.", + "Output Program": [ + "from sympy import *\nprint(primefactors(118146))" + ], + "Output Answer": [ + "[2, 3, 7, 29, 97]" + ], + "split": "dev" + }, + { + "Input": "Let v = -9 - -14. Suppose -m - 7*p + 2*p = v, -10 = 5*p. Suppose 3*y = 5*a - 9, a = -3*y + 14 - m. Calculate the greatest common factor of 27 and a.", + "Output Program": [ + "from sympy import *\nv = -9 - -14\nm, p = symbols(\"m p\")\nm = solve([Eq(-m - 7*p + 2*p, v), Eq(-10, 5*p)])[m]\na, y = symbols(\"a y\")\na = solve([Eq(3*y, 5*a - 9), Eq(a, -3*y + 14 - m)])[a]\nprint(gcd(27, a))" + ], + "Output Answer": [ + "3" + ], + "split": "dev" + }, + { + "Input": "Let n(p) = p**3 - 2*p**2 - 24*p - 2. Let s be n(6). What is the hundreds digit of s/(-6) + 4 + 7794/27?", + "Output Program": [ + "from sympy import *\np = symbols(\"p\")\ndef n(p):\n\treturn p**3 - 2*p**2 - 24*p - 2\ns = n(6)\ni = s/(-6) + 4 + 7794/27\ndigit = int(str(int(293))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 76147644?", + "Output Program": [ + "from sympy import *\nprint(primefactors(76147644))" + ], + "Output Answer": [ + "[2, 3, 53, 67, 1787]" + ], + "split": "dev" + }, + { + "Input": "Let l(a) = 56*a**3 + a**2 - 2*a + 2. List the prime factors of l(2).", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\ndef l(a):\n\treturn 56*a**3 + a**2 - 2*a + 2\nh = l(2)\nprint(primefactors(450))" + ], + "Output Answer": [ + "[2, 3, 5]" + ], + "split": "dev" + }, + { + "Input": "Suppose 3*q = 69 + 45. What is the greatest common factor of q and 19?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\nq = solve([Eq(3*q, 69 + 45)])[q]\nprint(gcd(q, 19))" + ], + "Output Answer": [ + "19" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 93 is divided by (-62)/(-4) + 4/8?", + "Output Program": [ + "from sympy import *\ni = (-62)/(-4) + 4/8\nprint(93 % i)" + ], + "Output Answer": [ + "13.0" + ], + "split": "dev" + }, + { + "Input": "What is the thousands digit of 207596?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(207596))[2])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "dev" + }, + { + "Input": "What is the hundreds digit of 4667510?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(4667510))[4])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "Calculate the highest common divisor of 2649455 and 1670.", + "Output Program": [ + "from sympy import *\nprint(gcd(2649455, 1670))" + ], + "Output Answer": [ + "835" + ], + "split": "dev" + }, + { + "Input": "Suppose 0 = 27*w - 131247 - 177498. What is the hundreds digit of w?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\nw = solve([Eq(0, 27*w - 131247 - 177498)])[w]\ndigit = int(str(int(11435))[2])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "dev" + }, + { + "Input": "Suppose -4*k + 12 = 0, 2*k = 4*p + p - 19. What is the units digit of ((-2)/6)/(p/(-105))?", + "Output Program": [ + "from sympy import *\np, k = symbols(\"p k\")\np = solve([Eq(-4*k + 12, 0), Eq(2*k, 4*p + p - 19)])[p]\nc = ((-2)/6)/(p/(-105))\ndigit = int(str(int(7))[0])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 161 is divided by 59.", + "Output Program": [ + "from sympy import *\nprint(161 % 59)" + ], + "Output Answer": [ + "43" + ], + "split": "dev" + }, + { + "Input": "Let k(q) = 4*q**2 + 3*q + 6. Is k(5) a prime number?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef k(q):\n\treturn 4*q**2 + 3*q + 6\no = k(5)\nprint(isprime(121))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Suppose -4*m + 154 = -0*m + 5*w, 2*m - 74 = -4*w. Suppose 11*k = k + 210. What is the remainder when m is divided by k?", + "Output Program": [ + "from sympy import *\nm, w = symbols(\"m w\")\nm = solve([Eq(-4*m + 154, -0*m + 5*w), Eq(2*m - 74, -4*w)])[m]\nk = symbols(\"k\")\nk = solve([Eq(11*k, k + 210)])[k]\nprint(m % k)" + ], + "Output Answer": [ + "20" + ], + "split": "dev" + }, + { + "Input": "Let j(g) = -38*g - 3. Let x be j(-3). Suppose -3*t + 522 = x. Let q = -78 + t. Is q a prime number?", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ndef j(g):\n\treturn -38*g - 3\nx = j(-3)\nt = symbols(\"t\")\nt = solve([Eq(-3*t + 522, x)])[t]\nq = -78 + t\nprint(isprime(59))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Suppose 0 = 3*r - 2*l - 15, 2*l + 3 = -r - 0. Let v(w) = 2*w**3 + 7*w**2 - 29*w - 46. Let o be v(-5). Calculate the highest common divisor of r and o.", + "Output Program": [ + "from sympy import *\nr, l = symbols(\"r l\")\nr = solve([Eq(0, 3*r - 2*l - 15), Eq(2*l + 3, -r - 0)])[r]\nw = symbols(\"w\")\ndef v(w):\n\treturn 2*w**3 + 7*w**2 - 29*w - 46\no = v(-5)\nprint(gcd(r, o))" + ], + "Output Answer": [ + "3" + ], + "split": "dev" + }, + { + "Input": "What is the hundreds digit of 2797190?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2797190))[4])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Let k(u) = -3*u - 10. Let y(n) = 4*n**2 - 7*n + 3. Calculate the remainder when y(5) is divided by k(-8).", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef y(n):\n\treturn 4*n**2 - 7*n + 3\nm = y(5)\nu = symbols(\"u\")\ndef k(u):\n\treturn -3*u - 10\nr = k(-8)\nprint(m % r)" + ], + "Output Answer": [ + "12" + ], + "split": "dev" + }, + { + "Input": "Suppose 0 = 4*v - 0*a + 2*a + 812, -16 = 4*a. Let g = 29 - v. Let j(k) = 3*k**2 - 15*k + 92. Let c be j(5). What is the highest common divisor of c and g?", + "Output Program": [ + "from sympy import *\nk = symbols(\"k\")\ndef j(k):\n\treturn 3*k**2 - 15*k + 92\nc = j(5)\nv, a = symbols(\"v a\")\nv = solve([Eq(0, 4*v - 0*a + 2*a + 812), Eq(-16, 4*a)])[v]\ng = 29 - v\nprint(gcd(c, g))" + ], + "Output Answer": [ + "46" + ], + "split": "dev" + }, + { + "Input": "Does 195 divide 306834840?", + "Output Program": [ + "from sympy import *\nprint(306834840 % 195 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Let o(w) = 19 - 18*w. What are the prime factors of o(-6)?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef o(w):\n\treturn 19 - 18*w\ny = o(-6)\nprint(primefactors(127))" + ], + "Output Answer": [ + "[127]" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 4083 is divided by 984.", + "Output Program": [ + "from sympy import *\nprint(4083 % 984)" + ], + "Output Answer": [ + "147" + ], + "split": "dev" + }, + { + "Input": "What is the ten thousands digit of 12657?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(12657))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 9692 is divided by 9678.", + "Output Program": [ + "from sympy import *\nprint(9692 % 9678)" + ], + "Output Answer": [ + "14" + ], + "split": "dev" + }, + { + "Input": "Let t(l) = 10*l - 108. Let a be t(11). Suppose -b + 13801 = -5*i, -28031 = -a*b + 3*i - 415. Is b prime?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef t(l):\n\treturn 10*l - 108\na = t(11)\nb, i = symbols(\"b i\")\nb = solve([Eq(-b + 13801, -5*i), Eq(-28031, -a*b + 3*i - 415)])[b]\nprint(isprime(13811))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What is the highest common factor of 1281 and 73479?", + "Output Program": [ + "from sympy import *\nprint(gcd(1281, 73479))" + ], + "Output Answer": [ + "21" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of ((-10)/20)/(281/282 + -1)?", + "Output Program": [ + "from sympy import *\no = ((-10)/20)/(281/282 + -1)\nprint(primefactors(141))" + ], + "Output Answer": [ + "[3, 47]" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 490009?", + "Output Program": [ + "from sympy import *\nprint(primefactors(490009))" + ], + "Output Answer": [ + "[13, 37693]" + ], + "split": "dev" + }, + { + "Input": "Let f = -2 - -20. Let u be (-4)/10*(-3 + f). What is the remainder when (u - -5)/((-2)/50) is divided by 9?", + "Output Program": [ + "from sympy import *\nf = -2 - -20\nu = (-4)/10*(-3 + f)\ny = (u - -5)/((-2)/50)\nprint(y % 9)" + ], + "Output Answer": [ + "7.0" + ], + "split": "dev" + }, + { + "Input": "What is the ten thousands digit of 229308?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(229308))[1])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 65718774?", + "Output Program": [ + "from sympy import *\nprint(primefactors(65718774))" + ], + "Output Answer": [ + "[2, 3, 11, 23, 14431]" + ], + "split": "dev" + }, + { + "Input": "Let u = 89 - 41. What is the remainder when u is divided by (-3)/(-9) + 100/6?", + "Output Program": [ + "from sympy import *\nu = 89 - 41\nw = (-3)/(-9) + 100/6\nprint(u % w)" + ], + "Output Answer": [ + "14.0" + ], + "split": "dev" + }, + { + "Input": "Let f(w) = -w**3 - 5*w**2 - 8*w - 3. Let v be (-6)/8 - 171/76. Let n be f(v). Let a(y) = 45*y - 1. Is a(n) a prime number?", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef a(y):\n\treturn 45*y - 1\nw = symbols(\"w\")\ndef f(w):\n\treturn -w**3 - 5*w**2 - 8*w - 3\nv = (-6)/8 - 171/76\nn = f(v)\nj = a(n)\nprint(isprime(134))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 5209062?", + "Output Program": [ + "from sympy import *\nprint(primefactors(5209062))" + ], + "Output Answer": [ + "[2, 3, 868177]" + ], + "split": "dev" + }, + { + "Input": "Let w be ((-45)/(-10) + -4)*8. Suppose 5*c = t + 2183, 0 = 5*c - w*c + 3*t - 443. What are the prime factors of c?", + "Output Program": [ + "from sympy import *\nw = ((-45)/(-10) + -4)*8\nc, t = symbols(\"c t\")\nc = solve([Eq(5*c, t + 2183), Eq(0, 5*c - w*c + 3*t - 443)])[c]\nprint(primefactors(437))" + ], + "Output Answer": [ + "[19, 23]" + ], + "split": "dev" + }, + { + "Input": "Let u = 553 + -178. Suppose 23*a = 18*a + u. List the prime factors of a.", + "Output Program": [ + "from sympy import *\nu = 553 + -178\na = symbols(\"a\")\na = solve([Eq(23*a, 18*a + u)])[a]\nprint(primefactors(75))" + ], + "Output Answer": [ + "[3, 5]" + ], + "split": "dev" + }, + { + "Input": "Suppose 4*q = -3*x + 7695, 0 = -3*q + 4*x + 6334 - 544. Calculate the remainder when q is divided by 248.", + "Output Program": [ + "from sympy import *\nq, x = symbols(\"q x\")\nq = solve([Eq(4*q, -3*x + 7695), Eq(0, -3*q + 4*x + 6334 - 544)])[q]\nprint(q % 248)" + ], + "Output Answer": [ + "190" + ], + "split": "dev" + }, + { + "Input": "Calculate the highest common divisor of 138 and 8211.", + "Output Program": [ + "from sympy import *\nprint(gcd(138, 8211))" + ], + "Output Answer": [ + "69" + ], + "split": "dev" + }, + { + "Input": "Calculate the greatest common factor of 314 and 22554463.", + "Output Program": [ + "from sympy import *\nprint(gcd(314, 22554463))" + ], + "Output Answer": [ + "157" + ], + "split": "dev" + }, + { + "Input": "Let u = -1865 - -10577. Suppose 10*s + 2*s = u. List the prime factors of s.", + "Output Program": [ + "from sympy import *\nu = -1865 - -10577\ns = symbols(\"s\")\ns = solve([Eq(10*s + 2*s, u)])[s]\nprint(primefactors(726))" + ], + "Output Answer": [ + "[2, 3, 11]" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 57786 is divided by 418?", + "Output Program": [ + "from sympy import *\nprint(57786 % 418)" + ], + "Output Answer": [ + "102" + ], + "split": "dev" + }, + { + "Input": "List the prime factors of 1033845353.", + "Output Program": [ + "from sympy import *\nprint(primefactors(1033845353))" + ], + "Output Answer": [ + "[1033845353]" + ], + "split": "dev" + }, + { + "Input": "Let t(n) = n**2 - 2*n - 11. What is the remainder when t(-6) is divided by 10?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef t(n):\n\treturn n**2 - 2*n - 11\nq = t(-6)\nprint(q % 10)" + ], + "Output Answer": [ + "7" + ], + "split": "dev" + }, + { + "Input": "Is 51691 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(51691))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Suppose 5*o - 2*z = 28, -3*o + 7 + 16 = 5*z. Let h be (-2 + -49)*(-5 + (5 - o)). Suppose 2*l - 306 = 4*n, 2*l = -0*l + 3*n + h. Does 33 divide l?", + "Output Program": [ + "from sympy import *\no, z = symbols(\"o z\")\no = solve([Eq(5*o - 2*z, 28), Eq(-3*o + 7 + 16, 5*z)])[o]\nh = (-2 + -49)*(-5 + (5 - o))\nl, n = symbols(\"l n\")\nl = solve([Eq(2*l - 306, 4*n), Eq(2*l, -0*l + 3*n + h)])[l]\nprint(153 % 33 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What is the units digit of 19122?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(19122))[4])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "Suppose -10*v = -563 + 133. What is the units digit of v?", + "Output Program": [ + "from sympy import *\nv = symbols(\"v\")\nv = solve([Eq(-10*v, -563 + 133)])[v]\ndigit = int(str(int(43))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "dev" + }, + { + "Input": "Let i(l) = l**2 + 9*l - 28. Let h be i(-12). Suppose 0 = -4*b + 242 + 366. What is the greatest common factor of h and b?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef i(l):\n\treturn l**2 + 9*l - 28\nh = i(-12)\nb = symbols(\"b\")\nb = solve([Eq(0, -4*b + 242 + 366)])[b]\nprint(gcd(h, b))" + ], + "Output Answer": [ + "8" + ], + "split": "dev" + }, + { + "Input": "What is the thousands digit of 3052544?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(3052544))[3])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "Is ((-1)/3)/((112/(-1164048))/7) a prime number?", + "Output Program": [ + "from sympy import *\nt = ((-1)/3)/((112/(-1164048))/7)\nprint(isprime(24251))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 86 is divided by 19?", + "Output Program": [ + "from sympy import *\nprint(86 % 19)" + ], + "Output Answer": [ + "10" + ], + "split": "dev" + }, + { + "Input": "Let n = 8 + -7. Let b(t) = -90*t + n + 10*t + 2*t. Is b(-1) a prime number?", + "Output Program": [ + "from sympy import *\nn = 8 + -7\nt = symbols(\"t\")\ndef b(t):\n\treturn -90*t + n + 10*t + 2*t\np = b(-1)\nprint(isprime(79))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "What is the ten thousands digit of 2321313?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2321313))[2])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "What is the thousands digit of 29209?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(29209))[1])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "dev" + }, + { + "Input": "What is the hundreds digit of 12580?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(12580))[2])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "What is the highest common factor of 80 and 3920?", + "Output Program": [ + "from sympy import *\nprint(gcd(80, 3920))" + ], + "Output Answer": [ + "80" + ], + "split": "dev" + }, + { + "Input": "Suppose 0 = -5*v + 40, 4*o = 10*o + 2*v - 193864. What is the tens digit of o?", + "Output Program": [ + "from sympy import *\no, v = symbols(\"o v\")\no = solve([Eq(0, -5*v + 40), Eq(4*o, 10*o + 2*v - 193864)])[o]\ndigit = int(str(int(32308))[3])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 2701487 is divided by 1636?", + "Output Program": [ + "from sympy import *\nprint(2701487 % 1636)" + ], + "Output Answer": [ + "451" + ], + "split": "dev" + }, + { + "Input": "Suppose -f + 442 = -169. What is the units digit of f?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\nf = solve([Eq(-f + 442, -169)])[f]\ndigit = int(str(int(611))[2])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 15981 is divided by 11.", + "Output Program": [ + "from sympy import *\nprint(15981 % 11)" + ], + "Output Answer": [ + "9" + ], + "split": "dev" + }, + { + "Input": "Let b be 572/3 + -3 + 12/9. Suppose -11*m + 2*m + b = 0. Calculate the remainder when 39 is divided by m.", + "Output Program": [ + "from sympy import *\nb = 572/3 + -3 + 12/9\nm = symbols(\"m\")\nm = solve([Eq(-11*m + 2*m + b, 0)])[m]\nprint(39 % m)" + ], + "Output Answer": [ + "18.0000000000000" + ], + "split": "dev" + }, + { + "Input": "Suppose 0 = 3*c + 9, 2*c + 9 = 3*a + c. Let u(w) = 2*w + 7. Let o be u(-5). Does 14 divide a + o + -1 - -26?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef u(w):\n\treturn 2*w + 7\no = u(-5)\na, c = symbols(\"a c\")\na = solve([Eq(0, 3*c + 9), Eq(2*c + 9, 3*a + c)])[a]\nj = a + o + -1 - -26\nprint(24 % 14 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Does 2140 divide 64097517?", + "Output Program": [ + "from sympy import *\nprint(64097517 % 2140 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What is the tens digit of 1350?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1350))[2])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "Suppose -13*r + 10*r + 153 = 0. What is the units digit of r?", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\nr = solve([Eq(-13*r + 10*r + 153, 0)])[r]\ndigit = int(str(int(51))[1])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Suppose 639 = -13*m + 67. What is the remainder when 46 is divided by m/(-11) + (7 - 0)?", + "Output Program": [ + "from sympy import *\nm = symbols(\"m\")\nm = solve([Eq(639, -13*m + 67)])[m]\nw = m/(-11) + (7 - 0)\nprint(46 % w)" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "Let m(d) = 8*d + 1. Let y(w) = 15*w + 2. Let u(a) = -5*m(a) + 3*y(a). Let l be u(1). Suppose -l = t + 2*t, -20 = -4*j - 2*t. What is the units digit of j?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef y(w):\n\treturn 15*w + 2\nd = symbols(\"d\")\ndef m(d):\n\treturn 8*d + 1\ndef u(a):\n\treturn -5*m(a) + 3*y(a)\nl = u(1)\nj, t = symbols(\"j t\")\nj = solve([Eq(-l, t + 2*t), Eq(-20, -4*j - 2*t)])[j]\ndigit = int(str(int(6))[0])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "dev" + }, + { + "Input": "Do -2/61 and -1 have different values?", + "Output Program": [ + "from sympy import *\nprint(-2/61 != -1)" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "What is the highest common factor of 24986542 and 280?", + "Output Program": [ + "from sympy import *\nprint(gcd(24986542, 280))" + ], + "Output Answer": [ + "14" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 873146 is divided by 124735.", + "Output Program": [ + "from sympy import *\nprint(873146 % 124735)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Suppose 2*c = 4*c - 10. Suppose -c*n + 1 + 29 = 0. Calculate the remainder when 2/(-6)*(-36 - -6) is divided by n.", + "Output Program": [ + "from sympy import *\nv = 2/(-6)*(-36 - -6)\nc = symbols(\"c\")\nc = solve([Eq(2*c, 4*c - 10)])[c]\nn = symbols(\"n\")\nn = solve([Eq(-c*n + 1 + 29, 0)])[n]\nprint(v % n)" + ], + "Output Answer": [ + "4.00000000000000" + ], + "split": "dev" + }, + { + "Input": "Suppose -a + 116 = 3*a. Let v = a + -45. What are the prime factors of 12*(-10)/v*4?", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\na = solve([Eq(-a + 116, 3*a)])[a]\nv = a + -45\np = 12*(-10)/v*4\nprint(primefactors(30))" + ], + "Output Answer": [ + "[2, 3, 5]" + ], + "split": "dev" + }, + { + "Input": "Suppose -5*p + d = -630, 3*d = -2*p + 5*p - 366. Is p prime?", + "Output Program": [ + "from sympy import *\np, d = symbols(\"p d\")\np = solve([Eq(-5*p + d, -630), Eq(3*d, -2*p + 5*p - 366)])[p]\nprint(isprime(127))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "What is the tens digit of 937238588?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(937238588))[7])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "dev" + }, + { + "Input": "What is the units digit of 27246575?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(27246575))[7])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "Let d(p) = -p**3 + 8*p**2 - 7*p - 34. Let l be d(6). Does 3 divide (1323/(-28) - (-1)/l)*-2?", + "Output Program": [ + "from sympy import *\np = symbols(\"p\")\ndef d(p):\n\treturn -p**3 + 8*p**2 - 7*p - 34\nl = d(6)\nz = (1323/(-28) - (-1)/l)*-2\nprint(95 % 3 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Let a(i) = 7*i**2 + 4*i + 2. What is the remainder when a(-3) is divided by 18?", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ndef a(i):\n\treturn 7*i**2 + 4*i + 2\nt = a(-3)\nprint(t % 18)" + ], + "Output Answer": [ + "17" + ], + "split": "dev" + }, + { + "Input": "Is 22289709457 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(22289709457))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Let a be 4/((-4)/2 - -4). Suppose 4*l = -a*l + 42. Calculate the greatest common divisor of l and 1.", + "Output Program": [ + "from sympy import *\na = 4/((-4)/2 - -4)\nl = symbols(\"l\")\nl = solve([Eq(4*l, -a*l + 42)])[l]\nprint(gcd(l, 1))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "dev" + }, + { + "Input": "Let a = 986 + -671. What is the tens digit of (-18)/7*a/(-15)?", + "Output Program": [ + "from sympy import *\na = 986 + -671\no = (-18)/7*a/(-15)\ndigit = int(str(int(54))[0])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "Calculate the greatest common divisor of 35 and 14.", + "Output Program": [ + "from sympy import *\nprint(gcd(35, 14))" + ], + "Output Answer": [ + "7" + ], + "split": "dev" + }, + { + "Input": "Calculate the greatest common factor of 16 and 71663.", + "Output Program": [ + "from sympy import *\nprint(gcd(16, 71663))" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Suppose -38*x + 31*x = -14. Is 4 - (-10858 + -7 + x) prime?", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\nx = solve([Eq(-38*x + 31*x, -14)])[x]\nj = 4 - (-10858 + -7 + x)\nprint(isprime(10867))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Is 27031987 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(27031987))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Let l be (-1*(4 + -5))/((-2)/2). Let m(h) = -5082*h - 5. Is m(l) a prime number?", + "Output Program": [ + "from sympy import *\nh = symbols(\"h\")\ndef m(h):\n\treturn -5082*h - 5\nl = (-1*(4 + -5))/((-2)/2)\nq = m(l)\nprint(isprime(5077))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Let u be -3 + 12/((-12)/(-3)). Let k = u + 17. Calculate the greatest common factor of k and 17.", + "Output Program": [ + "from sympy import *\nu = -3 + 12/((-12)/(-3))\nk = u + 17\nprint(gcd(k, 17))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 257747860?", + "Output Program": [ + "from sympy import *\nprint(primefactors(257747860))" + ], + "Output Answer": [ + "[2, 5, 223, 57791]" + ], + "split": "dev" + }, + { + "Input": "Is 34583 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(34583))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Let w(m) = m**3 + m**2 + 1. Let j(p) = 4*p**3 - 3*p**2 - 10*p + 12. Let c(f) = -j(f) + 3*w(f). What are the prime factors of c(7)?", + "Output Program": [ + "from sympy import *\nm = symbols(\"m\")\ndef w(m):\n\treturn m**3 + m**2 + 1\np = symbols(\"p\")\ndef j(p):\n\treturn 4*p**3 - 3*p**2 - 10*p + 12\ndef c(f):\n\treturn -j(f) + 3*w(f)\nt = c(7)\nprint(primefactors(12))" + ], + "Output Answer": [ + "[2, 3]" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 600 is divided by 300?", + "Output Program": [ + "from sympy import *\nprint(600 % 300)" + ], + "Output Answer": [ + "0" + ], + "split": "dev" + }, + { + "Input": "What is the hundreds digit of (5 - 1)/(1712/(-858) + 2)?", + "Output Program": [ + "from sympy import *\na = (5 - 1)/(1712/(-858) + 2)\ndigit = int(str(int(858))[0])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "dev" + }, + { + "Input": "Let i(b) = b**2 + b - 1. Let f(s) = 12*s + 1. Let g be f(1). Suppose 4*t + 8 = -5*y, y - 5*y = t + g. Does 10 divide i(y)?", + "Output Program": [ + "from sympy import *\nb = symbols(\"b\")\ndef i(b):\n\treturn b**2 + b - 1\ns = symbols(\"s\")\ndef f(s):\n\treturn 12*s + 1\ng = f(1)\ny, t = symbols(\"y t\")\ny = solve([Eq(4*t + 8, -5*y), Eq(y - 5*y, t + g)])[y]\nj = i(y)\nprint(11 % 10 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Let a(m) = -21*m - 2 + 1 - 2 - 57*m. Let x be a(-1). What is the highest common divisor of x and 50?", + "Output Program": [ + "from sympy import *\nm = symbols(\"m\")\ndef a(m):\n\treturn -21*m - 2 + 1 - 2 - 57*m\nx = a(-1)\nprint(gcd(x, 50))" + ], + "Output Answer": [ + "25" + ], + "split": "dev" + }, + { + "Input": "What is the highest common divisor of 40329536 and 611?", + "Output Program": [ + "from sympy import *\nprint(gcd(40329536, 611))" + ], + "Output Answer": [ + "13" + ], + "split": "dev" + }, + { + "Input": "Let u(v) = -v**3 + 10*v**2 - 7*v - 3. Let x be u(9). Calculate the highest common factor of x and 165.", + "Output Program": [ + "from sympy import *\nv = symbols(\"v\")\ndef u(v):\n\treturn -v**3 + 10*v**2 - 7*v - 3\nx = u(9)\nprint(gcd(x, 165))" + ], + "Output Answer": [ + "15" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 6524 is divided by 96?", + "Output Program": [ + "from sympy import *\nprint(6524 % 96)" + ], + "Output Answer": [ + "92" + ], + "split": "dev" + }, + { + "Input": "Suppose 0 = t - 3, 6*l = 11*l + 4*t - 232. Let z = l - -85. List the prime factors of z.", + "Output Program": [ + "from sympy import *\nl, t = symbols(\"l t\")\nl = solve([Eq(0, t - 3), Eq(6*l, 11*l + 4*t - 232)])[l]\nz = l - -85\nprint(primefactors(129))" + ], + "Output Answer": [ + "[3, 43]" + ], + "split": "dev" + }, + { + "Input": "Let h be ((-8)/(-3))/((-10)/(-15)). Let w be (0 + -2)/2 - -4. Suppose 4*y = 5*s + 84 - 33, -w*y + h*s = -39. List the prime factors of y.", + "Output Program": [ + "from sympy import *\nw = (0 + -2)/2 - -4\nh = ((-8)/(-3))/((-10)/(-15))\ny, s = symbols(\"y s\")\ny = solve([Eq(4*y, 5*s + 84 - 33), Eq(-w*y + h*s, -39)])[y]\nprint(primefactors(9))" + ], + "Output Answer": [ + "[3]" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 246 is divided by 12.", + "Output Program": [ + "from sympy import *\nprint(246 % 12)" + ], + "Output Answer": [ + "6" + ], + "split": "dev" + }, + { + "Input": "Let r(u) = -u**2 - 6*u - 4. Let j be (-4)/6*(-18)/(-4). Let z be r(j). List the prime factors of ((-30)/z)/((-3)/8).", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\ndef r(u):\n\treturn -u**2 - 6*u - 4\nj = (-4)/6*(-18)/(-4)\nz = r(j)\nx = ((-30)/z)/((-3)/8)\nprint(primefactors(16))" + ], + "Output Answer": [ + "[2]" + ], + "split": "dev" + }, + { + "Input": "Let v be (-1)/(1/(-84)) + -2. Suppose -2*q = 3*f - v, -56 = -2*f - 0*f - 2*q. List the prime factors of f.", + "Output Program": [ + "from sympy import *\nv = (-1)/(1/(-84)) + -2\nf, q = symbols(\"f q\")\nf = solve([Eq(-2*q, 3*f - v), Eq(-56, -2*f - 0*f - 2*q)])[f]\nprint(primefactors(26))" + ], + "Output Answer": [ + "[2, 13]" + ], + "split": "dev" + }, + { + "Input": "Calculate the greatest common divisor of 14 and 223654.", + "Output Program": [ + "from sympy import *\nprint(gcd(14, 223654))" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "Let g(o) = 2*o**2 - 26*o + 84. Let y be g(8). Suppose -2*n - 1031 = -l - 4*l, y*l = 2*n + 826. What is the remainder when l is divided by 31?", + "Output Program": [ + "from sympy import *\no = symbols(\"o\")\ndef g(o):\n\treturn 2*o**2 - 26*o + 84\ny = g(8)\nl, n = symbols(\"l n\")\nl = solve([Eq(-2*n - 1031, -l - 4*l), Eq(y*l, 2*n + 826)])[l]\nprint(l % 31)" + ], + "Output Answer": [ + "19" + ], + "split": "dev" + }, + { + "Input": "Suppose -3*r + 2090 = 2*r. Suppose -640 = 6*g - 868. Calculate the greatest common divisor of r and g.", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\nr = solve([Eq(-3*r + 2090, 2*r)])[r]\ng = symbols(\"g\")\ng = solve([Eq(-640, 6*g - 868)])[g]\nprint(gcd(r, g))" + ], + "Output Answer": [ + "38" + ], + "split": "dev" + }, + { + "Input": "Let p(f) be the third derivative of -f**4/24 + 13*f**3/6 - 2*f**2. Let b be p(13). Is -483*(b - 1) + -2 prime?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\ndef d(f):\n\treturn -f**4/24 + 13*f**3/6 - 2*f**2\ndef p(val):\n\treturn diff(-f**4/24 + 13*f**3/6 - 2*f**2, f, 3).subs(f, val)\nb = p(13)\ny = -483*(b - 1) + -2\nprint(isprime(481))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What is the ten thousands digit of 78436?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(78436))[0])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "dev" + }, + { + "Input": "Let p = 88 + -36. Suppose -24*c - 233 - 1231 = 0. Let s = p - c. What are the prime factors of s?", + "Output Program": [ + "from sympy import *\np = 88 + -36\nc = symbols(\"c\")\nc = solve([Eq(-24*c - 233 - 1231, 0)])[c]\ns = p - c\nprint(primefactors(113))" + ], + "Output Answer": [ + "[113]" + ], + "split": "dev" + }, + { + "Input": "Suppose 14293 = 96*c - 41483. What is the remainder when c is divided by 189?", + "Output Program": [ + "from sympy import *\nc = symbols(\"c\")\nc = solve([Eq(14293, 96*c - 41483)])[c]\nprint(c % 189)" + ], + "Output Answer": [ + "14" + ], + "split": "dev" + }, + { + "Input": "Calculate the greatest common divisor of 344984768 and 854.", + "Output Program": [ + "from sympy import *\nprint(gcd(344984768, 854))" + ], + "Output Answer": [ + "122" + ], + "split": "dev" + }, + { + "Input": "What is the greatest common divisor of 80348 and 583660?", + "Output Program": [ + "from sympy import *\nprint(gcd(80348, 583660))" + ], + "Output Answer": [ + "1516" + ], + "split": "dev" + }, + { + "Input": "What is the tens digit of 637?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(637))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "dev" + }, + { + "Input": "Is 340007 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(340007))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Is 754734823 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(754734823))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Suppose -j - 61 = -141. Is (j/(-200))/((-6)/50835) prime?", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\nj = solve([Eq(-j - 61, -141)])[j]\ni = (j/(-200))/((-6)/50835)\nprint(isprime(3389))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 173962 is divided by 1596.", + "Output Program": [ + "from sympy import *\nprint(173962 % 1596)" + ], + "Output Answer": [ + "1594" + ], + "split": "dev" + }, + { + "Input": "Let j(n) = -n**2 + 8*n - 7. Let c be j(6). Suppose -c*h + 130 = -0*h. Let i = 1219 - 1116. What is the remainder when i is divided by h?", + "Output Program": [ + "from sympy import *\ni = 1219 - 1116\nn = symbols(\"n\")\ndef j(n):\n\treturn -n**2 + 8*n - 7\nc = j(6)\nh = symbols(\"h\")\nh = solve([Eq(-c*h + 130, -0*h)])[h]\nprint(i % h)" + ], + "Output Answer": [ + "25" + ], + "split": "dev" + }, + { + "Input": "Is 10133 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(10133))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "What is the hundreds digit of 246519?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(246519))[3])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 439614?", + "Output Program": [ + "from sympy import *\nprint(primefactors(439614))" + ], + "Output Answer": [ + "[2, 3, 7, 1163]" + ], + "split": "dev" + }, + { + "Input": "Is 18389738399 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(18389738399))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 351 is divided by 204?", + "Output Program": [ + "from sympy import *\nprint(351 % 204)" + ], + "Output Answer": [ + "147" + ], + "split": "dev" + }, + { + "Input": "What is the hundreds digit of 973?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(973))[0])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "dev" + }, + { + "Input": "Let p = -6 - -9. Suppose 7*x = -1227 + 1241. Suppose -19 - 156 = -a - 2*k, p*a + x*k = 545. What is the hundreds digit of a?", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\nx = solve([Eq(7*x, -1227 + 1241)])[x]\np = -6 - -9\na, k = symbols(\"a k\")\na = solve([Eq(-19 - 156, -a - 2*k), Eq(p*a + x*k, 545)])[a]\ndigit = int(str(int(185))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Let w = -151 - -227. Let n be ((-81)/12 + (-6)/(-4))*4. Let z = w + n. What is the units digit of z?", + "Output Program": [ + "from sympy import *\nw = -151 - -227\nn = ((-81)/12 + (-6)/(-4))*4\nz = w + n\ndigit = int(str(int(55))[1])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "Let f = 14 + -8. Let y be (f/(-4))/((-15)/140). Suppose -y + 3 = -r. What are the prime factors of r?", + "Output Program": [ + "from sympy import *\nf = 14 + -8\ny = (f/(-4))/((-15)/140)\nr = symbols(\"r\")\nr = solve([Eq(-y + 3, -r)])[r]\nprint(primefactors(11))" + ], + "Output Answer": [ + "[11]" + ], + "split": "dev" + }, + { + "Input": "Is 28493*((-6)/(-18))/((-3)/(-9)) a prime number?", + "Output Program": [ + "from sympy import *\ns = 28493*((-6)/(-18))/((-3)/(-9))\nprint(isprime(28493))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Let k(h) = h + 15. What is the tens digit of k(12)?", + "Output Program": [ + "from sympy import *\nh = symbols(\"h\")\ndef k(h):\n\treturn h + 15\nx = k(12)\ndigit = int(str(int(27))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "dev" + }, + { + "Input": "Let q = 4 - -6. Let c = q + -7. Suppose 5*m - c*n = 85 - 25, 3*n + 51 = 4*m. What is the units digit of m?", + "Output Program": [ + "from sympy import *\nq = 4 - -6\nc = q + -7\nm, n = symbols(\"m n\")\nm = solve([Eq(5*m - c*n, 85 - 25), Eq(3*n + 51, 4*m)])[m]\ndigit = int(str(int(9))[0])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "dev" + }, + { + "Input": "Is 7984762343 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(7984762343))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Suppose 5*b + 24 = 11*b. Suppose b*l + 2*w = 20, -w = -2*l + 3*w. Suppose -4*y = -l*t - 592, 7 + 18 = -5*t. What is the hundreds digit of y?", + "Output Program": [ + "from sympy import *\nb = symbols(\"b\")\nb = solve([Eq(5*b + 24, 11*b)])[b]\nl, w = symbols(\"l w\")\nl = solve([Eq(b*l + 2*w, 20), Eq(-w, -2*l + 3*w)])[l]\ny, t = symbols(\"y t\")\ny = solve([Eq(-4*y, -l*t - 592), Eq(7 + 18, -5*t)])[y]\ndigit = int(str(int(143))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Let x = 57 - 27. What are the prime factors of x?", + "Output Program": [ + "from sympy import *\nx = 57 - 27\nprint(primefactors(30))" + ], + "Output Answer": [ + "[2, 3, 5]" + ], + "split": "dev" + }, + { + "Input": "Calculate the greatest common divisor of 60771 and 141.", + "Output Program": [ + "from sympy import *\nprint(gcd(60771, 141))" + ], + "Output Answer": [ + "141" + ], + "split": "dev" + }, + { + "Input": "Let n be (-1 - (-45)/35)*4263/42. Calculate the greatest common factor of n and 58.", + "Output Program": [ + "from sympy import *\nn = (-1 - (-45)/35)*4263/42\nprint(gcd(n, 58))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "dev" + }, + { + "Input": "Let x(f) = f**3 + 6*f**2 + 4*f - 5. Let y(z) = -5*z**2 - 3*z + 4. Let m(h) = 3*x(h) + 4*y(h). Let c be m(1). Is (2/4)/(c/316) prime?", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\ndef y(z):\n\treturn -5*z**2 - 3*z + 4\nf = symbols(\"f\")\ndef x(f):\n\treturn f**3 + 6*f**2 + 4*f - 5\ndef m(h):\n\treturn 3*x(h) + 4*y(h)\nc = m(1)\na = (2/4)/(c/316)\nprint(isprime(79))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 276 is divided by 98?", + "Output Program": [ + "from sympy import *\nprint(276 % 98)" + ], + "Output Answer": [ + "80" + ], + "split": "dev" + }, + { + "Input": "What is the units digit of 465?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(465))[2])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "dev" + }, + { + "Input": "What are the prime factors of 842?", + "Output Program": [ + "from sympy import *\nprint(primefactors(842))" + ], + "Output Answer": [ + "[2, 421]" + ], + "split": "dev" + }, + { + "Input": "Suppose 1002 - 982 = -m - 4*i, 61 = 3*m + i. Suppose 2*u = -3*u + 1000. What is the highest common divisor of u and m?", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\nu = solve([Eq(2*u, -3*u + 1000)])[u]\nm, i = symbols(\"m i\")\nm = solve([Eq(1002 - 982, -m - 4*i), Eq(61, 3*m + i)])[m]\nprint(gcd(u, m))" + ], + "Output Answer": [ + "8" + ], + "split": "dev" + }, + { + "Input": "What is the remainder when 49 is divided by 10?", + "Output Program": [ + "from sympy import *\nprint(49 % 10)" + ], + "Output Answer": [ + "9" + ], + "split": "dev" + }, + { + "Input": "What is the tens digit of 136292805?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(136292805))[7])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "dev" + }, + { + "Input": "Let l(r) = r**2 + 22*r + 15. Let y(f) = 1. Let m(c) = l(c) - 4*y(c). Let x be m(-21). What is the units digit of (-130)/6*60/x?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\ndef y(f):\n\treturn 1\nr = symbols(\"r\")\ndef l(r):\n\treturn r**2 + 22*r + 15\ndef m(c):\n\treturn l(c) - 4*y(c)\nx = m(-21)\nq = (-130)/6*60/x\ndigit = int(str(int(130))[2])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "dev" + }, + { + "Input": "Let y(t) = t**2 - t. Let w be y(-1). Suppose w*a = a + 9. Suppose -3*q + 52 = 4*v, -3*q + 3 = -a. What is the remainder when 19 is divided by v?", + "Output Program": [ + "from sympy import *\nt = symbols(\"t\")\ndef y(t):\n\treturn t**2 - t\nw = y(-1)\na = symbols(\"a\")\na = solve([Eq(w*a, a + 9)])[a]\nv, q = symbols(\"v q\")\nv = solve([Eq(-3*q + 52, 4*v), Eq(-3*q + 3, -a)])[v]\nprint(19 % v)" + ], + "Output Answer": [ + "9" + ], + "split": "dev" + }, + { + "Input": "Let c be ((-16)/(-3))/(8/24). Calculate the greatest common divisor of c and 16.", + "Output Program": [ + "from sympy import *\nc = ((-16)/(-3))/(8/24)\nprint(gcd(c, 16))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "dev" + }, + { + "Input": "Let m = 272 - 159. What are the prime factors of m?", + "Output Program": [ + "from sympy import *\nm = 272 - 159\nprint(primefactors(113))" + ], + "Output Answer": [ + "[113]" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 152131 is divided by 911.", + "Output Program": [ + "from sympy import *\nprint(152131 % 911)" + ], + "Output Answer": [ + "905" + ], + "split": "dev" + }, + { + "Input": "Suppose -4*i = -3*i - 3. Suppose i*m = 2*c - 63, 0 = -5*c + m - 5*m + 146. Calculate the greatest common factor of c and 20.", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ni = solve([Eq(-4*i, -3*i - 3)])[i]\nc, m = symbols(\"c m\")\nc = solve([Eq(i*m, 2*c - 63), Eq(0, -5*c + m - 5*m + 146)])[c]\nprint(gcd(c, 20))" + ], + "Output Answer": [ + "10" + ], + "split": "dev" + }, + { + "Input": "Is 12171183 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(12171183))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Suppose 14 = 3*a - 4*t, -5*a + 30 = 5*t - 5. Let v be (28/a)/7*1125/6. Let j = v + 136. What is the tens digit of j?", + "Output Program": [ + "from sympy import *\na, t = symbols(\"a t\")\na = solve([Eq(14, 3*a - 4*t), Eq(-5*a + 30, 5*t - 5)])[a]\nv = (28/a)/7*1125/6\nj = v + 136\ndigit = int(str(int(261))[1])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "dev" + }, + { + "Input": "What is the tens digit of 17471?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(17471))[3])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "dev" + }, + { + "Input": "Is 1024075859 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(1024075859))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What is the greatest common factor of 191217 and 897?", + "Output Program": [ + "from sympy import *\nprint(gcd(191217, 897))" + ], + "Output Answer": [ + "39" + ], + "split": "dev" + }, + { + "Input": "Let v(k) = 88*k**2 + k + 1. Let a be v(-1). Suppose -3*c + 155 = 3*q + c, -c - 1 = 0. Let u = a - q. Is u prime?", + "Output Program": [ + "from sympy import *\nk = symbols(\"k\")\ndef v(k):\n\treturn 88*k**2 + k + 1\na = v(-1)\nq, c = symbols(\"q c\")\nq = solve([Eq(-3*c + 155, 3*q + c), Eq(-c - 1, 0)])[q]\nu = a - q\nprint(isprime(35))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "What is the highest common divisor of 22040 and 5480?", + "Output Program": [ + "from sympy import *\nprint(gcd(22040, 5480))" + ], + "Output Answer": [ + "40" + ], + "split": "dev" + }, + { + "Input": "Let k(m) = 2*m**2 + 11*m + 11. Let x(o) = -3*o**2 - 11*o - 10. Let l(c) = 4*k(c) + 3*x(c). Let v be l(11). Calculate the greatest common divisor of v and 56.", + "Output Program": [ + "from sympy import *\nm = symbols(\"m\")\ndef k(m):\n\treturn 2*m**2 + 11*m + 11\no = symbols(\"o\")\ndef x(o):\n\treturn -3*o**2 - 11*o - 10\ndef l(c):\n\treturn 4*k(c) + 3*x(c)\nv = l(11)\nprint(gcd(v, 56))" + ], + "Output Answer": [ + "14" + ], + "split": "dev" + }, + { + "Input": "Let c(b) = -6*b**2 + b + 96. Let p(o) = o**2 - 19. Let a(w) = -2*c(w) - 11*p(w). Let f be a(-16). Suppose f + 206 = 7*m. What are the prime factors of m?", + "Output Program": [ + "from sympy import *\no = symbols(\"o\")\ndef p(o):\n\treturn o**2 - 19\nb = symbols(\"b\")\ndef c(b):\n\treturn -6*b**2 + b + 96\ndef a(w):\n\treturn -2*c(w) - 11*p(w)\nf = a(-16)\nm = symbols(\"m\")\nm = solve([Eq(f + 206, 7*m)])[m]\nprint(primefactors(73))" + ], + "Output Answer": [ + "[73]" + ], + "split": "dev" + }, + { + "Input": "Let z = 6 + -1. Suppose -2*i = 3*k - 38 + 6, 0 = 3*k - z*i - 46. Does 6 divide k?", + "Output Program": [ + "from sympy import *\nz = 6 + -1\nk, i = symbols(\"k i\")\nk = solve([Eq(-2*i, 3*k - 38 + 6), Eq(0, 3*k - z*i - 46)])[k]\nprint(12 % 6 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Suppose 4*h + 2 = 5*b + 81, 3*h + b - 45 = 0. What is the greatest common divisor of h and 4912?", + "Output Program": [ + "from sympy import *\nh, b = symbols(\"h b\")\nh = solve([Eq(4*h + 2, 5*b + 81), Eq(3*h + b - 45, 0)])[h]\nprint(gcd(h, 4912))" + ], + "Output Answer": [ + "16" + ], + "split": "dev" + }, + { + "Input": "Suppose -67 - 7 = -5*u + w, -u + 5*w = -10. Suppose a - 2*a + 3*l = -26, 2*l = -5*a + 147. What is the remainder when a is divided by u?", + "Output Program": [ + "from sympy import *\na, l = symbols(\"a l\")\na = solve([Eq(a - 2*a + 3*l, -26), Eq(2*l, -5*a + 147)])[a]\nu, w = symbols(\"u w\")\nu = solve([Eq(-67 - 7, -5*u + w), Eq(-u + 5*w, -10)])[u]\nprint(a % u)" + ], + "Output Answer": [ + "14" + ], + "split": "dev" + }, + { + "Input": "What is the highest common factor of 618 and 8175728?", + "Output Program": [ + "from sympy import *\nprint(gcd(618, 8175728))" + ], + "Output Answer": [ + "206" + ], + "split": "dev" + }, + { + "Input": "Suppose 3*n - 5*a - 57 = 0, -n + 3*a + 19 = -a. Let s = -17 + n. What is the remainder when 1/(-2)*s*-21 is divided by 4?", + "Output Program": [ + "from sympy import *\nn, a = symbols(\"n a\")\nn = solve([Eq(3*n - 5*a - 57, 0), Eq(-n + 3*a + 19, -a)])[n]\ns = -17 + n\np = 1/(-2)*s*-21\nprint(p % 4)" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "dev" + }, + { + "Input": "What is the tens digit of 368?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(368))[1])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "dev" + }, + { + "Input": "What is the greatest common factor of 31958647 and 266361?", + "Output Program": [ + "from sympy import *\nprint(gcd(31958647, 266361))" + ], + "Output Answer": [ + "4673" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 15957 is divided by 155.", + "Output Program": [ + "from sympy import *\nprint(15957 % 155)" + ], + "Output Answer": [ + "147" + ], + "split": "dev" + }, + { + "Input": "Let s = 12 + -27. Let f be (2298/s)/((-5)/75). Let a = -1547 + f. Is a a prime number?", + "Output Program": [ + "from sympy import *\ns = 12 + -27\nf = (2298/s)/((-5)/75)\na = -1547 + f\nprint(isprime(751))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Calculate the greatest common divisor of 41697 and 2147.", + "Output Program": [ + "from sympy import *\nprint(gcd(41697, 2147))" + ], + "Output Answer": [ + "113" + ], + "split": "dev" + }, + { + "Input": "Suppose -2*z + 4 = -p, -z - 28 = 4*p + 3*z. Let n(a) = -9*a**2 - 5*a + 11. Let l(q) = q**2 + q. Let x(i) = p*l(i) - n(i). Is x(9) prime?", + "Output Program": [ + "from sympy import *\np, z = symbols(\"p z\")\np = solve([Eq(-2*z + 4, -p), Eq(-z - 28, 4*p + 3*z)])[p]\na = symbols(\"a\")\ndef n(a):\n\treturn -9*a**2 - 5*a + 11\nq = symbols(\"q\")\ndef l(q):\n\treturn q**2 + q\ndef x(i):\n\treturn p*l(i) - n(i)\nd = x(9)\nprint(isprime(223))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Is 631 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(631))" + ], + "Output Answer": [ + "False" + ], + "split": "dev" + }, + { + "Input": "Let m(o) = 878*o + 355. What are the prime factors of m(5)?", + "Output Program": [ + "from sympy import *\no = symbols(\"o\")\ndef m(o):\n\treturn 878*o + 355\nc = m(5)\nprint(primefactors(4745))" + ], + "Output Answer": [ + "[5, 13, 73]" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 24365 is divided by 5824.", + "Output Program": [ + "from sympy import *\nprint(24365 % 5824)" + ], + "Output Answer": [ + "1069" + ], + "split": "dev" + }, + { + "Input": "What is the millions digit of 3165730?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(3165730))[0])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "dev" + }, + { + "Input": "Let k = -426 - -501. Calculate the remainder when 747 is divided by k.", + "Output Program": [ + "from sympy import *\nk = -426 - -501\nprint(747 % k)" + ], + "Output Answer": [ + "72" + ], + "split": "dev" + }, + { + "Input": "Let g(q) = 18 - 7*q. Let o be g(0). Suppose -2*b + 8320 = o*b. What is the tens digit of b?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef g(q):\n\treturn 18 - 7*q\no = g(0)\nb = symbols(\"b\")\nb = solve([Eq(-2*b + 8320, o*b)])[b]\ndigit = int(str(int(416))[1])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Let i(o) = -13*o**2 + o - 4. Let c(d) = 13*d**2 - d + 5. Let h(s) = -3*c(s) - 4*i(s). Let m be h(2). What is the greatest common divisor of m and 17?", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\ndef c(d):\n\treturn 13*d**2 - d + 5\no = symbols(\"o\")\ndef i(o):\n\treturn -13*o**2 + o - 4\ndef h(s):\n\treturn -3*c(s) - 4*i(s)\nm = h(2)\nprint(gcd(m, 17))" + ], + "Output Answer": [ + "17" + ], + "split": "dev" + }, + { + "Input": "Calculate the remainder when 64428 is divided by 11.", + "Output Program": [ + "from sympy import *\nprint(64428 % 11)" + ], + "Output Answer": [ + "1" + ], + "split": "dev" + }, + { + "Input": "Suppose c - 132 = 5*c. What is the remainder when 1/(129/c - -4) is divided by 4?", + "Output Program": [ + "from sympy import *\nc = symbols(\"c\")\nc = solve([Eq(c - 132, 5*c)])[c]\ng = 1/(129/c - -4)\nprint(g % 4)" + ], + "Output Answer": [ + "3" + ], + "split": "dev" + }, + { + "Input": "What is the greatest common factor of 171 and 301446666?", + "Output Program": [ + "from sympy import *\nprint(gcd(171, 301446666))" + ], + "Output Answer": [ + "171" + ], + "split": "dev" + }, + { + "Input": "Let o = 195 + -129. Let t be (o/(-2))/((-1)/(-5)). Let k = 233 + t. What is the tens digit of k?", + "Output Program": [ + "from sympy import *\no = 195 + -129\nt = (o/(-2))/((-1)/(-5))\nk = 233 + t\ndigit = int(str(int(68))[0])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "dev" + }, + { + "Input": "Suppose 375333 = 3*w - w + 37031. Is w a prime number?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\nw = solve([Eq(375333, 3*w - w + 37031)])[w]\nprint(isprime(169151))" + ], + "Output Answer": [ + "True" + ], + "split": "dev" + }, + { + "Input": "Let s = -60 - -171. What is the remainder when s is divided by 15?", + "Output Program": [ + "from sympy import *\ns = -60 - -171\nprint(s % 15)" + ], + "Output Answer": [ + "6" + ], + "split": "dev" + }, + { + "Input": "Let x(g) = -20*g**3 - 5*g**2 + 8*g - 3. Let o be x(1). Is (-25)/(-12)*2462 + o/120 a prime number?", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ndef x(g):\n\treturn -20*g**3 - 5*g**2 + 8*g - 3\no = x(1)\nt = (-25)/(-12)*2462 + o/120\nprint(isprime(5129))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let y be ((-3)/1)/(3/(-494)). Suppose y = -2*f - 11*f. What is the hundreds digit of (-6 + 2)*(f - -3)?", + "Output Program": [ + "from sympy import *\ny = ((-3)/1)/(3/(-494))\nf = symbols(\"f\")\nf = solve([Eq(y, -2*f - 11*f)])[f]\nb = (-6 + 2)*(f - -3)\ndigit = int(str(int(140))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Let j = -9 - -11. Let o(d) = -3*d + 2*d**2 + 4 - d**j + 0*d**2. Calculate the remainder when 40 is divided by o(5).", + "Output Program": [ + "from sympy import *\nj = -9 - -11\nd = symbols(\"d\")\ndef o(d):\n\treturn -3*d + 2*d**2 + 4 - d**j + 0*d**2\nr = o(5)\nprint(40 % r)" + ], + "Output Answer": [ + "12" + ], + "split": "test" + }, + { + "Input": "Suppose 2025 + 3175 = 26*l. Let j = -15 - -40. What is the highest common factor of l and j?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\nl = solve([Eq(2025 + 3175, 26*l)])[l]\nj = -15 - -40\nprint(gcd(l, j))" + ], + "Output Answer": [ + "25" + ], + "split": "test" + }, + { + "Input": "What is the millions digit of 1006174132?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1006174132))[3])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "test" + }, + { + "Input": "Let v = -95 - -123. What is the remainder when ((-7)/(v/64))/(2 - 3) is divided by 11?", + "Output Program": [ + "from sympy import *\nv = -95 - -123\nb = ((-7)/(v/64))/(2 - 3)\nprint(b % 11)" + ], + "Output Answer": [ + "5.0" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 674860444.", + "Output Program": [ + "from sympy import *\nprint(primefactors(674860444))" + ], + "Output Answer": [ + "[2, 168715111]" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 3875460.", + "Output Program": [ + "from sympy import *\nprint(primefactors(3875460))" + ], + "Output Answer": [ + "[2, 3, 5, 64591]" + ], + "split": "test" + }, + { + "Input": "Let q be (-12)/18 - 2/6. What are the prime factors of 8 + (-2 - -1 - q)?", + "Output Program": [ + "from sympy import *\nq = (-12)/18 - 2/6\nn = 8 + (-2 - -1 - q)\nprint(primefactors(8))" + ], + "Output Answer": [ + "[2]" + ], + "split": "test" + }, + { + "Input": "Let a(y) = -y**3 - y**2 + y - 5. Let q be a(0). Let n = q + 2. Let r be ((-1)/(-2))/(n/(-6)). Calculate the greatest common factor of r and 3.", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef a(y):\n\treturn -y**3 - y**2 + y - 5\nq = a(0)\nn = q + 2\nr = ((-1)/(-2))/(n/(-6))\nprint(gcd(r, 3))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common divisor of 6 and 799926.", + "Output Program": [ + "from sympy import *\nprint(gcd(6, 799926))" + ], + "Output Answer": [ + "6" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 516 is divided by 65.", + "Output Program": [ + "from sympy import *\nprint(516 % 65)" + ], + "Output Answer": [ + "61" + ], + "split": "test" + }, + { + "Input": "Let n(j) = -1 - 22*j**3 + 6*j**2 + 21*j**3 - 4*j - j. Let z be n(5). What is the units digit of 2 - 0 - (-4 - z)?", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\ndef n(j):\n\treturn -1 - 22*j**3 + 6*j**2 + 21*j**3 - 4*j - j\nz = n(5)\nq = 2 - 0 - (-4 - z)\ndigit = int(str(int(5))[0])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "test" + }, + { + "Input": "Let i be 31/(-155) - (-226)/5. Let a = i + 94. Is a prime?", + "Output Program": [ + "from sympy import *\ni = 31/(-155) - (-226)/5\na = i + 94\nprint(isprime(139))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let b(h) = h**3 - 3*h**2 - 44*h - 49. What is the tens digit of b(11)?", + "Output Program": [ + "from sympy import *\nh = symbols(\"h\")\ndef b(h):\n\treturn h**3 - 3*h**2 - 44*h - 49\ni = b(11)\ndigit = int(str(int(435))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Let k(b) = -b - 1. Let s be k(-2). Let g(i) = 37*i + 1. Is g(s) prime?", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ndef g(i):\n\treturn 37*i + 1\nb = symbols(\"b\")\ndef k(b):\n\treturn -b - 1\ns = k(-2)\nl = g(s)\nprint(isprime(38))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let v be 1505/3 - (-1)/3. Let u = v + -331. Calculate the highest common divisor of u and 19.", + "Output Program": [ + "from sympy import *\nv = 1505/3 - (-1)/3\nu = v + -331\nprint(gcd(u, 19))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "Let u(l) = -l**2 + 8*l - 4. Let s be u(3). Suppose 3*i + 4*j = -37, 2*i + 7 = 4*j - s. Let z = 0 - i. What is the units digit of z?", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef u(l):\n\treturn -l**2 + 8*l - 4\ns = u(3)\ni, j = symbols(\"i j\")\ni = solve([Eq(3*i + 4*j, -37), Eq(2*i + 7, 4*j - s)])[i]\nz = 0 - i\ndigit = int(str(int(11))[1])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Let s = 11 + 10. Suppose 2*y - 4*w = -28, 4*y - 2*w + w + s = 0. Let a = 15 + y. Calculate the highest common factor of a and 77.", + "Output Program": [ + "from sympy import *\ns = 11 + 10\ny, w = symbols(\"y w\")\ny = solve([Eq(2*y - 4*w, -28), Eq(4*y - 2*w + w + s, 0)])[y]\na = 15 + y\nprint(gcd(a, 77))" + ], + "Output Answer": [ + "11" + ], + "split": "test" + }, + { + "Input": "Is 2546213 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(2546213))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let d(l) = -l**2 + 4*l + 5. Let q be d(4). Suppose -q*o + 4*u + 85 = 0, -2*o + 4*u + 28 = -6. Calculate the highest common factor of 102 and o.", + "Output Program": [ + "from sympy import *\nl = symbols(\"l\")\ndef d(l):\n\treturn -l**2 + 4*l + 5\nq = d(4)\no, u = symbols(\"o u\")\no = solve([Eq(-q*o + 4*u + 85, 0), Eq(-2*o + 4*u + 28, -6)])[o]\nprint(gcd(102, o))" + ], + "Output Answer": [ + "17" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 2731713606?", + "Output Program": [ + "from sympy import *\nprint(primefactors(2731713606))" + ], + "Output Answer": [ + "[2, 3, 50587289]" + ], + "split": "test" + }, + { + "Input": "What is the greatest common divisor of 3955521 and 6031?", + "Output Program": [ + "from sympy import *\nprint(gcd(3955521, 6031))" + ], + "Output Answer": [ + "163" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common factor of 3712 and 10408.", + "Output Program": [ + "from sympy import *\nprint(gcd(3712, 10408))" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "Suppose -2*g = -h + 178, -5*h = -g - 104 - 768. What is the remainder when h is divided by 63?", + "Output Program": [ + "from sympy import *\nh, g = symbols(\"h g\")\nh = solve([Eq(-2*g, -h + 178), Eq(-5*h, -g - 104 - 768)])[h]\nprint(h % 63)" + ], + "Output Answer": [ + "48" + ], + "split": "test" + }, + { + "Input": "Let a(i) = -81*i - 9. Let x be a(-1). What is the greatest common divisor of 48 and x?", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ndef a(i):\n\treturn -81*i - 9\nx = a(-1)\nprint(gcd(48, x))" + ], + "Output Answer": [ + "24" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 3297 is divided by 29.", + "Output Program": [ + "from sympy import *\nprint(3297 % 29)" + ], + "Output Answer": [ + "20" + ], + "split": "test" + }, + { + "Input": "Let x(m) = 5 - 4*m. Let t be x(-6). Suppose 3*j = 137 - t. Suppose -5*b - l + j - 7 = 0, -3*b + 3 = -3*l. Does 2 divide b?", + "Output Program": [ + "from sympy import *\nm = symbols(\"m\")\ndef x(m):\n\treturn 5 - 4*m\nt = x(-6)\nj = symbols(\"j\")\nj = solve([Eq(3*j, 137 - t)])[j]\nb, l = symbols(\"b l\")\nb = solve([Eq(-5*b - l + j - 7, 0), Eq(-3*b + 3, -3*l)])[b]\nprint(5 % 2 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Suppose 0*r + 5*r = -15. Suppose -4*m + 2*a - 10 = -0, -4*a = 3*m - 9. Let f be 70/15 + m/r. Calculate the highest common factor of f and 40.", + "Output Program": [ + "from sympy import *\nm, a = symbols(\"m a\")\nm = solve([Eq(-4*m + 2*a - 10, -0), Eq(-4*a, 3*m - 9)])[m]\nr = symbols(\"r\")\nr = solve([Eq(0*r + 5*r, -15)])[r]\nf = 70/15 + m/r\nprint(gcd(f, 40))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 9778729.", + "Output Program": [ + "from sympy import *\nprint(primefactors(9778729))" + ], + "Output Answer": [ + "[337, 29017]" + ], + "split": "test" + }, + { + "Input": "Suppose 4*x - 2*i - 1312 = 0, -2*x + 5*i + 346 = -x. What is the hundreds digit of x?", + "Output Program": [ + "from sympy import *\nx, i = symbols(\"x i\")\nx = solve([Eq(4*x - 2*i - 1312, 0), Eq(-2*x + 5*i + 346, -x)])[x]\ndigit = int(str(int(326))[0])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "What is the highest common divisor of 37033613 and 23812?", + "Output Program": [ + "from sympy import *\nprint(gcd(37033613, 23812))" + ], + "Output Answer": [ + "5953" + ], + "split": "test" + }, + { + "Input": "Does 4937 divide 522723225?", + "Output Program": [ + "from sympy import *\nprint(522723225 % 4937 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Is 41333 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(41333))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let x(k) = 14 - 4*k. Let w(g) = g - 3. Let b(y) = 28*w(y) + 6*x(y). Let n(v) = v**3 - 6*v**2 + 6*v - 1. Let d be n(5). List the prime factors of b(d).", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ndef w(g):\n\treturn g - 3\nk = symbols(\"k\")\ndef x(k):\n\treturn 14 - 4*k\ndef b(y):\n\treturn 28*w(y) + 6*x(y)\nv = symbols(\"v\")\ndef n(v):\n\treturn v**3 - 6*v**2 + 6*v - 1\nd = n(5)\nq = b(d)\nprint(primefactors(16))" + ], + "Output Answer": [ + "[2]" + ], + "split": "test" + }, + { + "Input": "Is 6200432311 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(6200432311))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What is the thousands digit of 827806?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(827806))[2])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Let l = -1 - -6. Suppose 48 = 2*p - l*n, -4*n - 12 - 4 = 0. Let u = 25 - p. What are the prime factors of u?", + "Output Program": [ + "from sympy import *\nl = -1 - -6\np, n = symbols(\"p n\")\np = solve([Eq(48, 2*p - l*n), Eq(-4*n - 12 - 4, 0)])[p]\nu = 25 - p\nprint(primefactors(11))" + ], + "Output Answer": [ + "[11]" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 1208658?", + "Output Program": [ + "from sympy import *\nprint(primefactors(1208658))" + ], + "Output Answer": [ + "[2, 3, 11, 18313]" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 72778 is divided by 1915.", + "Output Program": [ + "from sympy import *\nprint(72778 % 1915)" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "Let k(u) = 13*u**2 - 93*u + 28. What are the prime factors of k(8)?", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\ndef k(u):\n\treturn 13*u**2 - 93*u + 28\nt = k(8)\nprint(primefactors(116))" + ], + "Output Answer": [ + "[2, 29]" + ], + "split": "test" + }, + { + "Input": "Is 2042267 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(2042267))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Does 84 divide 2453139?", + "Output Program": [ + "from sympy import *\nprint(2453139 % 84 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Is ((-6)/(-10) - (-12)/30) + 292 a prime number?", + "Output Program": [ + "from sympy import *\nh = ((-6)/(-10) - (-12)/30) + 292\nprint(isprime(293))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let o(h) = h**2 + h - 38. Let n be o(0). Let t = n - -69. Suppose -y + j = -6 - 1, t = 4*y - j. What is the units digit of y?", + "Output Program": [ + "from sympy import *\nh = symbols(\"h\")\ndef o(h):\n\treturn h**2 + h - 38\nn = o(0)\nt = n - -69\ny, j = symbols(\"y j\")\ny = solve([Eq(-y + j, -6 - 1), Eq(t, 4*y - j)])[y]\ndigit = int(str(int(8))[0])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common divisor of 90 and 945.", + "Output Program": [ + "from sympy import *\nprint(gcd(90, 945))" + ], + "Output Answer": [ + "45" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when (1 - 8) + 1 + (-75 + 31 - -294) is divided by 58.", + "Output Program": [ + "from sympy import *\nk = (1 - 8) + 1 + (-75 + 31 - -294)\nprint(k % 58)" + ], + "Output Answer": [ + "12" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 156453 is divided by 1757.", + "Output Program": [ + "from sympy import *\nprint(156453 % 1757)" + ], + "Output Answer": [ + "80" + ], + "split": "test" + }, + { + "Input": "Do 1522 and -5.1 have different values?", + "Output Program": [ + "from sympy import *\nprint(1522 != -5.1)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let i be (-16)/(-8) + (0 + 0 - 0). Suppose 0 = 2*u - 5*s - 7, -u - 2*s = -0*u - 8. What are the prime factors of ((-27)/u)/(-1)*i?", + "Output Program": [ + "from sympy import *\nu, s = symbols(\"u s\")\nu = solve([Eq(0, 2*u - 5*s - 7), Eq(-u - 2*s, -0*u - 8)])[u]\ni = (-16)/(-8) + (0 + 0 - 0)\np = ((-27)/u)/(-1)*i\nprint(primefactors(9))" + ], + "Output Answer": [ + "[3]" + ], + "split": "test" + }, + { + "Input": "Let f(o) = -o. Let y = 9 + -5. Let p be f(y). Is ((-275)/(-10))/((-2)/p) a prime number?", + "Output Program": [ + "from sympy import *\no = symbols(\"o\")\ndef f(o):\n\treturn -o\ny = 9 + -5\np = f(y)\ng = ((-275)/(-10))/((-2)/p)\nprint(isprime(55))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let g(u) = -60*u - 109. List the prime factors of g(-2).", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\ndef g(u):\n\treturn -60*u - 109\ni = g(-2)\nprint(primefactors(11))" + ], + "Output Answer": [ + "[11]" + ], + "split": "test" + }, + { + "Input": "What is the greatest common factor of 2 and 16?", + "Output Program": [ + "from sympy import *\nprint(gcd(2, 16))" + ], + "Output Answer": [ + "2" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 4520?", + "Output Program": [ + "from sympy import *\nprint(primefactors(4520))" + ], + "Output Answer": [ + "[2, 5, 113]" + ], + "split": "test" + }, + { + "Input": "Let b be (-6)/8 + (-1809)/(-12). Suppose l - h + 90 = 4*l, -5*l + h + b = 0. What is the remainder when l is divided by 8?", + "Output Program": [ + "from sympy import *\nb = (-6)/8 + (-1809)/(-12)\nl, h = symbols(\"l h\")\nl = solve([Eq(l - h + 90, 4*l), Eq(-5*l + h + b, 0)])[l]\nprint(l % 8)" + ], + "Output Answer": [ + "6.00000000000000" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 363696?", + "Output Program": [ + "from sympy import *\nprint(primefactors(363696))" + ], + "Output Answer": [ + "[2, 3, 7577]" + ], + "split": "test" + }, + { + "Input": "Suppose -30323*i + 2052 = -30320*i. Calculate the greatest common factor of 540 and i.", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ni = solve([Eq(-30323*i + 2052, -30320*i)])[i]\nprint(gcd(540, i))" + ], + "Output Answer": [ + "36" + ], + "split": "test" + }, + { + "Input": "Let n = 356 - -9395. What is the tens digit of n?", + "Output Program": [ + "from sympy import *\nn = 356 - -9395\ndigit = int(str(int(9751))[2])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "test" + }, + { + "Input": "Let y(d) = d**3 - d**2 - 1. Let g(r) = r**3 - 12*r**2 + 7*r - 12. Let o(s) = -g(s) + 2*y(s). Let w be o(-9). Let m = w - 72. What are the prime factors of m?", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\ndef g(r):\n\treturn r**3 - 12*r**2 + 7*r - 12\nd = symbols(\"d\")\ndef y(d):\n\treturn d**3 - d**2 - 1\ndef o(s):\n\treturn -g(s) + 2*y(s)\nw = o(-9)\nm = w - 72\nprint(primefactors(82))" + ], + "Output Answer": [ + "[2, 41]" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 3018606?", + "Output Program": [ + "from sympy import *\nprint(primefactors(3018606))" + ], + "Output Answer": [ + "[2, 3, 19, 26479]" + ], + "split": "test" + }, + { + "Input": "Let b = 782 - 456. Suppose 92 = -2*v + b. Suppose -x + v = -698. Is x a prime number?", + "Output Program": [ + "from sympy import *\nb = 782 - 456\nv = symbols(\"v\")\nv = solve([Eq(92, -2*v + b)])[v]\nx = symbols(\"x\")\nx = solve([Eq(-x + v, -698)])[x]\nprint(isprime(815))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let p be (-198)/12 - 1/(-2). Let z be 2/p*-2 + 2025/12. Suppose 13*d = -0*d + z. What is the units digit of d?", + "Output Program": [ + "from sympy import *\np = (-198)/12 - 1/(-2)\nz = 2/p*-2 + 2025/12\nd = symbols(\"d\")\nd = solve([Eq(13*d, -0*d + z)])[d]\ndigit = int(str(int(13))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "What is the millions digit of 6778699?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(6778699))[0])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "test" + }, + { + "Input": "Let v = 158 + -54. Let m = v + -58. Suppose -32 = -2*i - 4*h, 0*i - 4*i + m = -h. What is the tens digit of i?", + "Output Program": [ + "from sympy import *\nv = 158 + -54\nm = v + -58\ni, h = symbols(\"i h\")\ni = solve([Eq(-32, -2*i - 4*h), Eq(0*i - 4*i + m, -h)])[i]\ndigit = int(str(int(12))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Does 96 divide 326592?", + "Output Program": [ + "from sympy import *\nprint(326592 % 96 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What is the ten thousands digit of 14015354?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(14015354))[3])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Suppose a - 4*c - 3 = 0, -4*a - 2*c - 11 = 13. Let w = a - -7. Let m be (w + 1)/3 + 153. What is the highest common factor of 14 and m?", + "Output Program": [ + "from sympy import *\na, c = symbols(\"a c\")\na = solve([Eq(a - 4*c - 3, 0), Eq(-4*a - 2*c - 11, 13)])[a]\nw = a - -7\nm = (w + 1)/3 + 153\nprint(gcd(14, m))" + ], + "Output Answer": [ + "14" + ], + "split": "test" + }, + { + "Input": "What is the ten thousands digit of 894582643?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(894582643))[4])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 13416.", + "Output Program": [ + "from sympy import *\nprint(primefactors(13416))" + ], + "Output Answer": [ + "[2, 3, 13, 43]" + ], + "split": "test" + }, + { + "Input": "What is the remainder when 12147 is divided by 5558?", + "Output Program": [ + "from sympy import *\nprint(12147 % 5558)" + ], + "Output Answer": [ + "1031" + ], + "split": "test" + }, + { + "Input": "Let z(i) = -6*i**2 - 4*i. Let u be z(4). Let h = u - -161. Does 13 divide h?", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ndef z(i):\n\treturn -6*i**2 - 4*i\nu = z(4)\nh = u - -161\nprint(49 % 13 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "What is the highest common divisor of 38 and 2?", + "Output Program": [ + "from sympy import *\nprint(gcd(38, 2))" + ], + "Output Answer": [ + "2" + ], + "split": "test" + }, + { + "Input": "Let j = -70 - -87. Suppose 5*z + 1122 = 11*z. What is the greatest common factor of z and j?", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\nz = solve([Eq(5*z + 1122, 11*z)])[z]\nj = -70 - -87\nprint(gcd(z, j))" + ], + "Output Answer": [ + "17" + ], + "split": "test" + }, + { + "Input": "Suppose 13*a + 2*a = 345. What is the remainder when a is divided by 4?", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\na = solve([Eq(13*a + 2*a, 345)])[a]\nprint(a % 4)" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Let l = -10 + -5. Let a = 52 + l. List the prime factors of a.", + "Output Program": [ + "from sympy import *\nl = -10 + -5\na = 52 + l\nprint(primefactors(37))" + ], + "Output Answer": [ + "[37]" + ], + "split": "test" + }, + { + "Input": "Does 118 divide 2672582?", + "Output Program": [ + "from sympy import *\nprint(2672582 % 118 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 90?", + "Output Program": [ + "from sympy import *\nprint(primefactors(90))" + ], + "Output Answer": [ + "[2, 3, 5]" + ], + "split": "test" + }, + { + "Input": "Is 600203 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(600203))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let n(d) = -d**2 - 972*d + 10826. What is the remainder when (-2 + -460)*(-8)/12 is divided by n(11)?", + "Output Program": [ + "from sympy import *\nr = (-2 + -460)*(-8)/12\nd = symbols(\"d\")\ndef n(d):\n\treturn -d**2 - 972*d + 10826\nw = n(11)\nprint(r % w)" + ], + "Output Answer": [ + "9.0" + ], + "split": "test" + }, + { + "Input": "What is the remainder when 836 is divided by 210?", + "Output Program": [ + "from sympy import *\nprint(836 % 210)" + ], + "Output Answer": [ + "206" + ], + "split": "test" + }, + { + "Input": "What is the units digit of 888360365?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(888360365))[8])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "test" + }, + { + "Input": "Does 5 divide 2017650?", + "Output Program": [ + "from sympy import *\nprint(2017650 % 5 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let h = 14 + 2. Let y(d) = -d**3 - 11*d**2 + 56*d + 18. What is the remainder when y(-15) is divided by h?", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\ndef y(d):\n\treturn -d**3 - 11*d**2 + 56*d + 18\np = y(-15)\nh = 14 + 2\nprint(p % h)" + ], + "Output Answer": [ + "14" + ], + "split": "test" + }, + { + "Input": "Let k be (-1 + -1741)*(7 + 40/(-5)). Suppose -p - 694 = -2*s - 3*p, -2*p - k = -5*s. Does 58 divide s?", + "Output Program": [ + "from sympy import *\nk = (-1 + -1741)*(7 + 40/(-5))\ns, p = symbols(\"s p\")\ns = solve([Eq(-p - 694, -2*s - 3*p), Eq(-2*p - k, -5*s)])[s]\nprint(348 % 58 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Suppose 0 = -2*c - o - 4*o + 10, -c - 3*o + 7 = 0. What is the units digit of -5 - (-171 - (5 + c))?", + "Output Program": [ + "from sympy import *\nc, o = symbols(\"c o\")\nc = solve([Eq(0, -2*c - o - 4*o + 10), Eq(-c - 3*o + 7, 0)])[c]\nu = -5 - (-171 - (5 + c))\ndigit = int(str(int(166))[2])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "test" + }, + { + "Input": "What is the hundreds digit of 2281?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2281))[1])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "test" + }, + { + "Input": "Let c be (7/(-2) + 2)/(6/(-40)). What is the highest common divisor of 4 and c?", + "Output Program": [ + "from sympy import *\nc = (7/(-2) + 2)/(6/(-40))\nprint(gcd(4, c))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "What is the tens digit of 55700?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(55700))[3])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 46 is divided by 22.", + "Output Program": [ + "from sympy import *\nprint(46 % 22)" + ], + "Output Answer": [ + "2" + ], + "split": "test" + }, + { + "Input": "Let y(w) = 2*w**3 - 58*w**2 + 10*w + 22. Calculate the remainder when y(29) is divided by 85.", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef y(w):\n\treturn 2*w**3 - 58*w**2 + 10*w + 22\ns = y(29)\nprint(s % 85)" + ], + "Output Answer": [ + "57" + ], + "split": "test" + }, + { + "Input": "Suppose -2232 = -2*u + 4*b, 1010 - 5522 = -4*u - 4*b. What is the hundreds digit of u?", + "Output Program": [ + "from sympy import *\nu, b = symbols(\"u b\")\nu = solve([Eq(-2232, -2*u + 4*b), Eq(1010 - 5522, -4*u - 4*b)])[u]\ndigit = int(str(int(1124))[1])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Is 467 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(467))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let i(q) = 9 - 2*q. Let h be i(8). Is 764 + h/(14/6) a prime number?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef i(q):\n\treturn 9 - 2*q\nh = i(8)\nz = 764 + h/(14/6)\nprint(isprime(761))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What is the thousands digit of 101493549?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(101493549))[5])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Is 2423453 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(2423453))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let h = 2268 - 1295. What are the prime factors of h?", + "Output Program": [ + "from sympy import *\nh = 2268 - 1295\nprint(primefactors(973))" + ], + "Output Answer": [ + "[7, 139]" + ], + "split": "test" + }, + { + "Input": "Suppose 163*o + 4615 = 158*o. Let i = o - -1458. What is the units digit of i?", + "Output Program": [ + "from sympy import *\no = symbols(\"o\")\no = solve([Eq(163*o + 4615, 158*o)])[o]\ni = o - -1458\ndigit = int(str(int(535))[2])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "test" + }, + { + "Input": "Let o = 34 + -29. Suppose 5*d - 77 = -z, o*z + 5*d = -32 + 337. Suppose z = -40*i + 43*i. What is the units digit of i?", + "Output Program": [ + "from sympy import *\no = 34 + -29\nz, d = symbols(\"z d\")\nz = solve([Eq(5*d - 77, -z), Eq(o*z + 5*d, -32 + 337)])[z]\ni = symbols(\"i\")\ni = solve([Eq(z, -40*i + 43*i)])[i]\ndigit = int(str(int(19))[1])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "test" + }, + { + "Input": "What is the units digit of 10494?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(10494))[4])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Let y = 41 + 86. What is the tens digit of y?", + "Output Program": [ + "from sympy import *\ny = 41 + 86\ndigit = int(str(int(127))[1])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "test" + }, + { + "Input": "Let w(d) = -46*d. Let i be w(-1). Calculate the greatest common factor of 69 and i.", + "Output Program": [ + "from sympy import *\nd = symbols(\"d\")\ndef w(d):\n\treturn -46*d\ni = w(-1)\nprint(gcd(69, i))" + ], + "Output Answer": [ + "23" + ], + "split": "test" + }, + { + "Input": "Suppose -2*l - 7*x + 13 = -8*x, -x + 11 = 4*l. Suppose 0 = l*s - 3*a - 1523, 5*s = -5*a + 614 + 1281. What is the units digit of s?", + "Output Program": [ + "from sympy import *\nl, x = symbols(\"l x\")\nl = solve([Eq(-2*l - 7*x + 13, -8*x), Eq(-x + 11, 4*l)])[l]\ns, a = symbols(\"s a\")\ns = solve([Eq(0, l*s - 3*a - 1523), Eq(5*s, -5*a + 614 + 1281)])[s]\ndigit = int(str(int(380))[2])\nprint(digit)" + ], + "Output Answer": [ + "0" + ], + "split": "test" + }, + { + "Input": "Suppose -4*c = 4*v - 15868, -786*v = 3*c - 787*v - 11933. What is the thousands digit of c?", + "Output Program": [ + "from sympy import *\nc, v = symbols(\"c v\")\nc = solve([Eq(-4*c, 4*v - 15868), Eq(-786*v, 3*c - 787*v - 11933)])[c]\ndigit = int(str(int(3975))[0])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common divisor of 16 and 6.", + "Output Program": [ + "from sympy import *\nprint(gcd(16, 6))" + ], + "Output Answer": [ + "----------\n2" + ], + "split": "test" + }, + { + "Input": "Is 2810063 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(2810063))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Is 144220450201 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(144220450201))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let j be 4/(-1)*(9 + -12). Let x be 55/(-2)*j/(-10). List the prime factors of (-2)/(-11) + 357/x.", + "Output Program": [ + "from sympy import *\nj = 4/(-1)*(9 + -12)\nx = 55/(-2)*j/(-10)\nq = (-2)/(-11) + 357/x\nprint(primefactors(11))" + ], + "Output Answer": [ + "[11]" + ], + "split": "test" + }, + { + "Input": "What is the greatest common factor of 3120 and 388180?", + "Output Program": [ + "from sympy import *\nprint(gcd(3120, 388180))" + ], + "Output Answer": [ + "260" + ], + "split": "test" + }, + { + "Input": "Let q be (-17)/(-1 - (-1)/2). Suppose q = 2*g - 22. Calculate the highest common factor of g and 70.", + "Output Program": [ + "from sympy import *\nq = (-17)/(-1 - (-1)/2)\ng = symbols(\"g\")\ng = solve([Eq(q, 2*g - 22)])[g]\nprint(gcd(g, 70))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 105321598?", + "Output Program": [ + "from sympy import *\nprint(primefactors(105321598))" + ], + "Output Answer": [ + "[2, 19, 107, 25903]" + ], + "split": "test" + }, + { + "Input": "Suppose 4*r = 142 - 50. Calculate the remainder when r is divided by 13.", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\nr = solve([Eq(4*r, 142 - 50)])[r]\nprint(r % 13)" + ], + "Output Answer": [ + "10" + ], + "split": "test" + }, + { + "Input": "Let y = -1384 + 3717. Is y composite?", + "Output Program": [ + "from sympy import *\ny = -1384 + 3717\nprint(not isprime(2333))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Suppose -x = -3*n + 1058, -4*x + 1735 = -n + 6*n. What is the units digit of n?", + "Output Program": [ + "from sympy import *\nn, x = symbols(\"n x\")\nn = solve([Eq(-x, -3*n + 1058), Eq(-4*x + 1735, -n + 6*n)])[n]\ndigit = int(str(int(351))[2])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Let v(u) be the second derivative of u**4/12 - 2*u**3/3 + 5*u**2 - 2*u. Does 14 divide v(8)?", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\ndef w(u):\n\treturn u**4/12 - 2*u**3/3 + 5*u**2 - 2*u\ndef v(val):\n\treturn diff(u**4/12 - 2*u**3/3 + 5*u**2 - 2*u, u, 2).subs(u, val)\nd = v(8)\nprint(42 % 14 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let q be (-18 - -22) + (4 - 2) + 2262. Suppose -m = -10*m + q. What is the hundreds digit of m?", + "Output Program": [ + "from sympy import *\nq = (-18 - -22) + (4 - 2) + 2262\nm = symbols(\"m\")\nm = solve([Eq(-m, -10*m + q)])[m]\ndigit = int(str(int(252))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "test" + }, + { + "Input": "Suppose g = -373 - 518. Let m = g + 1466. What is the tens digit of m?", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ng = solve([Eq(g, -373 - 518)])[g]\nm = g + 1466\ndigit = int(str(int(575))[1])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Calculate the greatest common divisor of 11 and 869.", + "Output Program": [ + "from sympy import *\nprint(gcd(11, 869))" + ], + "Output Answer": [ + "11" + ], + "split": "test" + }, + { + "Input": "Suppose 13*s - 1811725 = -19*s + 37491. What is the hundreds digit of s?", + "Output Program": [ + "from sympy import *\ns = symbols(\"s\")\ns = solve([Eq(13*s - 1811725, -19*s + 37491)])[s]\ndigit = int(str(int(57788))[2])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "List the prime factors of -6 + (-351)/(-63) + (-78)/14 + 50937.", + "Output Program": [ + "from sympy import *\nt = -6 + (-351)/(-63) + (-78)/14 + 50937\nprint(primefactors(50931))" + ], + "Output Answer": [ + "[3, 5659]" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 368645.", + "Output Program": [ + "from sympy import *\nprint(primefactors(368645))" + ], + "Output Answer": [ + "[5, 17, 4337]" + ], + "split": "test" + }, + { + "Input": "What is the greatest common divisor of 736 and 391?", + "Output Program": [ + "from sympy import *\nprint(gcd(736, 391))" + ], + "Output Answer": [ + "23" + ], + "split": "test" + }, + { + "Input": "Let g(y) = y - 5. Let h be g(7). Suppose 5*n - 21 = -3*d + 49, 0 = -3*d - h*n + 64. What is the remainder when d is divided by 11?", + "Output Program": [ + "from sympy import *\ny = symbols(\"y\")\ndef g(y):\n\treturn y - 5\nh = g(7)\nd, n = symbols(\"d n\")\nd = solve([Eq(5*n - 21, -3*d + 49), Eq(0, -3*d - h*n + 64)])[d]\nprint(d % 11)" + ], + "Output Answer": [ + "9" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common divisor of 28 and 106886.", + "Output Program": [ + "from sympy import *\nprint(gcd(28, 106886))" + ], + "Output Answer": [ + "2" + ], + "split": "test" + }, + { + "Input": "What is the millions digit of 1875597003?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1875597003))[3])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "test" + }, + { + "Input": "Let c = 36 - 36. Suppose 2*i = -c*i + 1954. Suppose 6*y + 323 = i. What is the hundreds digit of y?", + "Output Program": [ + "from sympy import *\nc = 36 - 36\ni = symbols(\"i\")\ni = solve([Eq(2*i, -c*i + 1954)])[i]\ny = symbols(\"y\")\ny = solve([Eq(6*y + 323, i)])[y]\ndigit = int(str(int(109))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Suppose 44 = 2*k - 0*k. Suppose v = 39 + 53. Let q = -51 + v. What is the remainder when q is divided by k?", + "Output Program": [ + "from sympy import *\nv = symbols(\"v\")\nv = solve([Eq(v, 39 + 53)])[v]\nq = -51 + v\nk = symbols(\"k\")\nk = solve([Eq(44, 2*k - 0*k)])[k]\nprint(q % k)" + ], + "Output Answer": [ + "19" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 8563504 is divided by 4281707.", + "Output Program": [ + "from sympy import *\nprint(8563504 % 4281707)" + ], + "Output Answer": [ + "90" + ], + "split": "test" + }, + { + "Input": "Is 2435107997 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(2435107997))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "What is the remainder when 567 is divided by 28?", + "Output Program": [ + "from sympy import *\nprint(567 % 28)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Let o(v) = -2*v**3 - 11*v**2 - 51*v - 25. Is o(-12) a prime number?", + "Output Program": [ + "from sympy import *\nv = symbols(\"v\")\ndef o(v):\n\treturn -2*v**3 - 11*v**2 - 51*v - 25\nm = o(-12)\nprint(isprime(2459))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Calculate the greatest common factor of 1029958 and 15839.", + "Output Program": [ + "from sympy import *\nprint(gcd(1029958, 15839))" + ], + "Output Answer": [ + "47" + ], + "split": "test" + }, + { + "Input": "Let r(z) = -6587*z + 13168*z + 3*z**2 + 6 - 6584*z. Let o(v) = 3 - v. Let w be o(-3). List the prime factors of r(w).", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\ndef r(z):\n\treturn -6587*z + 13168*z + 3*z**2 + 6 - 6584*z\nv = symbols(\"v\")\ndef o(v):\n\treturn 3 - v\nw = o(-3)\nl = r(w)\nprint(primefactors(96))" + ], + "Output Answer": [ + "[2, 3]" + ], + "split": "test" + }, + { + "Input": "Let c(t) = 54*t**2 + 4*t + 3. Let i = 22 + -24. Is c(i) a prime number?", + "Output Program": [ + "from sympy import *\nt = symbols(\"t\")\ndef c(t):\n\treturn 54*t**2 + 4*t + 3\ni = 22 + -24\nk = c(i)\nprint(isprime(211))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Suppose -3*j + 134 = -2*r, 0 = 4*j - 0*r + 3*r - 156. What is the highest common divisor of 168 and j?", + "Output Program": [ + "from sympy import *\nj, r = symbols(\"j r\")\nj = solve([Eq(-3*j + 134, -2*r), Eq(0, 4*j - 0*r + 3*r - 156)])[j]\nprint(gcd(168, j))" + ], + "Output Answer": [ + "42" + ], + "split": "test" + }, + { + "Input": "Suppose 12*n = 48*n - 324. Let s(d) = -17*d**2 - 2*d + 1. Let m be s(-2). Let u be (m/(-4))/((-2)/(-8)). Calculate the greatest common factor of n and u.", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\nn = solve([Eq(12*n, 48*n - 324)])[n]\nd = symbols(\"d\")\ndef s(d):\n\treturn -17*d**2 - 2*d + 1\nm = s(-2)\nu = (m/(-4))/((-2)/(-8))\nprint(gcd(n, u))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 99617 is divided by 3320.", + "Output Program": [ + "from sympy import *\nprint(99617 % 3320)" + ], + "Output Answer": [ + "17" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 5277236?", + "Output Program": [ + "from sympy import *\nprint(primefactors(5277236))" + ], + "Output Answer": [ + "[2, 37, 181, 197]" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of -1 + (2 - 3) + 40?", + "Output Program": [ + "from sympy import *\nj = -1 + (2 - 3) + 40\nprint(primefactors(38))" + ], + "Output Answer": [ + "[2, 19]" + ], + "split": "test" + }, + { + "Input": "What is the thousands digit of 5468597?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(5468597))[3])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "What is the hundred millions digit of 1408353298?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1408353298))[1])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Suppose 20 = 2*m + 4*c, 4*c - 7*c = 5*m - 71. Let t = 40 + 0. Calculate the highest common divisor of m and t.", + "Output Program": [ + "from sympy import *\nm, c = symbols(\"m c\")\nm = solve([Eq(20, 2*m + 4*c), Eq(4*c - 7*c, 5*m - 71)])[m]\nt = 40 + 0\nprint(gcd(m, t))" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "Let p(z) = -2*z**3 + 10*z**2 + 4*z - 11. Calculate the remainder when 43 is divided by p(5).", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\ndef p(z):\n\treturn -2*z**3 + 10*z**2 + 4*z - 11\nq = p(5)\nprint(43 % q)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Suppose -9*a - 13362 = -11*a. Suppose 0 = -12*l - 5*l + a. What are the prime factors of l?", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\na = solve([Eq(-9*a - 13362, -11*a)])[a]\nl = symbols(\"l\")\nl = solve([Eq(0, -12*l - 5*l + a)])[l]\nprint(primefactors(393))" + ], + "Output Answer": [ + "[3, 131]" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 887429354?", + "Output Program": [ + "from sympy import *\nprint(primefactors(887429354))" + ], + "Output Answer": [ + "[2, 7, 63387811]" + ], + "split": "test" + }, + { + "Input": "Let i be (0 - -1 - -2) + (-20)/(-20). Let h be (2 - -12)/(i/44). Let a = h + -123. Does 3 divide a?", + "Output Program": [ + "from sympy import *\ni = (0 - -1 - -2) + (-20)/(-20)\nh = (2 - -12)/(i/44)\na = h + -123\nprint(31 % 3 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Suppose 0 = -0*x - 4*x + 216. Suppose -2*m - s = -0*m - 57, -4*s - 69 = -3*m. Let z = x - m. What are the prime factors of z?", + "Output Program": [ + "from sympy import *\nx = symbols(\"x\")\nx = solve([Eq(0, -0*x - 4*x + 216)])[x]\nm, s = symbols(\"m s\")\nm = solve([Eq(-2*m - s, -0*m - 57), Eq(-4*s - 69, -3*m)])[m]\nz = x - m\nprint(primefactors(27))" + ], + "Output Answer": [ + "[3]" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 34284084?", + "Output Program": [ + "from sympy import *\nprint(primefactors(34284084))" + ], + "Output Answer": [ + "[2, 3, 107, 26701]" + ], + "split": "test" + }, + { + "Input": "Calculate the greatest common divisor of 17 and 17.", + "Output Program": [ + "from sympy import *\nprint(gcd(17, 17))" + ], + "Output Answer": [ + "17" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 143592993?", + "Output Program": [ + "from sympy import *\nprint(primefactors(143592993))" + ], + "Output Answer": [ + "[3, 67, 26459]" + ], + "split": "test" + }, + { + "Input": "Is 26063 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(26063))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 1388281343.", + "Output Program": [ + "from sympy import *\nprint(primefactors(1388281343))" + ], + "Output Answer": [ + "[281, 4940503]" + ], + "split": "test" + }, + { + "Input": "Let l = 8 - 5. Suppose -25*w + 31 = -24*w + 4*b, w = b + 11. What is the remainder when w is divided by (16/6)/(1/l)?", + "Output Program": [ + "from sympy import *\nw, b = symbols(\"w b\")\nw = solve([Eq(-25*w + 31, -24*w + 4*b), Eq(w, b + 11)])[w]\nl = 8 - 5\nv = (16/6)/(1/l)\nprint(w % v)" + ], + "Output Answer": [ + "7.00000000000000" + ], + "split": "test" + }, + { + "Input": "Suppose 0 = -20*n + 1027 - 447. Calculate the greatest common factor of 14848 and n.", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\nn = solve([Eq(0, -20*n + 1027 - 447)])[n]\nprint(gcd(14848, n))" + ], + "Output Answer": [ + "29" + ], + "split": "test" + }, + { + "Input": "Let g(z) = -z**3 + 13*z**2 - 35*z - 5. Let c = 3 - 2. What is the remainder when (-6)/7*(c + -8) is divided by g(9)?", + "Output Program": [ + "from sympy import *\nc = 3 - 2\nf = (-6)/7*(c + -8)\nz = symbols(\"z\")\ndef g(z):\n\treturn -z**3 + 13*z**2 - 35*z - 5\no = g(9)\nprint(f % o)" + ], + "Output Answer": [ + "2.0" + ], + "split": "test" + }, + { + "Input": "Is 5539 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(5539))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common divisor of 81 and 1.", + "Output Program": [ + "from sympy import *\nprint(gcd(81, 1))" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Suppose -5*m - 58 = -6*m. What is the tens digit of m?", + "Output Program": [ + "from sympy import *\nm = symbols(\"m\")\nm = solve([Eq(-5*m - 58, -6*m)])[m]\ndigit = int(str(int(58))[0])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "test" + }, + { + "Input": "Let j(f) be the second derivative of 11/12*f**4 + 5*f**3 + 4*f**2 + 0 + 17*f - 1/20*f**5. Does 15 divide j(13)?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\ndef l(f):\n\treturn 11/12*f**4 + 5*f**3 + 4*f**2 + 0 + 17*f - 1/20*f**5\ndef j(val):\n\treturn diff(11/12*f**4 + 5*f**3 + 4*f**2 + 0 + 17*f - 1/20*f**5, f, 2).subs(f, val)\nv = j(13)\nprint(60 % 15 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What is the highest common factor of 3 and 14?", + "Output Program": [ + "from sympy import *\nprint(gcd(3, 14))" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "What is the hundred thousands digit of 5034803297?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(5034803297))[4])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "Suppose -3*c = -x - 33 + 4, c - 19 = 5*x. Let b = 15 - c. Let h(n) = n**2 - 4*n + 2. Does 7 divide h(b)?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef h(n):\n\treturn n**2 - 4*n + 2\nc, x = symbols(\"c x\")\nc = solve([Eq(-3*c, -x - 33 + 4), Eq(c - 19, 5*x)])[c]\nb = 15 - c\nj = h(b)\nprint(14 % 7 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 45 is divided by 44.", + "Output Program": [ + "from sympy import *\nprint(45 % 44)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Let q be 74/8 - (-3)/(-12). Suppose 2*j - 48 = 2*m - 7*m, 2*m = -3*j + 50. Let b = j - 5. Calculate the highest common divisor of q and b.", + "Output Program": [ + "from sympy import *\nq = 74/8 - (-3)/(-12)\nj, m = symbols(\"j m\")\nj = solve([Eq(2*j - 48, 2*m - 7*m), Eq(2*m, -3*j + 50)])[j]\nb = j - 5\nprint(gcd(q, b))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "Suppose -28 = -4*d + 4*f, -d + 4*f - 2 + 3 = 0. Let r be 3*(d/(-3) + 2). What is the units digit of (-6)/4*2/r?", + "Output Program": [ + "from sympy import *\nd, f = symbols(\"d f\")\nd = solve([Eq(-28, -4*d + 4*f), Eq(-d + 4*f - 2 + 3, 0)])[d]\nr = 3*(d/(-3) + 2)\nb = (-6)/4*2/r\ndigit = int(str(int(1))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "What is the highest common factor of 6489 and 189?", + "Output Program": [ + "from sympy import *\nprint(gcd(6489, 189))" + ], + "Output Answer": [ + "63" + ], + "split": "test" + }, + { + "Input": "What is the highest common divisor of 444 and 24?", + "Output Program": [ + "from sympy import *\nprint(gcd(444, 24))" + ], + "Output Answer": [ + "12" + ], + "split": "test" + }, + { + "Input": "Let q(f) be the second derivative of f**5/20 + f**4/2 + f**3/3 - 3*f**2 - 345*f. Suppose 2*n + 13 = -3*n - 3*v, 4*v = 16. Does 2 divide q(n)?", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\ndef c(f):\n\treturn f**5/20 + f**4/2 + f**3/3 - 3*f**2 - 345*f\ndef q(val):\n\treturn diff(f**5/20 + f**4/2 + f**3/3 - 3*f**2 - 345*f, f, 2).subs(f, val)\nn, v = symbols(\"n v\")\nn = solve([Eq(2*n + 13, -3*n - 3*v), Eq(4*v, 16)])[n]\nz = q(n)\nprint(9 % 2 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Does 87 divide 1727907?", + "Output Program": [ + "from sympy import *\nprint(1727907 % 87 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What is the units digit of 118324?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(118324))[5])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "What is the highest common factor of 162 and 1728?", + "Output Program": [ + "from sympy import *\nprint(gcd(162, 1728))" + ], + "Output Answer": [ + "54" + ], + "split": "test" + }, + { + "Input": "Let x be 49/((-20)/1400*-7). Calculate the greatest common factor of x and 20.", + "Output Program": [ + "from sympy import *\nx = 49/((-20)/1400*-7)\nprint(gcd(x, 20))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 9115 is divided by 240.", + "Output Program": [ + "from sympy import *\nprint(9115 % 240)" + ], + "Output Answer": [ + "235" + ], + "split": "test" + }, + { + "Input": "Let z = -141 - -212. Suppose 0*n + 2*y = 4*n - 46, 0 = -4*n - 3*y + z. List the prime factors of n.", + "Output Program": [ + "from sympy import *\nz = -141 - -212\nn, y = symbols(\"n y\")\nn = solve([Eq(0*n + 2*y, 4*n - 46), Eq(0, -4*n - 3*y + z)])[n]\nprint(primefactors(14))" + ], + "Output Answer": [ + "[2, 7]" + ], + "split": "test" + }, + { + "Input": "What is the hundred thousands digit of 68432683?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(68432683))[2])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Suppose -2*r = -4 - 2. Suppose -2*f - r*f = 45. Does 17 divide 2*68/(-24)*f?", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\nr = solve([Eq(-2*r, -4 - 2)])[r]\nf = symbols(\"f\")\nf = solve([Eq(-2*f - r*f, 45)])[f]\ny = 2*68/(-24)*f\nprint(51 % 17 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 1754968745.", + "Output Program": [ + "from sympy import *\nprint(primefactors(1754968745))" + ], + "Output Answer": [ + "[5, 31, 223, 50773]" + ], + "split": "test" + }, + { + "Input": "Let a(q) = q**3 + 15*q**2 - 4*q - 56. Let i be a(-15). Suppose -x + 1392 = i*w, 2*x = -4*w + 1658 - 270. What is the tens digit of w?", + "Output Program": [ + "from sympy import *\nq = symbols(\"q\")\ndef a(q):\n\treturn q**3 + 15*q**2 - 4*q - 56\ni = a(-15)\nw, x = symbols(\"w x\")\nw = solve([Eq(-x + 1392, i*w), Eq(2*x, -4*w + 1658 - 270)])[w]\ndigit = int(str(int(349))[1])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "What is the hundred thousands digit of 2976716?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2976716))[1])\nprint(digit)" + ], + "Output Answer": [ + "9" + ], + "split": "test" + }, + { + "Input": "Is 94993741 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(94993741))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Suppose -j + n + 9 = 0, 4*j - 2*n = -8 + 34. Let t = j - 1. Suppose t*i - 14 - 25 = 0. What is the remainder when i is divided by 7?", + "Output Program": [ + "from sympy import *\nj, n = symbols(\"j n\")\nj = solve([Eq(-j + n + 9, 0), Eq(4*j - 2*n, -8 + 34)])[j]\nt = j - 1\ni = symbols(\"i\")\ni = solve([Eq(t*i - 14 - 25, 0)])[i]\nprint(i % 7)" + ], + "Output Answer": [ + "6" + ], + "split": "test" + }, + { + "Input": "What is the greatest common divisor of 76 and 15922?", + "Output Program": [ + "from sympy import *\nprint(gcd(76, 15922))" + ], + "Output Answer": [ + "38" + ], + "split": "test" + }, + { + "Input": "Let k(i) = 5*i - 4. Let l be k(-4). Calculate the remainder when 3 is divided by 2*1*(-36)/l.", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ndef k(i):\n\treturn 5*i - 4\nl = k(-4)\nz = 2*1*(-36)/l\nprint(3 % z)" + ], + "Output Answer": [ + "0.0" + ], + "split": "test" + }, + { + "Input": "Suppose o = -0*o - 3*k + 1382, 3*o = 4*k + 4172. What are the prime factors of o?", + "Output Program": [ + "from sympy import *\no, k = symbols(\"o k\")\no = solve([Eq(o, -0*o - 3*k + 1382), Eq(3*o, 4*k + 4172)])[o]\nprint(primefactors(1388))" + ], + "Output Answer": [ + "[2, 347]" + ], + "split": "test" + }, + { + "Input": "Does 154 divide 20418?", + "Output Program": [ + "from sympy import *\nprint(20418 % 154 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let a(j) = -7 + 2*j**3 - 13*j - j**2 - 10*j**2 - 3*j**3. Is a(-10) composite?", + "Output Program": [ + "from sympy import *\nj = symbols(\"j\")\ndef a(j):\n\treturn -7 + 2*j**3 - 13*j - j**2 - 10*j**2 - 3*j**3\nn = a(-10)\nprint(not isprime(23))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 204464.", + "Output Program": [ + "from sympy import *\nprint(primefactors(204464))" + ], + "Output Answer": [ + "[2, 13, 983]" + ], + "split": "test" + }, + { + "Input": "Suppose -5*t + 65 + 0 = 5*j, 6 = 2*j - 3*t. Let n(q) = -6 - j - 2*q + 7 + 3*q**2. What is the tens digit of n(6)?", + "Output Program": [ + "from sympy import *\nj, t = symbols(\"j t\")\nj = solve([Eq(-5*t + 65 + 0, 5*j), Eq(6, 2*j - 3*t)])[j]\nq = symbols(\"q\")\ndef n(q):\n\treturn -6 - j - 2*q + 7 + 3*q**2\nh = n(6)\ndigit = int(str(int(88))[0])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "Let h = 4280 + -9648. Let d = -3467 - h. Is d a prime number?", + "Output Program": [ + "from sympy import *\nh = 4280 + -9648\nd = -3467 - h\nprint(isprime(1901))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What is the tens digit of 1186132?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1186132))[5])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "What is the highest common factor of 145 and 783?", + "Output Program": [ + "from sympy import *\nprint(gcd(145, 783))" + ], + "Output Answer": [ + "29" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 2364286.", + "Output Program": [ + "from sympy import *\nprint(primefactors(2364286))" + ], + "Output Answer": [ + "[2, 1182143]" + ], + "split": "test" + }, + { + "Input": "Is 72671 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(72671))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Does 160 divide 10440773?", + "Output Program": [ + "from sympy import *\nprint(10440773 % 160 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 31228438?", + "Output Program": [ + "from sympy import *\nprint(primefactors(31228438))" + ], + "Output Answer": [ + "[2, 19, 821801]" + ], + "split": "test" + }, + { + "Input": "Calculate the greatest common factor of 6903 and 7521.", + "Output Program": [ + "from sympy import *\nprint(gcd(6903, 7521))" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Suppose -5*i - 17 = 2*r + 2343, 3*r = -i - 485. Let m be i/(-14) + (-21)/(-49). Let c be (6/8)/(2/136). Calculate the greatest common factor of c and m.", + "Output Program": [ + "from sympy import *\nc = (6/8)/(2/136)\ni, r = symbols(\"i r\")\ni = solve([Eq(-5*i - 17, 2*r + 2343), Eq(3*r, -i - 485)])[i]\nm = i/(-14) + (-21)/(-49)\nprint(gcd(c, m))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "Is 497219 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(497219))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "What is the tens digit of (5/((-40)/(-18)))/(375/13178500)?", + "Output Program": [ + "from sympy import *\ns = (5/((-40)/(-18)))/(375/13178500)\ndigit = int(str(int(79071))[3])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "What is the greatest common factor of 41436 and 184068?", + "Output Program": [ + "from sympy import *\nprint(gcd(41436, 184068))" + ], + "Output Answer": [ + "36" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common factor of 96486038 and 2255.", + "Output Program": [ + "from sympy import *\nprint(gcd(96486038, 2255))" + ], + "Output Answer": [ + "451" + ], + "split": "test" + }, + { + "Input": "Let x(b) be the first derivative of b**2/2 + 4*b - 3. Is x(0) prime?", + "Output Program": [ + "from sympy import *\nb = symbols(\"b\")\ndef i(b):\n\treturn b**2/2 + 4*b - 3\ndef x(val):\n\treturn diff(b**2/2 + 4*b - 3, b, 1).subs(b, val)\nj = x(0)\nprint(isprime(4))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Is (-5 + 2 - -5) + 1*4247 prime?", + "Output Program": [ + "from sympy import *\na = (-5 + 2 - -5) + 1*4247\nprint(isprime(4249))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 656533.", + "Output Program": [ + "from sympy import *\nprint(primefactors(656533))" + ], + "Output Answer": [ + "[41, 67, 239]" + ], + "split": "test" + }, + { + "Input": "Is 98327782919 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(98327782919))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let c(w) = 2*w**2 + 17*w - 27. Let p be c(-12). Calculate the highest common divisor of p and 3.", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef c(w):\n\treturn 2*w**2 + 17*w - 27\np = c(-12)\nprint(gcd(p, 3))" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Let t = -1155 - -1266. What is the remainder when 664 is divided by t?", + "Output Program": [ + "from sympy import *\nt = -1155 - -1266\nprint(664 % t)" + ], + "Output Answer": [ + "109" + ], + "split": "test" + }, + { + "Input": "Calculate the greatest common divisor of 1848 and 840.", + "Output Program": [ + "from sympy import *\nprint(gcd(1848, 840))" + ], + "Output Answer": [ + "168" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 7970.", + "Output Program": [ + "from sympy import *\nprint(primefactors(7970))" + ], + "Output Answer": [ + "[2, 5, 797]" + ], + "split": "test" + }, + { + "Input": "Let c be (-4)/(-24) + (-10)/(-12) - -3. What is the highest common factor of 10 and c?", + "Output Program": [ + "from sympy import *\nc = (-4)/(-24) + (-10)/(-12) - -3\nprint(gcd(10, c))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "Calculate the greatest common divisor of 16 and 484.", + "Output Program": [ + "from sympy import *\nprint(gcd(16, 484))" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Is 39817051 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(39817051))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let f = 2 - -3. Let p(r) = 18*r**2 - 5*r + 12. Is p(f) prime?", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\ndef p(r):\n\treturn 18*r**2 - 5*r + 12\nf = 2 - -3\nj = p(f)\nprint(isprime(437))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "What is the hundreds digit of ((-18903)/4)/(9/(-60))?", + "Output Program": [ + "from sympy import *\na = ((-18903)/4)/(9/(-60))\ndigit = int(str(int(31505))[2])\nprint(digit)" + ], + "Output Answer": [ + "5" + ], + "split": "test" + }, + { + "Input": "Is 79583 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(79583))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 98067.", + "Output Program": [ + "from sympy import *\nprint(primefactors(98067))" + ], + "Output Answer": [ + "[3, 97, 337]" + ], + "split": "test" + }, + { + "Input": "Let r = -1959 + 2915. Suppose 5*b + 2*w = 958, 4*w + 0 = -5*b + r. Does 32 divide b?", + "Output Program": [ + "from sympy import *\nr = -1959 + 2915\nb, w = symbols(\"b w\")\nb = solve([Eq(5*b + 2*w, 958), Eq(4*w + 0, -5*b + r)])[b]\nprint(192 % 32 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let t be (-140)/6 + (-2)/(-6). Let w = t + 34. Calculate the highest common divisor of w and 77.", + "Output Program": [ + "from sympy import *\nt = (-140)/6 + (-2)/(-6)\nw = t + 34\nprint(gcd(w, 77))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "What is the units digit of 8558?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(8558))[3])\nprint(digit)" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common factor of 32057440 and 14325.", + "Output Program": [ + "from sympy import *\nprint(gcd(32057440, 14325))" + ], + "Output Answer": [ + "955" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 732012296.", + "Output Program": [ + "from sympy import *\nprint(primefactors(732012296))" + ], + "Output Answer": [ + "[2, 91501537]" + ], + "split": "test" + }, + { + "Input": "Let s = -94675 + 143340. Is s composite?", + "Output Program": [ + "from sympy import *\ns = -94675 + 143340\nprint(not isprime(48665))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Suppose 4*o + 178 = 2*i, 0*o = -3*i - 5*o + 223. Calculate the highest common factor of 6 and i.", + "Output Program": [ + "from sympy import *\ni, o = symbols(\"i o\")\ni = solve([Eq(4*o + 178, 2*i), Eq(0*o, -3*i - 5*o + 223)])[i]\nprint(gcd(6, i))" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Is 8840093 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(8840093))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let w = -41 + 44. Suppose 3*j + 2127 = 4*r, 0 = w*r - 5*j - 0*j - 1609. Let l = r + 221. Is l prime?", + "Output Program": [ + "from sympy import *\nw = -41 + 44\nr, j = symbols(\"r j\")\nr = solve([Eq(3*j + 2127, 4*r), Eq(0, w*r - 5*j - 0*j - 1609)])[r]\nl = r + 221\nprint(isprime(749))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "What is the greatest common factor of 1352 and 16?", + "Output Program": [ + "from sympy import *\nprint(gcd(1352, 16))" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "What is the millions digit of 1084791377?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(1084791377))[3])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Suppose 3*z + 49 = 5*i - 4, -z = -5*i + 51. Suppose 14*d = -i*d + 264. Calculate the greatest common factor of d and 88.", + "Output Program": [ + "from sympy import *\ni, z = symbols(\"i z\")\ni = solve([Eq(3*z + 49, 5*i - 4), Eq(-z, -5*i + 51)])[i]\nd = symbols(\"d\")\nd = solve([Eq(14*d, -i*d + 264)])[d]\nprint(gcd(d, 88))" + ], + "Output Answer": [ + "11" + ], + "split": "test" + }, + { + "Input": "Let u(k) = k**3 - 3*k**2 + k - 2. Let o be u(3). Let d be o + (1 - (2 + -2)). Suppose -d*g + 5*g - 48 = 0. What is the units digit of g?", + "Output Program": [ + "from sympy import *\nk = symbols(\"k\")\ndef u(k):\n\treturn k**3 - 3*k**2 + k - 2\no = u(3)\nd = o + (1 - (2 + -2))\ng = symbols(\"g\")\ng = solve([Eq(-d*g + 5*g - 48, 0)])[g]\ndigit = int(str(int(16))[1])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "test" + }, + { + "Input": "What is the remainder when 3890880 is divided by 1655?", + "Output Program": [ + "from sympy import *\nprint(3890880 % 1655)" + ], + "Output Answer": [ + "1630" + ], + "split": "test" + }, + { + "Input": "Suppose 2*w - 33 = 5*b + 22, -2*b - 46 = -2*w. Suppose 5*n - w = 25. What are the prime factors of n?", + "Output Program": [ + "from sympy import *\nw, b = symbols(\"w b\")\nw = solve([Eq(2*w - 33, 5*b + 22), Eq(-2*b - 46, -2*w)])[w]\nn = symbols(\"n\")\nn = solve([Eq(5*n - w, 25)])[n]\nprint(primefactors(9))" + ], + "Output Answer": [ + "[3]" + ], + "split": "test" + }, + { + "Input": "Let p = 4080 + 2941. What are the prime factors of p?", + "Output Program": [ + "from sympy import *\np = 4080 + 2941\nprint(primefactors(7021))" + ], + "Output Answer": [ + "[7, 17, 59]" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 100 is divided by 2 - (4 + 1) - (-435)/15.", + "Output Program": [ + "from sympy import *\nu = 2 - (4 + 1) - (-435)/15\nprint(100 % u)" + ], + "Output Answer": [ + "22.0" + ], + "split": "test" + }, + { + "Input": "Is 58937 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(58937))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let n(r) = -4*r - 12. Let k(a) = -4*a - 13. Let u(p) = 3*k(p) - 2*n(p). Is u(-16) composite?", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\ndef k(a):\n\treturn -4*a - 13\nr = symbols(\"r\")\ndef n(r):\n\treturn -4*r - 12\ndef u(p):\n\treturn 3*k(p) - 2*n(p)\nc = u(-16)\nprint(not isprime(49))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Suppose b - 4*j = 75, 4 = -2*j - 2. What is the remainder when b is divided by 23?", + "Output Program": [ + "from sympy import *\nb, j = symbols(\"b j\")\nb = solve([Eq(b - 4*j, 75), Eq(4, -2*j - 2)])[b]\nprint(b % 23)" + ], + "Output Answer": [ + "17" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 574829 is divided by 2098.", + "Output Program": [ + "from sympy import *\nprint(574829 % 2098)" + ], + "Output Answer": [ + "2075" + ], + "split": "test" + }, + { + "Input": "Suppose -27223 = 63*n - 82842 - 162172. What are the prime factors of n?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\nn = solve([Eq(-27223, 63*n - 82842 - 162172)])[n]\nprint(primefactors(3457))" + ], + "Output Answer": [ + "[3457]" + ], + "split": "test" + }, + { + "Input": "Suppose 6384 - 2034 = 50*z. What is the highest common divisor of z and 12?", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\nz = solve([Eq(6384 - 2034, 50*z)])[z]\nprint(gcd(z, 12))" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Let u(f) = f + 1 + f - 3*f. Calculate the remainder when 18 is divided by u(-9).", + "Output Program": [ + "from sympy import *\nf = symbols(\"f\")\ndef u(f):\n\treturn f + 1 + f - 3*f\nl = u(-9)\nprint(18 % l)" + ], + "Output Answer": [ + "8" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common factor of 1225 and 14455.", + "Output Program": [ + "from sympy import *\nprint(gcd(1225, 14455))" + ], + "Output Answer": [ + "245" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 507 is divided by 73.", + "Output Program": [ + "from sympy import *\nprint(507 % 73)" + ], + "Output Answer": [ + "69" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 9024667 is divided by 772.", + "Output Program": [ + "from sympy import *\nprint(9024667 % 772)" + ], + "Output Answer": [ + "759" + ], + "split": "test" + }, + { + "Input": "What is the tens digit of 71370?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(71370))[3])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Let t be 8/52 - (-102)/13. Let b be (-7 + t)*(-8)/(-2). Suppose -1068 = b*r - 8*r. Is r a prime number?", + "Output Program": [ + "from sympy import *\nt = 8/52 - (-102)/13\nb = (-7 + t)*(-8)/(-2)\nr = symbols(\"r\")\nr = solve([Eq(-1068, b*r - 8*r)])[r]\nprint(isprime(267))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let q = 721 + -485. Suppose 5*n + 661 = 2*y, -n = 3*y - q - 730. List the prime factors of y.", + "Output Program": [ + "from sympy import *\nq = 721 + -485\ny, n = symbols(\"y n\")\ny = solve([Eq(5*n + 661, 2*y), Eq(-n, 3*y - q - 730)])[y]\nprint(primefactors(323))" + ], + "Output Answer": [ + "[17, 19]" + ], + "split": "test" + }, + { + "Input": "Suppose 0*j = -r + j - 3, -2*r = 4*j - 6. What is the units digit of (-6)/((-3)/r) + 9?", + "Output Program": [ + "from sympy import *\nr, j = symbols(\"r j\")\nr = solve([Eq(0*j, -r + j - 3), Eq(-2*r, 4*j - 6)])[r]\nm = (-6)/((-3)/r) + 9\ndigit = int(str(int(7))[0])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Is 540743 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(540743))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Is 799921 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(799921))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What is the units digit of 6737?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(6737))[3])\nprint(digit)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "What is the remainder when (-162)/486 + (-14434)/(-3) is divided by 12?", + "Output Program": [ + "from sympy import *\np = (-162)/486 + (-14434)/(-3)\nprint(p % 12)" + ], + "Output Answer": [ + "11.0" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of (-100)/60*-409*(8 + -2)?", + "Output Program": [ + "from sympy import *\nx = (-100)/60*-409*(8 + -2)\nprint(primefactors(4090))" + ], + "Output Answer": [ + "[2, 5, 409]" + ], + "split": "test" + }, + { + "Input": "Suppose m = -5*v + 290, 2*v = 3*v + 4*m - 77. Calculate the remainder when v is divided by 12.", + "Output Program": [ + "from sympy import *\nv, m = symbols(\"v m\")\nv = solve([Eq(m, -5*v + 290), Eq(2*v, 3*v + 4*m - 77)])[v]\nprint(v % 12)" + ], + "Output Answer": [ + "9" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 21081?", + "Output Program": [ + "from sympy import *\nprint(primefactors(21081))" + ], + "Output Answer": [ + "[3, 7027]" + ], + "split": "test" + }, + { + "Input": "What is the remainder when 4706 is divided by 781?", + "Output Program": [ + "from sympy import *\nprint(4706 % 781)" + ], + "Output Answer": [ + "20" + ], + "split": "test" + }, + { + "Input": "What is the ten thousands digit of 76053*(-12)/36*(25/5)/(-5)?", + "Output Program": [ + "from sympy import *\ny = 76053*(-12)/36*(25/5)/(-5)\ndigit = int(str(int(25351))[0])\nprint(digit)" + ], + "Output Answer": [ + "2" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 10496 is divided by 327.", + "Output Program": [ + "from sympy import *\nprint(10496 % 327)" + ], + "Output Answer": [ + "32" + ], + "split": "test" + }, + { + "Input": "Let z be (4*-2)/((-4)/10). Let i(n) be the third derivative of -n**4/3 + 5*n**3/3 - 3*n**2. Let d be i(-5). What is the highest common factor of d and z?", + "Output Program": [ + "from sympy import *\nn = symbols(\"n\")\ndef y(n):\n\treturn -n**4/3 + 5*n**3/3 - 3*n**2\ndef i(val):\n\treturn diff(-n**4/3 + 5*n**3/3 - 3*n**2, n, 3).subs(n, val)\nd = i(-5)\nz = (4*-2)/((-4)/10)\nprint(gcd(d, z))" + ], + "Output Answer": [ + "1.00000000000000" + ], + "split": "test" + }, + { + "Input": "What is the greatest common factor of 411 and 959?", + "Output Program": [ + "from sympy import *\nprint(gcd(411, 959))" + ], + "Output Answer": [ + "137" + ], + "split": "test" + }, + { + "Input": "Let p = -6589 - -6620. Calculate the remainder when 364 is divided by p.", + "Output Program": [ + "from sympy import *\np = -6589 - -6620\nprint(364 % p)" + ], + "Output Answer": [ + "23" + ], + "split": "test" + }, + { + "Input": "Suppose -3*r = 48 - 141. Let w = r - 11. What is the remainder when 75 is divided by w?", + "Output Program": [ + "from sympy import *\nr = symbols(\"r\")\nr = solve([Eq(-3*r, 48 - 141)])[r]\nw = r - 11\nprint(75 % w)" + ], + "Output Answer": [ + "15" + ], + "split": "test" + }, + { + "Input": "Let t(w) = 3*w**2 - 23*w + 9. Let p be t(12). Let m = 251 - p. What is the remainder when m is divided by 23?", + "Output Program": [ + "from sympy import *\nw = symbols(\"w\")\ndef t(w):\n\treturn 3*w**2 - 23*w + 9\np = t(12)\nm = 251 - p\nprint(m % 23)" + ], + "Output Answer": [ + "17" + ], + "split": "test" + }, + { + "Input": "Suppose 2*b - 5*d = -b + 33, -3*d - 23 = -2*b. What is the remainder when 45 is divided by b?", + "Output Program": [ + "from sympy import *\nb, d = symbols(\"b d\")\nb = solve([Eq(2*b - 5*d, -b + 33), Eq(-3*d - 23, -2*b)])[b]\nprint(45 % b)" + ], + "Output Answer": [ + "13" + ], + "split": "test" + }, + { + "Input": "Does 49 divide ((-778)/6 + -1)*(-15)/10?", + "Output Program": [ + "from sympy import *\nt = ((-778)/6 + -1)*(-15)/10\nprint(196 % 49 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Calculate the greatest common factor of 19200 and 45.", + "Output Program": [ + "from sympy import *\nprint(gcd(19200, 45))" + ], + "Output Answer": [ + "15" + ], + "split": "test" + }, + { + "Input": "Let z = 5494 + 2441. What are the prime factors of z?", + "Output Program": [ + "from sympy import *\nz = 5494 + 2441\nprint(primefactors(7935))" + ], + "Output Answer": [ + "[3, 5, 23]" + ], + "split": "test" + }, + { + "Input": "Suppose -96 = -4*j - 3*l, -3*j + j + 48 = -3*l. What is the remainder when j is divided by 17?", + "Output Program": [ + "from sympy import *\nj, l = symbols(\"j l\")\nj = solve([Eq(-96, -4*j - 3*l), Eq(-3*j + j + 48, -3*l)])[j]\nprint(j % 17)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Let b = -33 - -66. Does 14 divide b?", + "Output Program": [ + "from sympy import *\nb = -33 - -66\nprint(33 % 14 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 1759 is divided by 246.", + "Output Program": [ + "from sympy import *\nprint(1759 % 246)" + ], + "Output Answer": [ + "37" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 8655108?", + "Output Program": [ + "from sympy import *\nprint(primefactors(8655108))" + ], + "Output Answer": [ + "[2, 3, 7, 11, 17, 19, 29]" + ], + "split": "test" + }, + { + "Input": "Is 195949809823 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(195949809823))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 1430542 is divided by 2816.", + "Output Program": [ + "from sympy import *\nprint(1430542 % 2816)" + ], + "Output Answer": [ + "14" + ], + "split": "test" + }, + { + "Input": "Suppose z - 2*o - 21 = 10, -93 = -3*z - 4*o. Suppose 7 = -3*k + z. What is the remainder when 1*((1 - -1) + 21) is divided by k?", + "Output Program": [ + "from sympy import *\nl = 1*((1 - -1) + 21)\nz, o = symbols(\"z o\")\nz = solve([Eq(z - 2*o - 21, 10), Eq(-93, -3*z - 4*o)])[z]\nk = symbols(\"k\")\nk = solve([Eq(7, -3*k + z)])[k]\nprint(l % k)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Let i = 37 + -28. Let f be 1 - (2 - i - -3). Suppose -3*a + 706 = f*r + a, a - 280 = -2*r. What are the prime factors of r?", + "Output Program": [ + "from sympy import *\ni = 37 + -28\nf = 1 - (2 - i - -3)\nr, a = symbols(\"r a\")\nr = solve([Eq(-3*a + 706, f*r + a), Eq(a - 280, -2*r)])[r]\nprint(primefactors(138))" + ], + "Output Answer": [ + "[2, 3, 23]" + ], + "split": "test" + }, + { + "Input": "Let s be (-2)/8 - 129/12. Let l = -14 - s. Does 24 divide -3 + l + 7 + 28?", + "Output Program": [ + "from sympy import *\ns = (-2)/8 - 129/12\nl = -14 - s\nh = -3 + l + 7 + 28\nprint(29 % 24 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Suppose 10 = -5*t + 55. Calculate the remainder when 76 is divided by t.", + "Output Program": [ + "from sympy import *\nt = symbols(\"t\")\nt = solve([Eq(10, -5*t + 55)])[t]\nprint(76 % t)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "What is the thousands digit of 54643?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(54643))[1])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Does 1570 divide 21701891?", + "Output Program": [ + "from sympy import *\nprint(21701891 % 1570 == 0)" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Is 1784022341 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(1784022341))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What is the remainder when 716837 is divided by 7467?", + "Output Program": [ + "from sympy import *\nprint(716837 % 7467)" + ], + "Output Answer": [ + "5" + ], + "split": "test" + }, + { + "Input": "Does 666 divide 819190656?", + "Output Program": [ + "from sympy import *\nprint(819190656 % 666 == 0)" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "Let f(g) = -g**3 - 20*g**2 - 21*g - 26. What is the remainder when f(-19) is divided by 8?", + "Output Program": [ + "from sympy import *\ng = symbols(\"g\")\ndef f(g):\n\treturn -g**3 - 20*g**2 - 21*g - 26\nk = f(-19)\nprint(k % 8)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Is 87361 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(87361))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "What is the units digit of 22084?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(22084))[4])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 5179 is divided by 49.", + "Output Program": [ + "from sympy import *\nprint(5179 % 49)" + ], + "Output Answer": [ + "34" + ], + "split": "test" + }, + { + "Input": "Let s = -5033 - -21873. What is the ten thousands digit of s?", + "Output Program": [ + "from sympy import *\ns = -5033 - -21873\ndigit = int(str(int(16840))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Is 83311 composite?", + "Output Program": [ + "from sympy import *\nprint(not isprime(83311))" + ], + "Output Answer": [ + "False" + ], + "split": "test" + }, + { + "Input": "Let k(a) = a + 7. Let d(n) = n + 3. Let m be d(4). What is the units digit of k(m)?", + "Output Program": [ + "from sympy import *\na = symbols(\"a\")\ndef k(a):\n\treturn a + 7\nn = symbols(\"n\")\ndef d(n):\n\treturn n + 3\nm = d(4)\nw = k(m)\ndigit = int(str(int(14))[1])\nprint(digit)" + ], + "Output Answer": [ + "4" + ], + "split": "test" + }, + { + "Input": "Is 277886599 a prime number?", + "Output Program": [ + "from sympy import *\nprint(isprime(277886599))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 318527.", + "Output Program": [ + "from sympy import *\nprint(primefactors(318527))" + ], + "Output Answer": [ + "[11, 23, 1259]" + ], + "split": "test" + }, + { + "Input": "Calculate the highest common divisor of 972 and 11421.", + "Output Program": [ + "from sympy import *\nprint(gcd(972, 11421))" + ], + "Output Answer": [ + "243" + ], + "split": "test" + }, + { + "Input": "Let g(i) = i**2 + i + 13. Let u be 3 + 3/(1/(-1)). What is the tens digit of g(u)?", + "Output Program": [ + "from sympy import *\ni = symbols(\"i\")\ndef g(i):\n\treturn i**2 + i + 13\nu = 3 + 3/(1/(-1))\na = g(u)\ndigit = int(str(int(13))[0])\nprint(digit)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Suppose -140*s + 144*s - 3539 = -3*v, 5*v + 1815 = 2*s. What is the highest common divisor of s and 1958?", + "Output Program": [ + "from sympy import *\ns, v = symbols(\"s v\")\ns = solve([Eq(-140*s + 144*s - 3539, -3*v), Eq(5*v + 1815, 2*s)])[s]\nprint(gcd(s, 1958))" + ], + "Output Answer": [ + "178" + ], + "split": "test" + }, + { + "Input": "Is 126830281 prime?", + "Output Program": [ + "from sympy import *\nprint(isprime(126830281))" + ], + "Output Answer": [ + "True" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 5727376060?", + "Output Program": [ + "from sympy import *\nprint(primefactors(5727376060))" + ], + "Output Answer": [ + "[2, 5, 7, 89, 173, 2657]" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 42 is divided by 23.", + "Output Program": [ + "from sympy import *\nprint(42 % 23)" + ], + "Output Answer": [ + "19" + ], + "split": "test" + }, + { + "Input": "List the prime factors of 5828130.", + "Output Program": [ + "from sympy import *\nprint(primefactors(5828130))" + ], + "Output Answer": [ + "[2, 3, 5, 7, 11, 29]" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 35904 is divided by 352.", + "Output Program": [ + "from sympy import *\nprint(35904 % 352)" + ], + "Output Answer": [ + "0" + ], + "split": "test" + }, + { + "Input": "What is the hundreds digit of 2352?", + "Output Program": [ + "from sympy import *\ndigit = int(str(int(2352))[1])\nprint(digit)" + ], + "Output Answer": [ + "3" + ], + "split": "test" + }, + { + "Input": "Calculate the greatest common divisor of 210 and 462.", + "Output Program": [ + "from sympy import *\nprint(gcd(210, 462))" + ], + "Output Answer": [ + "42" + ], + "split": "test" + }, + { + "Input": "What is the highest common divisor of 35 and 4?", + "Output Program": [ + "from sympy import *\nprint(gcd(35, 4))" + ], + "Output Answer": [ + "1" + ], + "split": "test" + }, + { + "Input": "Calculate the remainder when 10858 is divided by 10848.", + "Output Program": [ + "from sympy import *\nprint(10858 % 10848)" + ], + "Output Answer": [ + "10" + ], + "split": "test" + }, + { + "Input": "What is the remainder when 1292157 is divided by 423?", + "Output Program": [ + "from sympy import *\nprint(1292157 % 423)" + ], + "Output Answer": [ + "315" + ], + "split": "test" + }, + { + "Input": "Let n = -5 - -9. What are the prime factors of (16/(-10))/(n/(-30))?", + "Output Program": [ + "from sympy import *\nn = -5 - -9\nk = (16/(-10))/(n/(-30))\nprint(primefactors(12))" + ], + "Output Answer": [ + "[2, 3]" + ], + "split": "test" + }, + { + "Input": "Suppose 0 = 8*u - 10*u. Suppose f + 3*l - 21 = 0, u = -3*f + l + 35 - 12. Calculate the remainder when 16 is divided by f.", + "Output Program": [ + "from sympy import *\nu = symbols(\"u\")\nu = solve([Eq(0, 8*u - 10*u)])[u]\nf, l = symbols(\"f l\")\nf = solve([Eq(f + 3*l - 21, 0), Eq(u, -3*f + l + 35 - 12)])[f]\nprint(16 % f)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "What are the prime factors of 223788090?", + "Output Program": [ + "from sympy import *\nprint(primefactors(223788090))" + ], + "Output Answer": [ + "[2, 3, 5, 7459603]" + ], + "split": "test" + }, + { + "Input": "What is the remainder when 1218504 is divided by 277?", + "Output Program": [ + "from sympy import *\nprint(1218504 % 277)" + ], + "Output Answer": [ + "258" + ], + "split": "test" + }, + { + "Input": "Suppose -3*s - 26 = -5*s. What is the remainder when 76 is divided by s?", + "Output Program": [ + "from sympy import *\ns = symbols(\"s\")\ns = solve([Eq(-3*s - 26, -5*s)])[s]\nprint(76 % s)" + ], + "Output Answer": [ + "11" + ], + "split": "test" + }, + { + "Input": "Let x(s) = -3*s + s**2 - 3*s - 4*s + 6. Let g(q) = 2*q - 4. Let b be g(7). What is the units digit of x(b)?", + "Output Program": [ + "from sympy import *\ns = symbols(\"s\")\ndef x(s):\n\treturn -3*s + s**2 - 3*s - 4*s + 6\nq = symbols(\"q\")\ndef g(q):\n\treturn 2*q - 4\nb = g(7)\nt = x(b)\ndigit = int(str(int(6))[0])\nprint(digit)" + ], + "Output Answer": [ + "6" + ], + "split": "test" + }, + { + "Input": "Let s(z) = -6 + 3 + 7*z**2 + 4 + 3*z + z**3. Let g be s(-3). Suppose -10 = 2*h - g. Calculate the remainder when 16 is divided by h.", + "Output Program": [ + "from sympy import *\nz = symbols(\"z\")\ndef s(z):\n\treturn -6 + 3 + 7*z**2 + 4 + 3*z + z**3\ng = s(-3)\nh = symbols(\"h\")\nh = solve([Eq(-10, 2*h - g)])[h]\nprint(16 % h)" + ], + "Output Answer": [ + "7" + ], + "split": "test" + }, + { + "Input": "Suppose 4*b - b - 27 = 0. What is the remainder when b is divided by 4?", + "Output Program": [ + "from sympy import *\nb = symbols(\"b\")\nb = solve([Eq(4*b - b - 27, 0)])[b]\nprint(b % 4)" + ], + "Output Answer": [ + "1" + ], + "split": "test" + } + ], + "Metadata": [] +} \ No newline at end of file