omega-rosetta
aien-dev/omega-rosetta
Brought by drakestapleton
omega-rosetta / tasks / sum-multiples-of-3-and-5 / wolfram.txt
| 1 | Wolfram cross-check of tasks/sum-multiples-of-3-and-5/expected.txt |
| 2 | tool: WolframLanguageEvaluator (Wolfram MCP, https://agenttools.wolfram.com/mcp), 2026-10-27 |
| 3 | The query builds the task's whole output text from Wolfram built-ins, independently of omc and |
| 4 | of oracle.py, and returns {SHA-256 of that text, the text}. It agrees when that SHA-256 equals |
| 5 | sha256(expected.txt) = 9c5883ef8e77d0ad2b32028a0c148c15a51a0098504f1ba2b5b79b80c5bad182. |
| 6 | agreement: YES |
| 7 | query: |
| 8 | f[n_] := Sum[k, {k, 0, n - 1, 3}] + Sum[k, {k, 0, n - 1, 5}] - Sum[k, {k, 0, n - 1, 15}]; |
| 9 | s = "by loop, below 1000: " <> ToString[Total[Select[Range[999], Divisible[#, 3] || Divisible[#, 5] &]]] <> "\n" <> |
| 10 | StringJoin[Table["by formula, below 10^" <> ToString[e] <> ": " <> ToString[f[10^e]] <> "\n", {e, 1, 9}]]; |
| 11 | {Hash[s, "SHA256", "HexString"], s} |
| 12 | result: |
| 13 | Out[1]= {"9c5883ef8e77d0ad2b32028a0c148c15a51a0098504f1ba2b5b79b80c5bad182", "by loop, below 1000: 233168\nby formula, below 10^1: 23\nby formula, below 10^2: 2318\nby formula, below 10^3: 233168\nby formula, below 10^4: 23331668\nby formula, below 10^5: 2333316668\nby formula, below 10^6: 233333166668\nby formula, below 10^7: 23333331666668\nby formula, below 10^8: 2333333316666668\nby formula, below 10^9: 233333333166666668\n"} |