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 19 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 19 of our test runs on , through OpenRouter with the tool's own instructions and the app's settings. Updated .
Short answer
All 19 models passed this AI math solver test input's check (final answer). The cheapest reply that passed was GPT-6 Luna's, at $0.00010; the fastest, DeepSeek V4.1 Flash's in 1.1 s. The dearest reply, Claude Fable 5.1's, cost 305 times as much ($0.0313).
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 free 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 19 models on this test input, in catalog order.
| Model | Result | Cost | Time | Reply |
|---|---|---|---|---|
| Claude Fable 5.1Anthropic | Passed: Final answer 9: right. | $0.0313 | 6.4 s | 536 tokens |
| Claude Opus 5.5Anthropic | Passed: Final answer 9: right. | $0.0179 | 7.2 s | 591 tokens |
| Claude Sonnet 5.5Anthropic | Passed: Final answer 9: right. | $0.0060 | 3.5 s | 512 tokens |
| Claude Sonnet 5Anthropic | Passed: Final answer 9: right. | $0.0062 | 6.9 s | 357 tokens |
| Claude Haiku 5.5Anthropic | Passed: Final answer 9: right. | $0.00049 | 4.0 s | 895 tokens |
| Claude Haiku 4.5Anthropic | Passed: Final answer 9: right. | $0.0040 | 4.9 s | 726 tokens |
| GPT-6 AstraOpenAI | Passed: Final answer 9: right. | $0.0096 | 3.9 s | 316 tokens |
| GPT-6.1 SolOpenAI | Passed: Final answer 9: right. | $0.0025 | 5.7 s | 242 tokens |
| GPT-6 SolOpenAI | Passed: Final answer 9: right. | $0.0028 | 5.0 s | 234 tokens |
| GPT-6 LunaOpenAI | Passed: Final answer 9: right. | $0.00010 | 4.0 s | 220 tokens |
| Gemini 3.1 Pro (preview)Google | Passed: Final answer 9: right. | $0.0155 | 21.3 s | 905 tokens |
| Gemini 3.8 FlashGoogle | Passed: Final answer 9: right. | $0.0016 | 3.6 s | 780 tokens |
| DeepSeek V4.1 FlashDeepSeek | Passed: Final answer 9: right. | $0.00068 | 1.1 s | 292 tokens |
| DeepSeek V4 ProDeepSeek | Passed: Final answer 9: right. | $0.0038 | 5.1 s | 248 tokens |
| Grok 4.7xAI | Passed: Final answer 9: right. | $0.0062 | 9.9 s | 288 tokens |
| Kimi K3Moonshot | Passed: Final answer 9: right. | $0.0063 | 20.3 s | 316 tokens |
| GLM 5.3Z.ai | Passed: Final answer 9: right. | $0.0014 | 1.6 s | 291 tokens |
| GLM 5.3 FlashZ.ai | Passed: Final answer 9: right. | $0.00024 | 3.4 s | 344 tokens |
| Mistral Large 4Mistral | Passed: Final answer 9: right. | $0.0047 | 33.4 s | 697 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. Reduce powers of 7 modulo 13: 7^2 = 49 ≡ 10 (mod 13). 7^3 ≡ 10 × 7 = 70 ≡ 5 (mod 13). 7^6 ≡ 5^2 = 25 ≡ 12 ≡ -1 (mod 13). 2. Therefore, 7^12 ≡ (-1)^2 = 1 (mod 13). 3. Write 100 = 8 × 12 + 4, so: 7^100 ≡ (7^12)^8 × 7^4 ≡ 7^4 (mod 13). 4. Compute the remaining power: 7^4 ≡ (7^2)^2 ≡ 10^2 = 100 ≡ 9 (mod 13). 5. Check: 100 = 13 × 7 + 9, so the remainder is indeed 9. Final answer: 9
341 tokens in, 342 out (122 of them reasoning) · 4.0 s · $0.0001 · 1 message on Pro · answered by openai/gpt-6-luna via OpenAI ·
GLM 5.3 Flash
Passed: Final answer 9: right.
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: 100 = 8·12 + 4, so 7^100 = (7^12)^8 · 7^4 ≡ 7^4 (mod 13). Step 3: Compute 7^2: 7^2 = 49 = 3·13 + 10, so 7^2 ≡ 10 (mod 13). Step 4: Square again: 7^4 ≡ 10^2 = 100 = 7·13 + 9, so 7^4 ≡ 9 (mod 13). Check: 9 · 7^96 inverse-style check — alternatively compute 7^100 mod 13 by repeated squaring: 7^2 ≡ 10, 7^4 ≡ 9, 7^8 ≡ 81 ≡ 3, 7^16 ≡ 9, 7^32 ≡ 3, 7^64 ≡ 9. Then 7^100 = 7^64 · 7^32 · 7^4 ≡ 9 · 3 · 9 = 243 = 18·13 + 9 ≡ 9 (mod 13). Consistent. Final answer: 9
349 tokens in, 366 out (22 of them reasoning) · 3.4 s · $0.0002 · 1 message on Pro · answered by z-ai/glm-5.3-flash via Friendli ·
Claude Haiku 5.5
Passed: Final answer 9: right.
Step 1: Find the pattern of powers of 7 modulo 13. 7^1 = 7 (mod 13), so 7^1 ≡ 7. Step 2: Compute the next powers. 7^2 = 49. Since 49 = 3·13 + 10, 7^2 ≡ 10 (mod 13). Step 3: Continue. 7^3 ≡ 10·7 = 70 = 5·13 + 5, so 7^3 ≡ 5 (mod 13). Step 4: Continue. 7^4 ≡ 5·7 = 35 = 2·13 + 9, so 7^4 ≡ 9 (mod 13). Step 5: Continue. 7^5 ≡ 9·7 = 63 = 4·13 + 11, so 7^5 ≡ 11 (mod 13). Step 6: Continue. 7^6 ≡ 11·7 = 77 = 5·13 + 12, so 7^6 ≡ 12 (mod 13). Step 7: Notice 12 ≡ -1 (mod 13), so 7^6 ≡ -1 and 7^12 ≡ (-1)^2 = 1 (mod 13). The order of 7 modulo 13 divides 12, and we have 7^6 ≡ -1 ≠ 1, so the order is 12 (we also checked the smaller candidates 1, 2, 3, 4, 6 are not valid since 7^6 ≠ 1 and 7^4 ≠ 1, 7^3 ≠ 1, 7^2 ≠ 1, and the order must divide 12 and cannot be 6, so it is 4 or 12 or 3 or 2 or 1; 7^4 ≡ 9 ≠ 1 rules out 1, 2, 4, and 7^3 ≡ 5 ≠ 1 rules out 3, so the order is 12). Step 8: Reduce the exponent. 100 = 8·12 + 4, so 7^100 = (7^12)^8 · 7^4 ≡ 1^8 · 7^4 ≡ 7^4 (mod 13). Step 9: Use the value from Step 4. 7^4 ≡ 9 (mod 13). Step 10: Check. Direct check by another route: 7^4 = 2401. Dividing 2401 by 13: 13·184 = 2392, and 2401 − 2392 = 9. This matches 9. Also check 7^100 ≡ 7^4 via Fermat's little theorem: 7^12 ≡ 1 (mod 13), and 100 mod 12 = 4, which agrees with Step 8. Final answer: 9
447 tokens in, 895 out · 4.0 s · $0.0005 · 1 message on Pro · answered by anthropic/claude-haiku-5.5 via Anthropic ·
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 7 and 13 are coprime, Fermat's Little Theorem gives 7^12 = 1 mod 13. 3. Divide the exponent 100 by 12: 100 = 12 * 8 + 4, so 100 mod 12 = 4. 4. Therefore, 7^100 = 7^(12*8 + 4) = (7^12)^8 * 7^4. Since 7^12 = 1 mod 13, this becomes 7^100 = 1^8 * 7^4 = 7^4 mod 13. 5. Now compute 7^4 mod 13: 7^2 = 49, and 49 mod 13 = 10. So 7^4 = (7^2)^2 = 10^2 = 100. Then 100 mod 13 = 100 - 91 = 9. 6. Check another way: 7^6 = 117649, and 117649 mod 13 = 12 = -1. Then 7^100 = (7^6)^16 * 7^4 = (-1)^16 * 9 = 9 mod 13. This agrees. Final answer: 9
367 tokens in, 536 out (244 of them reasoning) · 1.1 s · $0.0007 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via Together ·
GLM 5.3
Passed: Final answer 9: right.
Step 1: Use Fermat's little theorem: since 13 is prime and does not divide 7, we have 7^12 ≡ 1 (mod 13). Step 2: Divide the exponent by 12 to reduce it: 100 = 12 · 8 + 4, so 100 mod 12 = 4. Step 3: Therefore 7^100 ≡ 7^4 (mod 13). This follows because 7^100 = (7^12)^8 · 7^4 ≡ 1^8 · 7^4 = 7^4. Step 4: Compute 7^4: 7^2 = 49, and 49 mod 13 = 49 - 39 = 10. Then 7^4 ≡ 10^2 = 100 (mod 13). 100 = 13 · 7 + 9, so 7^4 ≡ 9 (mod 13). Step 5: Check the result directly by computing 7^4 = 2401 and dividing: 13 · 184 = 2392, and 2401 - 2392 = 9. This confirms the remainder is 9. Final answer: 9
349 tokens in, 313 out (22 of them reasoning) · 1.6 s · $0.0014 · 1 message on Pro · answered by z-ai/glm-5.3 via Friendli ·
Gemini 3.8 Flash
Passed: Final answer 9: right.
Step 1: State the goal using modular arithmetic. We want to find the remainder of 7^100 when divided by 13, which means finding a value r such that: 7^100 = r (mod 13), with 0 <= r < 13. 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) = 1 (mod p) Here, a = 7 and p = 13 (which is prime). 7^(13 - 1) = 1 (mod 13) 7^12 = 1 (mod 13) Step 3: Divide the exponent 100 by 12. 100 = 12 * 8 + 4 This allows us to break down 7^100 into smaller powers. Step 4: Rewrite 7^100 using the quotient and remainder. 7^100 = (7^12)^8 * 7^4 Substituting 7^12 = 1 (mod 13): 7^100 = (1)^8 * 7^4 (mod 13) 7^100 = 7^4 (mod 13) Step 5: Compute 7^4 modulo 13. First, find 7^2 modulo 13: 7^2 = 49 Divide 49 by 13: 49 = 13 * 3 + 10 So, 7^2 = 10 (mod 13) Notice that 10 is congruent to -3 modulo 13: 7^2 = -3 (mod 13) Next, square this result to get 7^4: 7^4 = (7^2)^2 (mod 13) 7^4 = (-3)^2 (mod 13) 7^4 = 9 (mod 13) Step 6: Check the result using successive powers of 7 modulo 13. 7^1 = 7 (mod 13) 7^2 = 49 = 10 (mod 13) 7^3 = 10 * 7 = 70 = 5 * 13 + 5 = 5 (mod 13) 7^4 = 5 * 7 = 35 = 2 * 13 + 9 = 9 (mod 13) 7^5 = 9 * 7 = 63 = 4 * 13 + 11 = 11 (mod 13) 7^6 = 11 * 7 = 77 = 5 * 13 + 12 = -1 (mod 13) Since 7^6 = -1 (mod 13), we can square it: 7^12 = (-1)^2 = 1 (mod 13), which confirms the cycle length of 12. Since 100 = 6 * 16 + 4: 7^100 = (7^6)^16 * 7^4 = (-1)^16 * 9 = 1 * 9 = 9 (mod 13). The check confirms the answer. Final answer: 9
353 tokens in, 780 out · 3.6 s · $0.0016 · 1 message on Pro · answered by google/gemini-3.8-flash via Google AI Studio ·
GPT-6.1 Sol
Passed: Final answer 9: right.
1. Use Fermat’s little theorem. Since 13 is prime and 7 is not divisible by 13: 7^12 ≡ 1 (mod 13) Here, “≡” means the numbers have the same remainder when divided by 13. 2. Reduce the exponent using this cycle: 100 = 12 × 8 + 4 7^100 = (7^12)^8 × 7^4 7^100 ≡ 1^8 × 7^4 ≡ 7^4 (mod 13) 3. Find the remainder of 7^4: 7^4 = 2401 2401 = 13 × 184 + 9 Therefore, the remainder is 9. 4. Check the cycle directly: 7^6 = 117649 = 13 × 9050 − 1 7^6 ≡ −1 (mod 13) 7^100 = (7^6)^16 × 7^4 ≡ (−1)^16 × 9 ≡ 9 (mod 13) This confirms the result. Final answer: 9
341 tokens in, 440 out (198 of them reasoning) · 5.7 s · $0.0025 · 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 49 ≡ 10 (mod 13) 2. Continue to 7^6. 7^3 ≡ 10 × 7 ≡ 5 (mod 13) 7^6 ≡ 5^2 ≡ 12 ≡ -1 (mod 13) 3. Break up the exponent and find 7^4. 100 = 6 × 16 + 4 7^4 ≡ 10^2 ≡ 9 (mod 13) 4. Combine the results. 7^100 = (7^6)^16 × 7^4 7^100 ≡ (-1)^16 × 9 ≡ 9 (mod 13) 5. Check using a different grouping. 7^12 ≡ (-1)^2 ≡ 1 (mod 13) 100 = 12 × 8 + 4 7^100 ≡ 1^8 × 9 ≡ 9 (mod 13) Final answer: 9
341 tokens in, 494 out (260 of them reasoning) · 5.0 s · $0.0028 · 1 message on Pro · answered by openai/gpt-6-sol via OpenAI ·
DeepSeek V4 Pro
Passed: Final answer 9: right.
1. We need 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. Using 7^12 ≡ 1 mod 13, this becomes (1)^8 * 7^4 ≡ 7^4 mod 13. 6. Now compute 7^4 mod 13: 7^2 = 49 ≡ 10 mod 13, so 7^4 = (7^2)^2 ≡ 10^2 = 100 ≡ 9 mod 13. 7. Check: 7^4 = 2401, and 2401 - 13*184 = 2401 - 2392 = 9, so the remainder is 9. Final answer: 9
341 tokens in, 938 out (690 of them reasoning) · 5.1 s · $0.0038 · 1 message on Pro · answered by deepseek/deepseek-v4-pro-0813 via Wafer ·
Claude Haiku 4.5
Passed: Final answer 9: right.
I need to find the remainder when 7^100 is divided by 13. I'll use modular arithmetic and Fermat's Little Theorem. Step 1: Apply Fermat's Little Theorem. Since 13 is prime and gcd(7, 13) = 1, Fermat's Little Theorem tells us that 7^(13-1) ≡ 1 (mod 13), which means 7^12 ≡ 1 (mod 13). Step 2: Express the exponent in terms of 12. I need to write 100 = 12q + r where 0 ≤ r < 12. 100 ÷ 12 = 8 remainder 4 So 100 = 12(8) + 4, which means q = 8 and r = 4. Step 3: Rewrite 7^100 using this decomposition. 7^100 = 7^(12·8 + 4) = (7^12)^8 · 7^4 Step 4: Apply Fermat's Little Theorem to simplify. (7^12)^8 · 7^4 ≡ 1^8 · 7^4 ≡ 7^4 (mod 13) Step 5: Calculate 7^4 mod 13. 7^1 = 7 7^2 = 49 = 3(13) + 10 ≡ 10 (mod 13) 7^4 = (7^2)^2 ≡ 10^2 = 100 (mod 13) Step 6: Reduce 100 mod 13. 100 = 7(13) + 9 = 91 + 9 So 100 ≡ 9 (mod 13) Step 7: Check the result by computing 7^100 mod 13 another way. Let me verify by computing successive powers: 7^1 ≡ 7 (mod 13) 7^2 ≡ 10 (mod 13) 7^3 ≡ 7 · 10 = 70 ≡ 5 (mod 13) [since 70 = 5(13) + 5] 7^4 ≡ 7 · 5 = 35 ≡ 9 (mod 13) [since 35 = 2(13) + 9] ✓ This confirms 7^4 ≡ 9 (mod 13). Step 8: Verify using the original calculation. Since 7^12 ≡ 1 (mod 13) and 100 = 96 + 4 = 12(8) + 4, we have 7^100 ≡ 7^4 ≡ 9 (mod 13). ✓ Final answer: 9
359 tokens in, 726 out · 4.9 s · $0.0040 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Anthropic ·
Mistral Large 4
Passed: Final answer 9: right.
Step 1: Use Fermat's little theorem. 13 is prime and gcd(7,13)=1, so 7^12 ≡ 1 (mod 13). Step 2: Reduce the exponent modulo 12. 100 = 12*8 + 4 so 7^100 = 7^(12*8+4) = (7^12)^8 * 7^4. Step 3: Apply the congruence from Step 1. (7^12)^8 * 7^4 ≡ 1^8 * 7^4 ≡ 7^4 (mod 13). Step 4: Compute 7^4 mod 13. 7^2 = 49 49 ≡ 10 (mod 13) because 49 - 13*3 = 10. Therefore 7^4 = (7^2)^2 ≡ 10^2 = 100 (mod 13). Step 5: Reduce 100 mod 13. 100 - 13*7 = 9 so 100 ≡ 9 (mod 13). Step 6: Combine the steps. 7^100 ≡ 7^4 ≡ 9 (mod 13). Check: 7^4 = 2401, and 2401 = 13*184 + 9, so 7^4 leaves remainder 9. This confirms the result. Final answer: 9
345 tokens in, 2,143 out (1,446 of them reasoning) · 33.4 s · $0.0047 · 1 message on Pro · answered by mistralai/mistral-large-4-0 via Mistral ·
Claude Sonnet 5.5
Passed: Final answer 9: right.
We want 7^100 mod 13. I'll use Fermat's little theorem and then check by another route. Step 1: Since 13 is prime and 7 is not a multiple of 13, Fermat's little theorem gives 7^12 ≡ 1 (mod 13). Step 2: Divide the exponent by 12. 100 = 12 * 8 + 4 Step 3: Rewrite the power. 7^100 = (7^12)^8 * 7^4 ≡ 1^8 * 7^4 (mod 13) ≡ 7^4 (mod 13) Step 4: Compute 7^4 mod 13 in small pieces. 7^2 = 49 = 3*13 + 10, so 7^2 ≡ 10 7^4 ≡ 10^2 = 100 = 7*13 + 9, so 7^4 ≡ 9 Step 5: Check by a different route, using repeated squaring directly on 100. 7^2 ≡ 10 7^4 ≡ 9 7^8 ≡ 81 = 6*13 + 3, so 7^8 ≡ 3 7^16 ≡ 9 7^32 ≡ 81 ≡ 3 7^64 ≡ 9 Now 100 = 64 + 32 + 4, so 7^100 ≡ 7^64 * 7^32 * 7^4 ≡ 9 * 3 * 9 = 243 243 = 18*13 + 9, so 243 ≡ 9. Both methods agree. Final answer: 9
447 tokens in, 512 out · 3.5 s · $0.0060 · 1 message on Pro · answered by anthropic/claude-sonnet-5.5 via Anthropic ·
Claude Sonnet 5
Passed: Final answer 9: right.
1. We need 7^100 mod 13. By Fermat's Little Theorem, since 13 is prime and gcd(7,13)=1, 7^12 ≡ 1 (mod 13). 2. Write 100 = 12·8 + 4, so 7^100 = (7^12)^8 · 7^4 ≡ 1^8 · 7^4 ≡ 7^4 (mod 13). 3. Compute 7^4: 7^2 = 49, and 49 mod 13 = 49 - 39 = 10, so 7^2 ≡ 10 (mod 13). 4. Then 7^4 = (7^2)^2 ≡ 10^2 = 100 (mod 13). 5. Reduce 100 mod 13: 13·7 = 91, so 100 - 91 = 9. Thus 7^4 ≡ 9 (mod 13). 6. Check: compute directly 7^4 = 2401. Dividing, 13·184 = 2392, remainder 2401 - 2392 = 9. Matches step 5. Final answer: 9
445 tokens in, 535 out (178 of them reasoning) · 6.9 s · $0.0062 · 1 message on Pro · answered by anthropic/claude-sonnet-5 via Anthropic ·
Grok 4.7
Passed: Final answer 9: right.
1. We need the remainder of 7^100 divided by 13, which is 7^100 mod 13. 2. 13 is prime and does not divide 7, so Fermat's Little Theorem gives 7^12 ≡ 1 mod 13. 3. Divide the exponent 100 by 12: 100 = 12*8 + 4. 4. Therefore 7^100 = (7^12)^8 * 7^4 ≡ 1^8 * 7^4 ≡ 7^4 mod 13. 5. Compute the power step by step: 7^2 = 49 49 - 3*13 = 49 - 39 = 10, so 7^2 ≡ 10 mod 13. 6. Then 7^4 = (7^2)^2 ≡ 10^2 = 100 mod 13 100 - 7*13 = 100 - 91 = 9, so 7^4 ≡ 9 mod 13. 7. Check by another route: successive powers give 7^1 ≡ 7, 7^2 ≡ 10, 7^3 ≡ 5, 7^4 ≡ 9 mod 13, and also 7^6 ≡ -1, so 7^12 ≡ 1, confirming the reduction and the value 9. Final answer: 9
1,579 tokens in, 803 out (515 of them reasoning) · 9.9 s · $0.0062 · 1 message on Pro · answered by x-ai/grok-4.7 via xAI ·
Kimi K3
Passed: Final answer 9: right.
1. 13 is prime and gcd(7, 13) = 1, so by Fermat's little theorem, 7^12 ≡ 1 (mod 13). 2. Write 100 as a multiple of 12 plus a remainder: 100 = 12·8 + 4. 3. Use that to reduce the exponent: 7^100 = 7^(12·8 + 4) = (7^12)^8 · 7^4. Since 7^12 ≡ 1 (mod 13), this is congruent to 1^8 · 7^4 ≡ 7^4 (mod 13). 4. Compute 7^4 (mod 13) in small pieces: 7^2 = 49 ≡ 49 − 39 = 10 (mod 13). 7^4 = (7^2)^2 ≡ 10^2 = 100 ≡ 100 − 91 = 9 (mod 13). 5. So 7^100 ≡ 9 (mod 13), meaning the remainder is 9. Check: powers cycle with period 12 since 7^12 ≡ 1, and 100 mod 12 = 4. The start of the cycle is 7^1 ≡ 7, 7^2 ≡ 10, 7^3 ≡ 5, 7^4 ≡ 9 (mod 13), which matches step 4. Final answer: 9
428 tokens in, 655 out (339 of them reasoning) · 20.3 s · $0.0063 · 1 message on Pro · answered by moonshotai/kimi-k3 via Wafer ·
GPT-6 Astra
Passed: Final answer 9: right.
1. Find a useful small power of 7 modulo 13. 7^2 = 49 = 13 × 3 + 10 7^3 ≡ 7 × 10 = 70 ≡ 5 (mod 13) Here, ≡ means the numbers have the same remainder when divided by 13. 2. Square to find the remainder of 7^6. 7^6 ≡ 5^2 = 25 ≡ -1 (mod 13) Squaring again gives: 7^12 ≡ (-1)^2 = 1 (mod 13) 3. Split the exponent into a multiple of 12 and a leftover. 100 = 12 × 8 + 4 7^100 = (7^12)^8 × 7^4 7^100 ≡ 1^8 × 7^4 (mod 13) 4. Calculate the remaining power. 7^4 ≡ (7^2)^2 ≡ 10^2 = 100 (mod 13) 100 = 13 × 7 + 9 So the remainder is 9. 5. Check using a different exponent split. 100 = 6 × 16 + 4 7^100 ≡ (7^6)^16 × 7^4 ≡ (-1)^16 × 9 = 9 (mod 13) This confirms the result, and 9 is between 0 and 12 as required. Final answer: 9
341 tokens in, 316 out · 3.9 s · $0.0096 · 1 message on Pro · answered by openai/gpt-6-astra via OpenAI ·
Gemini 3.1 Pro
Passed: Final answer 9: right.
To find the remainder when 7^100 is divided by 13, we can use a rule in number theory called Fermat's Little Theorem. 1. Fermat's Little Theorem states that for any prime number p and an integer a that is not divisible by p, a^(p-1) leaves a remainder of 1 when divided by p. In modular arithmetic notation, a^(p-1) = 1 (mod p). 2. Apply the theorem with our specific numbers. Our divisor, 13, is a prime number, and our base, 7, is not a multiple of 13. p = 13 a = 7 7^(13-1) = 1 (mod 13) 7^12 = 1 (mod 13) This tells us that every time we multiply 7 by itself 12 times, the remainder when divided by 13 is 1. 3. Figure out how many groups of 12 are in our exponent, 100, by dividing 100 by 12. 100 / 12 = 8 with a remainder of 4 This means we can write 100 as (12 * 8) + 4. 4. Rewrite 7^100 using the rules of exponents to separate the groups of 12. 7^100 = 7^((12 * 8) + 4) 7^100 = (7^12)^8 * 7^4 5. Substitute the remainder of 1 for 7^12 to simplify the problem. (7^12)^8 * 7^4 = (1)^8 * 7^4 (mod 13) 1 * 7^4 = 7^4 (mod 13) So, finding the remainder of 7^100 divided by 13 is exactly the same as finding the remainder of 7^4 divided by 13. 6. Calculate the remainder of 7^4 divided by 13 step by step. First, find 7^2. 7^2 = 49 Divide 49 by 13 to find the remainder. 13 * 3 = 39 49 - 39 = 10 So, 7^2 leaves a remainder of 10. 7. Use the remainder of 7^2 to easily find the remainder of 7^4. 7^4 = (7^2)^2 Using our remainder from the previous step: (7^2)^2 = 10^2 (mod 13) 10^2 = 100 8. Divide 100 by 13 to find our final remainder. 13 * 7 = 91 100 - 91 = 9 Therefore, 7^4 (and thus 7^100) leaves a remainder of 9 when divided by 13. 9. Let's check our result by calculating the powers of 7 one by one instead of squaring the remainder. 7^1 = 7 (mod 13) 7^2 = 49, and 49 = 39 + 10, so it's 10 (mod 13) 7^3 = 7^2 * 7 = 10 * 7 = 70. Divide 70 by 13: 13 * 5 = 65, and 70 - 65 = 5. So 7^3 is 5 (mod 13). 7^4 = 7^3 * 7 = 5 * 7 = 35. Divide 35 by 13: 13 * 2 = 26, and 35 - 26 = 9. So 7^4 is 9 (mod 13). The calculations match perfectly, confirming our remainder is correct. Final answer: 9
353 tokens in, 2,525 out (1,620 of them reasoning) · 21.3 s · $0.0155 · 1 message on Pro · answered by google/gemini-3.1-pro-preview via Google AI Studio ·
Claude Opus 5.5
Passed: Final answer 9: right.
1. Use Fermat's little theorem. 13 is prime and 13 does not divide 7, so: 7^12 ≡ 1 (mod 13) 2. Write the exponent 100 in terms of multiples of 12. 100 = 12 · 8 + 4 3. Rewrite 7^100 using this split. 7^100 = (7^12)^8 · 7^4 Since 7^12 ≡ 1, this gives: 7^100 ≡ 1^8 · 7^4 (mod 13) 7^100 ≡ 7^4 (mod 13) 4. Compute 7^4 mod 13 by repeated squaring. First square 7: 7^2 = 49 49 − 3·13 = 49 − 39 = 10 So 7^2 ≡ 10 (mod 13). Then square again: 7^4 ≡ 10^2 = 100 100 − 7·13 = 100 − 91 = 9 So 7^4 ≡ 9 (mod 13). 5. Conclude. 7^100 ≡ 9 (mod 13) Check (a second route): First compute 7^3: 7^3 = 7^2 · 7 ≡ 10 · 7 = 70 70 − 65 = 5, so 7^3 ≡ 5 (mod 13). Then square it: 7^6 = (7^3)^2 ≡ 5^2 = 25 25 − 13 = 12, so 7^6 ≡ 12 ≡ −1 (mod 13). Now split the exponent by 6: 100 = 6 · 16 + 4 7^100 = (7^6)^16 · 7^4 ≡ (−1)^16 · 9 = 9 (mod 13) Both routes give 9. Final answer: 9
447 tokens in, 805 out (214 of them reasoning) · 7.2 s · $0.0179 · 1 message on Pro · answered by anthropic/claude-opus-5.5 via Google ·
Claude Fable 5.1
Passed: Final answer 9: right.
We want 7^100 mod 13. Step 1: Use Fermat's Little Theorem. Since 13 is prime and 13 does not divide 7, 7^12 ≡ 1 (mod 13). So powers of 7 repeat with a cycle that divides 12. 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 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 4: Conclude. 7^100 ≡ 9 (mod 13) Check (using the actual order of 7 mod 13): 7^2 ≡ 10, 7^3 ≡ 70 ≡ 5, 7^4 ≡ 35 ≡ 9, 7^5 ≡ 63 ≡ 11, 7^6 ≡ 77 ≡ 12 ≡ -1, so 7^12 ≡ 1, confirming the cycle length divides 12. Then 7^96 = (7^12)^8 ≡ 1 and 7^100 ≡ 7^4 ≡ 9. Consistent. Final answer: 9
447 tokens in, 536 out · 6.4 s · $0.0313 · 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 19 models passed this AI math solver test input's check (final answer). The cheapest reply that passed was GPT-6 Luna's, at $0.00010; the fastest, DeepSeek V4.1 Flash's in 1.1 s. The dearest reply, Claude Fable 5.1's, cost 305 times as much ($0.0313).
What does a reply to “A remainder of a large power” cost?
Through the models' APIs, what OpenRouter charged us ran from $0.00010 (GPT-6 Luna) to $0.0313 (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. Free is 5 messages to try; sign in with an email link, no password or card.