Tested prompt · AI math solver
A remainder of a large power: every AI model's reply, tested
We ran this hard AI math solver test input on all 27 models in llmwise, the way the tool runs it, and checked every reply the same way. Here's each one as it came, with whether it passed, what it cost and how long it took.
Based on 27 of our test runs on , through OpenRouter with the tool's own instructions and the app's settings.
Short answer
All 27 models passed this AI math solver test input's check (final answer). The cheapest reply that passed was GPT-6 Luna's, at $0.000076; the fastest, DeepSeek V4.1 Flash's in 1.6 s. The dearest reply, Claude Fable 5.1's, cost 437 times as much ($0.0333).
The prompt, as sent, and its check
Checked by final answer, the same way for every model.
A remainder of a large power (hard)
Solve this math problem step by step. Number the steps, check the result, and end with a line that starts "Final answer:". --- What is the remainder when 7^100 is divided by 13?
Sent with the AI math solver's own instructions as the system prompt, as a run of the tool sends them.
The final answer must be 9.
How the AI math solver's test inputs are scored, with every model's results on all five.
Every model's result
All 27 models on this test input, in catalog order.
| Model | Result | Cost | Time | Reply |
|---|---|---|---|---|
| Claude Fable 5.2Anthropic | Passed: Final answer 9: right. | $0.0276 | 6.1 s | 600 tokens |
| Claude Fable 5.1Anthropic | Passed: Final answer 9: right. | $0.0333 | 6.6 s | 577 tokens |
| Claude Opus 5.5Anthropic | Passed: Final answer 9: right. | $0.0149 | 5.7 s | 508 tokens |
| Claude Sonnet 5.5Anthropic | Passed: Final answer 9: right. | $0.0061 | 3.9 s | 523 tokens |
| Claude Sonnet 5Anthropic | Passed: Final answer 9: right. | $0.0085 | 8.0 s | 523 tokens |
| Claude Haiku 5.5Anthropic | Passed: Final answer 9: right. | $0.00024 | 2.0 s | 399 tokens |
| Claude Haiku 4.5Anthropic | Passed: Final answer 9: right. | $0.0037 | 3.3 s | 665 tokens |
| GPT-6.2 AstraOpenAI | Passed: Final answer 9: right. | $0.0171 | 7.1 s | 285 tokens |
| GPT-6 AstraOpenAI | Passed: Final answer 9: right. | $0.0109 | 4.0 s | 369 tokens |
| GPT-6.2 SolOpenAI | Passed: Final answer 9: right. | $0.0044 | 5.0 s | 241 tokens |
| GPT-6.1 SolOpenAI | Passed: Final answer 9: right. | $0.0028 | 11.3 s | 261 tokens |
| GPT-6 SolOpenAI | Passed: Final answer 9: right. | $0.0032 | 4.8 s | 277 tokens |
| GPT-6.1 TerraOpenAI | Passed: Final answer 9: right. | $0.0020 | 6.9 s | 278 tokens |
| GPT-6 LunaOpenAI | Passed: Final answer 9: right. | $0.000076 | 15.7 s | 124 tokens |
| Gemini 4 CarbonGoogle | Passed: Final answer 9: right. | $0.0066 | 14.9 s | 864 tokens |
| Gemini 4 ArgonGoogle | Passed: Final answer 9: right. | $0.0042 | 13.9 s | 760 tokens |
| Gemini 4 HydrogenGoogle | Passed: Final answer 9: right. | $0.0054 | 7.2 s | 695 tokens |
| Gemini 3.1 Pro (preview)Google | Passed: Final answer 9: right. | $0.0097 | 12.1 s | 675 tokens |
| Gemini 3.8 FlashGoogle | Passed: Final answer 9: right. | $0.0018 | 7.3 s | 868 tokens |
| DeepSeek V4.1 FlashDeepSeek | Passed: Final answer 9: right. | $0.00080 | 1.6 s | 324 tokens |
| DeepSeek V4 ProDeepSeek | Passed: Final answer 9: right. | $0.0061 | 8.0 s | 347 tokens |
| Grok 4.7xAI | Passed: Final answer 9: right. | $0.0063 | 11.0 s | 321 tokens |
| Kimi K3.1 ProMoonshot | Passed: Final answer 9: right. | $0.0046 | 6.0 s | 222 tokens |
| Kimi K3Moonshot | Passed: Final answer 9: right. | $0.0101 | 6.0 s | 285 tokens |
| GLM 5.3Z.ai | Passed: Final answer 9: right. | $0.0018 | 3.5 s | 391 tokens |
| GLM 5.3 FlashZ.ai | Passed: Final answer 9: right. | $0.00025 | 3.9 s | 364 tokens |
| Mistral Large 4Mistral | Passed: Final answer 9: right. | $0.0100 | 44.3 s | 456 tokens |
Cost: what OpenRouter charged us for the reply. Time: from sending to the whole reply. Reply: its length in tokens, thinking not counted. In llmwise you pay per message, not per token: each of these replies counted as one message on Pro.
Every reply
Every reply passed: here they are from the cheapest up.
GPT-6 Luna
Passed: Final answer 9: right.
1. Since 13 is prime, Fermat’s little theorem gives 7^12 ≡ 1 (mod 13). 2. Divide the exponent by 12: 100 = 12 × 8 + 4. 3. Therefore: 7^100 ≡ 7^4 (mod 13). 4. Calculate: 7^4 = 2401. 2401 = 13 × 184 + 9. 5. Check: 2401 − 13 × 184 = 9, so the remainder is 9. Final answer: 9
341 tokens in, 237 out (113 of them reasoning) · 15.7 s · $0.0001 · 1 message on Pro · answered by openai/gpt-6-luna via OpenAI ·
Claude Haiku 5.5
Passed: Final answer 9: right.
1. Fermat's little theorem: since 13 is prime and 7 is not divisible by 13, 7^12 ≡ 1 (mod 13). 2. Reduce the exponent: 100 = 12·8 + 4, so 7^100 = (7^12)^8 · 7^4. 3. Modulo 13, (7^12)^8 ≡ 1^8 = 1, so 7^100 ≡ 7^4 (mod 13). 4. Compute 7^4 exactly: 7^2 = 49, and 7^4 = 49^2 = 2401. 5. Reduce 2401 mod 13: 13·184 = 2392, and 2401 − 2392 = 9. So 7^4 ≡ 9 (mod 13). Check by a second route using repeated squaring of residues: - 7^2 = 49 ≡ 49 − 39 = 10 (mod 13). - 7^4 ≡ 10^2 = 100 ≡ 100 − 91 = 9 (mod 13). Matches. Sanity check on the exponent: 12·8 = 96, and 96 + 4 = 100. Correct. The remainder is 9. Final answer: 9
447 tokens in, 399 out · 2.0 s · $0.0002 · 1 message on Pro · answered by anthropic/claude-haiku-5.5 via Anthropic ·
GLM 5.3 Flash
Passed: Final answer 9: right.
Step 1: Apply Fermat's little theorem. Since 13 is prime and 13 does not divide 7, we get 7^12 ≡ 1 (mod 13). Step 2: Reduce the exponent 100 modulo 12. 100 = 8·12 + 4, so 7^100 = (7^12)^8 · 7^4 ≡ 1^8 · 7^4 ≡ 7^4 (mod 13). Step 3: Compute 7^2 mod 13. 7^2 = 49 49 = 3·13 + 10, so 7^2 ≡ 10 (mod 13). Step 4: Square that to get 7^4 mod 13. 7^4 ≡ 10^2 = 100 (mod 13) 100 = 7·13 + 9, so 7^4 ≡ 9 (mod 13). Step 5: Therefore 7^100 ≡ 9 (mod 13). Check: 7^4 = 2401, and 2401 = 184·13 + 9, so 7^4 leaves remainder 9. Since 7^100 ≡ 7^4 (mod 13), the remainder is indeed 9. Also, multiplying back: 9·9 = 81 ≡ 3, 9·3 = 27 ≡ 1 (mod 13), consistent with the cycle structure. Final answer: 9
349 tokens in, 402 out (38 of them reasoning) · 3.9 s · $0.0003 · 1 message on Pro · answered by z-ai/glm-5.3-flash via Friendli ·
DeepSeek V4.1 Flash
Passed: Final answer 9: right.
1. We want the remainder of 7^100 when divided by 13, which means compute 7^100 mod 13. 2. Since 13 is prime and 7 is not divisible by 13, Fermat's Little Theorem gives: 7^12 ≡ 1 mod 13. 3. Divide the exponent 100 by 12: 100 = 12 * 8 + 4. So 7^100 = 7^(12*8 + 4) = (7^12)^8 * 7^4. 4. Using 7^12 ≡ 1 mod 13: (7^12)^8 * 7^4 ≡ 1^8 * 7^4 ≡ 7^4 mod 13. 5. Compute 7^4 mod 13: 7^2 = 49 ≡ 10 mod 13, because 49 - 39 = 10. Then 7^4 = (7^2)^2 ≡ 10^2 = 100 mod 13. 100 - 91 = 9, so 100 ≡ 9 mod 13. 6. Check by cycling powers mod 13: 7^1 ≡ 7 7^2 ≡ 10 7^3 ≡ 5 7^4 ≡ 9 The cycle length is 12, and 100 ≡ 4 mod 12, so 7^100 ≡ 7^4 ≡ 9 mod 13. Final answer: 9
367 tokens in, 641 out (317 of them reasoning) · 1.6 s · $0.0008 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via Together ·
Gemini 3.8 Flash
Passed: Final answer 9: right.
Step 1: Identify the mathematical approach. We need to find the value of (7^100) mod 13. Since 13 is a prime number and 7 is not divisible by 13, we can use Fermat's Little Theorem. Step 2: Apply Fermat's Little Theorem. Fermat's Little Theorem states that if p is a prime number and a is not divisible by p, then: a^(p - 1) is congruent to 1 (mod p) Here, a = 7 and p = 13. p - 1 = 13 - 1 = 12 Therefore: 7^12 is congruent to 1 (mod 13) Step 3: Break down the exponent 100 in terms of 12. Divide 100 by 12: 100 = 12 * 8 + 4 Step 4: Rewrite 7^100 using the properties of powers. 7^100 = 7^(12 * 8 + 4) 7^100 = (7^12)^8 * 7^4 Step 5: Simplify modulo 13. Substitute 7^12 is congruent to 1 (mod 13): 7^100 is congruent to (1)^8 * 7^4 (mod 13) 7^100 is congruent to 1 * 7^4 (mod 13) 7^100 is congruent to 7^4 (mod 13) Step 6: Calculate 7^4 modulo 13 in smaller steps. First, compute 7^2: 7^2 = 49 Divide 49 by 13: 49 = 13 * 3 + 10 So, 7^2 is congruent to 10 (mod 13). Equivalently, 10 is congruent to -3 (mod 13). Next, compute 7^4 = (7^2)^2: 7^4 is congruent to (-3)^2 (mod 13) (-3)^2 = 9 Since 9 is between 0 and 12, the remainder is 9. Step 7: Check the result using successive squaring. 7^1 = 7 (mod 13) 7^2 = 49 = 13 * 3 + 10, so 10 (mod 13) 7^3 = 7 * 10 = 70 = 13 * 5 + 5, so 5 (mod 13) 7^4 = 7 * 5 = 35 = 13 * 2 + 9, so 9 (mod 13) 7^5 = 7 * 9 = 63 = 13 * 4 + 11, so 11 (mod 13) 7^6 = 7 * 11 = 77 = 13 * 5 + 12, so 12 (mod 13), which is -1 (mod 13) Since 7^6 is congruent to -1 (mod 13): 7^12 is congruent to (-1)^2 = 1 (mod 13), which confirms Step 2. Also, 100 = 6 * 16 + 4. 7^100 is congruent to (7^6)^16 * 7^4 (mod 13) 7^100 is congruent to (-1)^16 * 9 (mod 13) 7^100 is congruent to 1 * 9 = 9 (mod 13). Both methods yield 9. Final answer: 9
353 tokens in, 868 out · 7.3 s · $0.0018 · 1 message on Pro · answered by google/gemini-3.8-flash via Google AI Studio ·
GLM 5.3
Passed: Final answer 9: right.
Step 1: Find powers of 7 mod 13. 7^1 = 7 7^2 = 49 = 39 + 10, so 7^2 ≡ 10 (mod 13) 7^3 = 7 · 10 = 70 = 65 + 5, so 7^3 ≡ 5 (mod 13) 7^6 = 5^2 = 25 = 26 - 1, so 7^6 ≡ -1 (mod 13) Step 2: Deduce the order of 7 mod 13. Since 7^6 ≡ -1, we get 7^12 ≡ 1 (mod 13), so powers of 7 repeat every 12. Step 3: Reduce the exponent. 100 = 12 · 8 + 4, so 7^100 = (7^12)^8 · 7^4 ≡ 1^8 · 7^4 ≡ 7^4 (mod 13). Step 4: Compute 7^4 mod 13. 7^4 = (7^2)^2 ≡ 10^2 = 100 = 91 + 9, so 7^4 ≡ 9 (mod 13). Step 5: Check. Alternative route: 7^4 = 2401. Divide by 13: 13 · 184 = 2392, and 2401 - 2392 = 9. This matches, and 0 ≤ 9 < 13, so the remainder is valid. Final answer: 9
349 tokens in, 424 out (33 of them reasoning) · 3.5 s · $0.0018 · 1 message on Pro · answered by z-ai/glm-5.3 via Friendli ·
GPT-6.1 Terra
Passed: Final answer 9: right.
1. Find a useful cycle of powers modulo 13: 7^2 = 49 ≡ 10 (mod 13) 7^3 ≡ 7 × 10 = 70 ≡ 5 (mod 13) 7^6 ≡ 5^2 = 25 ≡ -1 (mod 13) 7^12 ≡ (-1)^2 = 1 (mod 13) 2. Reduce the exponent using 100 = 8 × 12 + 4: 7^100 = (7^12)^8 × 7^4 7^100 ≡ 1^8 × 7^4 (mod 13) 7^4 ≡ 10^2 = 100 ≡ 9 (mod 13) 3. Check using a different power: 7^5 ≡ 7 × 9 = 63 ≡ 11 (mod 13) 7^10 ≡ 11^2 = 121 ≡ 4 (mod 13) 7^100 ≡ 4^10 (mod 13) 4^3 = 64 ≡ -1 (mod 13) 4^10 = (4^3)^3 × 4 ≡ -4 ≡ 9 (mod 13) Final answer: 9
341 tokens in, 713 out (435 of them reasoning) · 6.9 s · $0.0020 · 1 message on Pro · answered by openai/gpt-6.1-terra via OpenAI ·
GPT-6.1 Sol
Passed: Final answer 9: right.
1. Find a useful power of 7 modulo 13. Here, “≡” means “has the same remainder when divided by 13.” 7^3 = 343 = 13 × 26 + 5 7^3 ≡ 5 (mod 13) 7^6 ≡ 5^2 = 25 ≡ -1 (mod 13) 7^12 ≡ (-1)^2 = 1 (mod 13) 2. Split the exponent into a multiple of 12 and a remainder. 100 = 12 × 8 + 4 7^100 = (7^12)^8 × 7^4 7^100 ≡ 1^8 × 7^4 (mod 13) 3. Calculate the remaining power. 7^4 = 2401 2401 = 13 × 184 + 9 Therefore, the remainder is 9. 4. Check using Fermat’s little theorem: since 13 is prime and does not divide 7, it confirms that 7^12 ≡ 1 (mod 13). Also, 9 is between 0 and 12, so it is a valid remainder. Final answer: 9
341 tokens in, 483 out (222 of them reasoning) · 11.3 s · $0.0028 · 1 message on Pro · answered by openai/gpt-6.1-sol via OpenAI ·
GPT-6 Sol
Passed: Final answer 9: right.
1. Find a useful power of 7 modulo 13. 7^2 = 49 = 13(3) + 10, so 7^2 ≡ 10 (mod 13). 7^3 ≡ 7(10) = 70 ≡ 5 (mod 13). 7^6 ≡ 5^2 = 25 ≡ -1 (mod 13). 7^12 ≡ (-1)^2 = 1 (mod 13). 2. Break the exponent into multiples of 12. 100 = 12(8) + 4. 7^100 = (7^12)^8 · 7^4 ≡ 7^4 (mod 13). 7^4 ≡ (7^2)^2 ≡ 10^2 = 100 ≡ 9 (mod 13). 3. Check another way. 10^3 = 1000 ≡ -1 (mod 13). 7^100 = (7^2)^50 ≡ 10^50 = (10^3)^16 · 10^2 ≡ (-1)^16 · 100 ≡ 9 (mod 13). Final answer: 9
341 tokens in, 580 out (303 of them reasoning) · 4.8 s · $0.0032 · 1 message on Pro · answered by openai/gpt-6-sol via OpenAI ·
Claude Haiku 4.5
Passed: Final answer 9: right.
I need to find the remainder when 7^100 is divided by 13. Step 1: I'll use Fermat's Little Theorem, which states that if p is prime and a is not divisible by p, then a^(p-1) ≡ 1 (mod p). Since 13 is prime and gcd(7,13) = 1, we have 7^12 ≡ 1 (mod 13). Step 2: Express the exponent 100 in terms of 12. 100 = 12 × 8 + 4 So 100 = 12 × 8 + 4. Step 3: Rewrite 7^100 using this factorization. 7^100 = 7^(12×8 + 4) = (7^12)^8 × 7^4 Step 4: Apply Fermat's Little Theorem. Since 7^12 ≡ 1 (mod 13), we have (7^12)^8 ≡ 1^8 ≡ 1 (mod 13). Step 5: Calculate 7^4 (mod 13). 7^1 = 7 7^2 = 49 = 3×13 + 10, so 7^2 ≡ 10 (mod 13) 7^4 = (7^2)^2 ≡ 10^2 = 100 (mod 13) 100 = 7×13 + 9, so 7^4 ≡ 9 (mod 13) Step 6: Combine the results. 7^100 ≡ 1 × 9 ≡ 9 (mod 13) Check: Verify by computing powers of 7 mod 13 directly: 7^1 ≡ 7 (mod 13) 7^2 ≡ 10 (mod 13) 7^3 ≡ 70 ≡ 5 (mod 13) 7^4 ≡ 35 ≡ 9 (mod 13) 7^5 ≡ 63 ≡ 11 (mod 13) 7^6 ≡ 77 ≡ 12 (mod 13) 7^12 = (7^6)^2 ≡ 12^2 = 144 ≡ 1 (mod 13) ✓ This confirms Fermat's Little Theorem applies. And 7^4 ≡ 9 (mod 13) ✓ Final answer: 9
359 tokens in, 665 out · 3.3 s · $0.0037 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Anthropic ·
Gemini 4 Argon
Passed: Final answer 9: right.
Here is the step-by-step solution to find the remainder when 7^100 is divided by 13. Step 1: Use Fermat's Little Theorem to simplify the large exponent. Fermat's Little Theorem states that if p is a prime number and a is an integer not divisible by p, then a^(p - 1) leaves a remainder of 1 when divided by p. Here, p = 13 (which is prime) and a = 7 (which is not divisible by 13). 7^(13 - 1) = 7^12 So, 7^12 leaves a remainder of 1 when divided by 13. Step 2: Rewrite the exponent 100 in terms of 12. Divide 100 by 12 to find the quotient and the remainder. 100 = 12 * 8 + 4 Step 3: Rewrite 7^100 using the result from Step 2 and the laws of exponents. 7^100 = 7^(12 * 8 + 4) 7^100 = (7^12)^8 * 7^4 Step 4: Find the remainder of the first part, (7^12)^8, when divided by 13. Since 7^12 leaves a remainder of 1 when divided by 13, raising it to the 8th power gives: 1^8 = 1 So, the remainder of 7^100 divided by 13 is the same as the remainder of 1 * 7^4 divided by 13. Step 5: Find the remainder of 7^4 when divided by 13. First, calculate 7^2: 7^2 = 49 Divide 49 by 13 to find its remainder: 49 = 13 * 3 + 10 So, 7^2 leaves a remainder of 10 when divided by 13. Step 6: Use the remainder of 7^2 to find the remainder of 7^4. Since 7^4 = (7^2)^2, we can square the remainder from Step 5: 10^2 = 100 Now, divide 100 by 13 to find the final remainder: 100 = 13 * 7 + 9 The remainder is 9. Check the result: We can check the remainder of 7^4 by calculating it directly and also by using negative remainders. Method A (Direct calculation of 7^4): 7^4 = 2401 Divide 2401 by 13: 2401 / 13 = 184 with a remainder, because 13 * 184 = 2392. 2401 - 2392 = 9. Method B (Using negative remainders): From Step 5, 7^2 = 49, which is 3 less than 52 (13 * 4). So 7^2 leaves a remainder of -3. Then 7^4 = (7^2)^2 leaves a remainder of (-3)^2 = 9. Both methods confirm that the remainder is 9. Final answer: 9
386 tokens in, 760 out · 13.9 s · $0.0042 · 1 message on Pro · answered by google/gemini-4-argon via Google AI Studio ·
GPT-6.2 Sol
Passed: Final answer 9: right.
1. Reduce 7^3 modulo 13. 7^3 = 343 343 = 13 × 26 + 5 2. Square that remainder to find the remainder of 7^6. 5^2 = 25 25 = 13 × 2 − 1 So 7^6 is congruent to −1 modulo 13, and squaring gives 7^12 congruent to 1. 3. Break up the exponent using that cycle. 100 = 12 × 8 + 4 7^100 = (7^12)^8 × 7^4 Since 7^12 leaves a remainder of 1, only the remainder of 7^4 matters. Using the remainder of 7^3 from step 1: 5 × 7 = 35 35 = 13 × 2 + 9 4. Check by computing 7^4 directly. 7^4 = 2401 2401 = 13 × 184 + 9 This confirms the remainder is 9, which is between 0 and 12. Final answer: 9
341 tokens in, 372 out (131 of them reasoning) · 5.0 s · $0.0044 · 1 message on Pro · answered by openai/gpt-6.2-sol via OpenAI ·
Kimi K3.1 Pro
Passed: Final answer 9: right.
1. Since 13 is prime and 7 is not divisible by 13, Fermat’s little theorem gives 7^12 ≡ 1 (mod 13). 2. Rewrite the exponent using a multiple of 12: 100 = 12 · 8 + 4. 3. Therefore, 7^100 = (7^12)^8 · 7^4 ≡ 1^8 · 7^4 (mod 13) ≡ 7^4 (mod 13). 4. Calculate 7^4: 7^2 = 49 7^4 = 49^2 = 2401. 5. Divide 2401 by 13: 2401 = 13 · 184 + 9. Thus, 7^4 ≡ 9 (mod 13). 6. Check: 13 · 184 = 2392, and 2401 − 2392 = 9, which is between 0 and 12. Final answer: 9
428 tokens in, 434 out (212 of them reasoning) · 6.0 s · $0.0046 · 1 message on Pro · answered by moonshotai/kimi-k3.1-pro via Together ·
Gemini 4 Hydrogen
Passed: Final answer 9: right.
1. Recognize that we are looking for 7^100 mod 13. Since 13 is a prime number and 7 is not a multiple of 13, we can use Fermat's Little Theorem to simplify the exponent. 2. Apply Fermat's Little Theorem. 7^12 mod 13 = 1 This follows because a^(p - 1) mod p = 1 whenever p is prime and a is not divisible by p. 3. Divide the exponent 100 by 12 to rewrite 7^100. 100 = 12 * 8 + 4 This breaks the large power into groups of 12, which each have a remainder of 1. 4. Rewrite 7^100 using the exponent rule a^(m + n) = a^m * a^n. 7^100 = (7^12)^8 * 7^4 Substitute 7^12 mod 13 = 1 into the expression: 7^100 mod 13 = (1^8 * 7^4) mod 13 7^100 mod 13 = 7^4 mod 13 This reduces the problem to finding the remainder of 7^4 divided by 13. 5. Calculate 7^2 mod 13. 7^2 = 49 49 = 13 * 3 + 10 So 7^2 mod 13 = 10 Alternatively, 10 - 13 = -3, so 7^2 mod 13 = -3, which makes squaring easier. 6. Calculate 7^4 mod 13 using 7^4 = (7^2)^2. 7^4 mod 13 = 10^2 mod 13 10^2 = 100 100 = 13 * 7 + 9 So 7^4 mod 13 = 9 Since 9 is between 0 and 12, the remainder is 9. 7. Check the result using another method. Notice that 7^3 = 343. 343 = 13 * 26 + 5, so 7^3 mod 13 = 5. Then 7^6 mod 13 = 5^2 mod 13 = 25 mod 13 = -1 (since 25 = 26 - 1). Now divide 100 by 6: 100 = 6 * 16 + 4. 7^100 mod 13 = ((7^6)^16 * 7^4) mod 13 7^100 mod 13 = ((-1)^16 * 9) mod 13 7^100 mod 13 = (1 * 9) mod 13 = 9 Both methods give 9, so the answer is confirmed. Final answer: 9
386 tokens in, 1,358 out (663 of them reasoning) · 7.2 s · $0.0054 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·
DeepSeek V4 Pro
Passed: Final answer 9: right.
1. We want the remainder when 7^100 is divided by 13, which is 7^100 mod 13. 2. Since 13 is prime and 7 is not divisible by 13, Fermat's little theorem gives 7^12 ≡ 1 mod 13. 3. Divide the exponent 100 by 12: 100 = 12*8 + 4. 4. So 7^100 = 7^(12*8 + 4) = (7^12)^8 * 7^4. 5. Modulo 13, this becomes 1^8 * 7^4 ≡ 7^4. 6. Compute 7^2 = 49, and 49 - 3*13 = 49 - 39 = 10, so 7^2 ≡ 10 mod 13. 7. Then 7^4 = (7^2)^2 ≡ 10^2 = 100. 8. Since 100 - 7*13 = 100 - 91 = 9, we have 7^4 ≡ 9 mod 13. 9. Therefore 7^100 ≡ 9 mod 13. 10. Check by repeated squaring: 7^8 ≡ 9^2 = 81 ≡ 3 mod 13, 7^16 ≡ 9, 7^32 ≡ 3, 7^64 ≡ 9. Then 7^100 = 7^64 * 7^32 * 7^4 ≡ 9 * 3 * 9 = 243 ≡ 9 mod 13, which agrees. Final answer: 9
341 tokens in, 1,431 out (1,084 of them reasoning) · 8.0 s · $0.0061 · 1 message on Pro · answered by deepseek/deepseek-v4-pro-0813 via CoreWeave ·
Claude Sonnet 5.5
Passed: Final answer 9: right.
Reading: find 7^100 mod 13. Step 1: Use Fermat's little theorem. Since 13 is prime and 13 does not divide 7, we have 7^12 ≡ 1 (mod 13). Step 2: Reduce the exponent modulo 12. 100 = 12 × 8 + 4 so 7^100 = (7^12)^8 × 7^4 ≡ 1^8 × 7^4 ≡ 7^4 (mod 13). Step 3: Compute 7^4 mod 13 in small pieces. 7^2 = 49 = 3 × 13 + 10, so 7^2 ≡ 10 (mod 13). 7^4 ≡ 10^2 = 100 (mod 13). 100 = 7 × 13 + 9, so 100 ≡ 9 (mod 13). Step 4: Check by another route, using the order of 7. 7^2 ≡ 10 7^3 ≡ 10 × 7 = 70 ≡ 70 - 65 = 5 7^6 ≡ 5^2 = 25 ≡ 12 ≡ -1 7^12 ≡ (-1)^2 = 1, which agrees with Fermat. Then 7^100 = 7^96 × 7^4, and 96 = 12 × 8, so again 7^100 ≡ 7^4. Also 7^4 = 7^3 × 7 ≡ 5 × 7 = 35 ≡ 35 - 26 = 9. This matches. The remainder is 9. Final answer: 9
447 tokens in, 523 out · 3.9 s · $0.0061 · 1 message on Pro · answered by anthropic/claude-sonnet-5.5 via Anthropic ·
Grok 4.7
Passed: Final answer 9: right.
1. We want the remainder of 7^100 divided by 13, which is 7^100 mod 13. 2. Since 13 is prime and does not divide 7, Fermat's Little Theorem gives 7^12 ≡ 1 mod 13. 3. Divide the exponent: 100 = 12 * 8 + 4, so 7^100 = (7^12)^8 * 7^4 ≡ 1^8 * 7^4 ≡ 7^4 mod 13. 4. Compute 7^2 = 49. Then 49 - 3 * 13 = 49 - 39 = 10, so 7^2 ≡ 10 mod 13. 5. Then 7^4 = (7^2)^2 ≡ 10^2 = 100 mod 13. And 100 - 7 * 13 = 100 - 91 = 9, so 7^4 ≡ 9 mod 13. 6. Check by successive powers: 7^1 ≡ 7, 7^2 ≡ 10, 7^3 ≡ 70 - 5 * 13 = 5, 7^4 ≡ 7 * 5 = 35 - 2 * 13 = 9 mod 13, which matches. Also 7^6 ≡ -1 mod 13, so 7^12 ≡ 1 mod 13, confirming the theorem application. 7. Therefore the remainder is 9. Final answer: 9
1,579 tokens in, 819 out (498 of them reasoning) · 11.0 s · $0.0063 · 1 message on Pro · answered by x-ai/grok-4.7 via xAI ·
Gemini 4 Carbon
Passed: Final answer 9: right.
1. To find the remainder when a large power like 7^100 is divided by 13, we can use modular arithmetic and Fermat's Little Theorem. Fermat's Little Theorem states that if p is a prime number and a is an integer not divisible by p, then a^(p - 1) leaves a remainder of 1 when divided by p. 2. Here, p = 13 is a prime number, and a = 7 is not divisible by 13. Applying the theorem gives the remainder of 7^(13 - 1) when divided by 13: 7^12 = 1 (mod 13) 3. Next, we divide the exponent 100 by 12 to see how many groups of 7^12 fit into 7^100: 100 = 12 * 8 + 4 4. Using the rules of exponents, we rewrite 7^100 based on this division: 7^100 = 7^(12 * 8 + 4) 7^100 = (7^12)^8 * 7^4 5. Since 7^12 leaves a remainder of 1 when divided by 13, we can replace 7^12 with 1 in our modular calculation: (7^12)^8 * 7^4 = 1^8 * 7^4 (mod 13) 1^8 * 7^4 = 7^4 (mod 13) 6. Now we only need to find the remainder when 7^4 is divided by 13. First, calculate 7^2: 7^2 = 49 7. Find the remainder of 49 divided by 13 (since 13 * 3 = 39): 49 = 13 * 3 + 10 So 7^2 leaves a remainder of 10 when divided by 13. 8. Since 7^4 = (7^2)^2, we square that remainder to represent 7^4: 10^2 = 100 9. Finally, divide 100 by 13 to find the remainder (since 13 * 7 = 91): 100 = 13 * 7 + 9 This shows the remainder is 9. 10. Check the result using negative remainders and direct calculation: First, calculate 7^4 directly: 7^4 = 2401 Divide 2401 by 13 step by step: 2401 = 1300 + 1101 1101 = 1040 + 61 (since 13 * 80 = 1040) 61 = 52 + 9 (since 13 * 4 = 52) Adding the multiples of 13 gives 13 * (100 + 80 + 4) = 13 * 184 = 2392. 2401 - 2392 = 9, confirming 7^4 leaves a remainder of 9. Also, verify that 7^12 leaves a remainder of 1: 7^4 = 9 (mod 13), which is equivalent to -4 (mod 13) since 9 - 13 = -4. 7^12 = (7^4)^3 = (-4)^3 (mod 13) (-4)^3 = -64 Since -64 + 13 * 5 = -64 + 65 = 1, 7^12 indeed leaves a remainder of 1. Both parts of the calculation hold true. Final answer: 9
386 tokens in, 1,249 out (385 of them reasoning) · 14.9 s · $0.0066 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·
Claude Sonnet 5
Passed: Final answer 9: right.
1. We need 7^100 mod 13. Since 13 is prime, Fermat's Little Theorem gives 7^12 ≡ 1 (mod 13). 2. Reduce the exponent 100 modulo 12 (the order dividing 12): 100 = 12×8 + 4, so 100 ≡ 4 (mod 12). 3. Thus 7^100 ≡ 7^4 (mod 13). 4. Compute powers of 7 mod 13 step by step: 7^1 = 7 7^2 = 49 = 49 − 39 = 10 (mod 13) 7^3 = 7×10 = 70 = 70 − 65 = 5 (mod 13) 7^4 = 7×5 = 35 = 35 − 26 = 9 (mod 13) 5. So 7^100 ≡ 9 (mod 13). 6. Check: Verify order of 7 mod 13 is indeed 12 (divides 12 since 13 is prime). 7^6 = 7^4×7^2 = 9×10 = 90 = 90 − 78 = 12 ≡ −1 (mod 13) So 7^12 = (7^6)^2 ≡ (−1)^2 = 1 (mod 13), confirming Fermat's theorem holds and exponent reduction is valid. 7. Double-check arithmetic: 7^4 = 2401. 2401 ÷ 13 = 184 remainder 9 (since 13×184 = 2392, 2401−2392=9). Matches our result. Final answer: 9
445 tokens in, 764 out (241 of them reasoning) · 8.0 s · $0.0085 · 1 message on Pro · answered by anthropic/claude-sonnet-5 via Anthropic ·
Gemini 3.1 Pro
Passed: Final answer 9: right.
Step 1: Set up the problem using modular arithmetic. We need to find the remainder of 7^100 modulo 13. Step 2: Use Fermat's Little Theorem, which states that for any prime number p and an integer a not divisible by p, a^(p-1) is congruent to 1 modulo p. Here, p = 13 and a = 7. Step 3: Apply the theorem to find that 7^(13-1) is congruent to 1 modulo 13. 7^12 = 1 (mod 13) Step 4: Divide our exponent, 100, by 12 to see how many times 7^12 fits into 7^100. 100 = 12 * 8 + 4 Step 5: Rewrite 7^100 using this breakdown. 7^100 = 7^(12 * 8 + 4) 7^100 = (7^12)^8 * 7^4 Step 6: Substitute 1 for 7^12 (modulo 13). (1)^8 * 7^4 = 1 * 7^4 = 7^4 (mod 13) Now we only need to find the remainder of 7^4 when divided by 13. Step 7: Break 7^4 down into smaller, manageable pieces. Let's start with 7^2. 7^2 = 49 Step 8: Find the remainder of 49 divided by 13. 13 * 3 = 39 49 - 39 = 10 So, 7^2 = 10 (mod 13) Step 9: Note that in modulo 13, a remainder of 10 is equivalent to -3 (since 10 - 13 = -3). Using small negative numbers makes the next step of squaring much easier. 7^2 = -3 (mod 13) Step 10: Square this result to find 7^4 (modulo 13). 7^4 = (7^2)^2 7^4 = (-3)^2 (mod 13) (-3)^2 = 9 Step 11: Check the result by calculating 7^4 directly and finding its remainder when divided by 13. 7^4 = 7 * 7 * 7 * 7 = 2401 Divide 2401 by 13: 13 * 100 = 1300, leaving 1101. 13 * 80 = 1040, leaving 61. 13 * 4 = 52, leaving 9. 2401 = 13 * 184 + 9. The remainder is exactly 9, confirming our modulo arithmetic was correct. Final answer: 9
353 tokens in, 1,564 out (889 of them reasoning) · 12.1 s · $0.0097 · 1 message on Pro · answered by google/gemini-3.1-pro-preview via Google AI Studio ·
Mistral Large 4
Passed: Final answer 9: right.
Step 1: We need the remainder of 7^100 upon division by 13, which is 7^100 mod 13. Step 2: Since 13 is prime and 7 is not divisible by 13, Fermat's Little Theorem gives 7^12 = 1 (mod 13). Step 3: Write the exponent 100 in terms of 12: 100 = 12*8 + 4. Step 4: Rewrite the power using step 3: 7^100 = 7^(12*8 + 4) = (7^12)^8 * 7^4. Step 5: Reduce modulo 13 using step 2: (7^12)^8 * 7^4 = 1^8 * 7^4 = 7^4 (mod 13). Step 6: Compute 7^2. 7^2 = 49. 49 = 13*3 + 10. So 7^2 = 10 (mod 13). Step 7: Square that result to get 7^4. 7^4 = (7^2)^2 = 10^2 = 100. So 7^4 = 100 (mod 13). Step 8: Reduce 100 modulo 13. 100 = 13*7 + 9. So 7^4 = 9 (mod 13). Step 9: Combine steps 5 and 8: 7^100 = 9 (mod 13). Check: Directly, 7^4 = 2401 and 13*184 = 2392, so 2401 - 2392 = 9, confirming 7^4 = 9 (mod 13). Also, the powers of 7 modulo 13 cycle with period 12: 7, 10, 5, 9, 11, 12, 6, 3, 8, 4, 2, 1. Since 100 mod 12 = 4, the result is the 4th entry in the cycle, which is 9. Final answer: 9
357 tokens in, 4,218 out (3,762 of them reasoning) · 44.3 s · $0.0100 · 1 message on Pro · answered by mistralai/mistral-large-4-0 via Mistral ·
Kimi K3
Passed: Final answer 9: right.
1. 13 is prime and 7 is not divisible by 13, so Fermat’s little theorem gives 7^12 ≡ 1 mod 13. 2. Divide the exponent by 12: 100 = 12·8 + 4. 3. Therefore 7^100 = 7^(12·8 + 4) = (7^12)^8 · 7^4. 4. Reduce mod 13: (7^12)^8 · 7^4 ≡ 1^8 · 7^4 ≡ 7^4 mod 13. 5. Compute 7^2 = 49, and 49 ≡ 10 mod 13 because 49 - 39 = 10. 6. Then 7^4 = (7^2)^2 ≡ 10^2 = 100 mod 13. 7. Reduce 100 mod 13: 13·7 = 91, so 100 - 91 = 9. 8. Check by the cycle: powers of 7 mod 13 go 7, 10, 5, 9 for exponents 1, 2, 3, 4; since 100 ≡ 4 mod 12, the value matches 7^4 ≡ 9. Final answer: 9
428 tokens in, 586 out (301 of them reasoning) · 6.0 s · $0.0101 · 1 message on Pro · answered by moonshotai/kimi-k3 via Together ·
GPT-6 Astra
Passed: Final answer 9: right.
1. Find a small power of 7 with a simple remainder when divided by 13. 7^2 = 49 = 13 × 3 + 10 7^3 = 343 = 13 × 26 + 5 So 7^3 has remainder 5. 2. Square that remainder to find the remainder of 7^6. 7^6 ≡ 5^2 ≡ 25 ≡ -1 (mod 13) Here, “≡” means the numbers have the same remainder when divided by 13. 3. Write the exponent using multiples of 6. 100 = 6 × 16 + 4 7^100 = (7^6)^16 × 7^4 7^100 ≡ (-1)^16 × 7^4 ≡ 7^4 (mod 13) 4. Find the remainder of 7^4 using step 1. 7^4 ≡ 5 × 7 ≡ 35 ≡ 9 (mod 13) 5. Check using a different grouping of powers. 7^2 ≡ 10 (mod 13) 7^4 ≡ 10^2 ≡ 100 ≡ 9 (mod 13) 7^8 ≡ 9^2 ≡ 81 ≡ 3 (mod 13) 7^12 ≡ 3 × 9 ≡ 27 ≡ 1 (mod 13) 100 = 12 × 8 + 4 7^100 ≡ 1^8 × 9 ≡ 9 (mod 13) The check agrees, and 9 is between 0 and 12, as required for a remainder. Final answer: 9
341 tokens in, 369 out · 4.0 s · $0.0109 · 1 message on Pro · answered by openai/gpt-6-astra via OpenAI ·
Claude Opus 5.5
Passed: Final answer 9: right.
Step 1. Use Fermat's little theorem. 13 is prime and does not divide 7, so 7^12 ≡ 1 (mod 13). Step 2. Split the exponent into multiples of 12. 100 = 12 · 8 + 4 So 7^100 = (7^12)^8 · 7^4. Step 3. Simplify using Step 1. (7^12)^8 ≡ 1^8 = 1 (mod 13), so 7^100 ≡ 7^4 (mod 13). Step 4. Compute 7^4 mod 13 by repeated squaring. 7^2 = 49, and 49 − 3 · 13 = 49 − 39 = 10, so 7^2 ≡ 10 (mod 13). 7^4 = (7^2)^2 ≡ 10^2 = 100, and 100 − 7 · 13 = 100 − 91 = 9, so 7^4 ≡ 9 (mod 13). Step 5. Check another way. 7^2 ≡ 10 ≡ −3 (mod 13), so 7^100 = (7^2)^50 ≡ (−3)^50 = 3^50. 3^3 = 27, and 27 − 2 · 13 = 1, so 3^3 ≡ 1 (mod 13). 50 = 3 · 16 + 2, so 3^50 = (3^3)^16 · 3^2 ≡ 1 · 9 = 9 (mod 13). Both methods give 9. Final answer: 9
447 tokens in, 655 out (147 of them reasoning) · 5.7 s · $0.0149 · 1 message on Pro · answered by anthropic/claude-opus-5.5 via Anthropic ·
GPT-6.2 Astra
Passed: Final answer 9: right.
1. For remainders modulo 13, we can replace a number by any value that differs from it by a multiple of 13. Since 49 is 3 less than 52: 7^2 = 49 7^2 ≡ -3 (mod 13) 2. Cube both sides to find a useful power: 7^6 ≡ (-3)^3 (mod 13) 7^6 ≡ -27 ≡ -1 (mod 13) 3. Split the exponent into sixteen groups of 6, with 4 left over: 100 = 6 × 16 + 4 7^100 = (7^6)^16 × (7^2)^2 7^100 ≡ (-1)^16 × (-3)^2 (mod 13) 7^100 ≡ 9 (mod 13) 4. Check by grouping the powers in fours instead: 7^4 = 2401 = 13 × 184 + 9 9^3 = 729 = 13 × 56 + 1 7^100 = (7^4)^25 ≡ (9^3)^8 × 9 ≡ 9 (mod 13) Final answer: 9
341 tokens in, 360 out (75 of them reasoning) · 7.1 s · $0.0171 · 1 message on Pro · answered by openai/gpt-6.2-astra via OpenAI ·
Claude Fable 5.2
Passed: Final answer 9: right.
Step 1. Use Fermat's little theorem. 13 is prime and 7 is not a multiple of 13, so 7^12 ≡ 1 (mod 13) This lets us reduce the exponent 100 by multiples of 12. Step 2. Divide the exponent by 12. 100 = 12 × 8 + 4 So 7^100 = (7^12)^8 × 7^4 7^100 ≡ 1^8 × 7^4 (mod 13) 7^100 ≡ 7^4 (mod 13) Step 3. Compute 7^4 mod 13. 7^2 = 49 49 = 13 × 3 + 10, so 7^2 ≡ 10 (mod 13) 7^4 = (7^2)^2 ≡ 10^2 = 100 (mod 13) 100 = 13 × 7 + 9, so 7^4 ≡ 9 (mod 13) Step 4. Conclude. 7^100 ≡ 9 (mod 13) Check (a different route, without Fermat's theorem): list the powers of 7 mod 13 directly. 7^1 ≡ 7 7^2 ≡ 10 7^3 ≡ 70 ≡ 70 - 65 = 5 7^4 ≡ 35 ≡ 35 - 26 = 9 7^5 ≡ 63 ≡ 63 - 52 = 11 7^6 ≡ 77 ≡ 77 - 65 = 12 ≡ -1 Since 7^6 ≡ -1, we get 7^96 = (7^6)^16 ≡ (-1)^16 = 1. Then 7^100 = 7^96 × 7^4 ≡ 1 × 9 = 9. Both methods agree. Final answer: 9
447 tokens in, 600 out · 6.1 s · $0.0276 · 1 message on Pro · answered by anthropic/claude-fable-5.2 via Google ·
Claude Fable 5.1
Passed: Final answer 9: right.
1. Find a small power of 7 that is congruent to 1 mod 13, since remainders of powers repeat in a cycle. 7^1 = 7 ≡ 7 (mod 13) 7^2 = 49 = 3·13 + 10, so 7^2 ≡ 10 (mod 13) 7^3 ≡ 7·10 = 70 = 5·13 + 5, so 7^3 ≡ 5 (mod 13) 7^4 ≡ 7·5 = 35 = 2·13 + 9, so 7^4 ≡ 9 (mod 13) 7^5 ≡ 7·9 = 63 = 4·13 + 11, so 7^5 ≡ 11 (mod 13) 7^6 ≡ 7·11 = 77 = 5·13 + 12, so 7^6 ≡ 12 ≡ -1 (mod 13) 7^12 ≡ (-1)^2 = 1 (mod 13) (This agrees with Fermat's little theorem, which guarantees 7^12 ≡ 1 mod 13 since 13 is prime.) 2. Reduce the exponent 100 using the cycle length 12. 100 = 8·12 + 4 So 7^100 = (7^12)^8 · 7^4 ≡ 1^8 · 7^4 = 7^4 (mod 13) 3. Use the value found in step 1. 7^4 ≡ 9 (mod 13) Check: using 7^6 ≡ -1, we have 100 = 16·6 + 4, so 7^100 ≡ (-1)^16 · 7^4 = 7^4 ≡ 9 (mod 13). Same result by a different route. Final answer: 9
447 tokens in, 577 out · 6.6 s · $0.0333 · 1 message on Pro · answered by anthropic/claude-fable-5.1 via Google ·
More AI math solver test inputs
The other AI math solver test inputs, each with every model's reply, and the results across all five.
Questions
Which AI does best on “A remainder of a large power”?
All 27 models passed this AI math solver test input's check (final answer). The cheapest reply that passed was GPT-6 Luna's, at $0.000076; the fastest, DeepSeek V4.1 Flash's in 1.6 s. The dearest reply, Claude Fable 5.1's, cost 437 times as much ($0.0333).
What does a reply to “A remainder of a large power” cost?
Through the models' APIs, what OpenRouter charged us ran from $0.000076 (GPT-6 Luna) to $0.0333 (Claude Fable 5.1) for this test input. In llmwise you don't pay by the token: a reply like these counts as one message on Pro, whichever model answers.
Claude, GPT, Gemini, DeepSeek, Grok, Kimi, GLM, and Mistral, in one chat.
See what a message costs before you send it. Every plan is month to month: cancel in two clicks. Sign in with an email link, no password.