omega-rosetta
aien-dev/omega-rosetta
Brought by drakestapleton
omega-rosetta / tasks / smith-numbers / wolfram.txt
| 1 | Wolfram cross-check of tasks/smith-numbers/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) = 3774404002938e87d724cdf9c23973c3380bb6155e2bc1d42e06d8d370da71c4. |
| 6 | agreement: YES |
| 7 | query: |
| 8 | ds[n_] := Total[IntegerDigits[n]]; |
| 9 | smithQ[n_] := CompositeQ[n] && ds[n] == Total[(ds[#[[1]]] #[[2]]) & /@ FactorInteger[n]]; |
| 10 | sm = Select[Range[2, 9999], smithQ]; |
| 11 | s = "Smith numbers below 10000: " <> ToString[Length[sm]] <> "\n" <> |
| 12 | "first 20: " <> StringRiffle[ToString /@ Take[sm, 20], " "] <> "\n" <> |
| 13 | "last 10: " <> StringRiffle[ToString /@ Take[sm, -10], " "] <> "\n"; |
| 14 | {Hash[s, "SHA256", "HexString"], s} |
| 15 | result: |
| 16 | Out[1]= {"3774404002938e87d724cdf9c23973c3380bb6155e2bc1d42e06d8d370da71c4", "Smith numbers below 10000: 376\nfirst 20: 4 22 27 58 85 94 121 166 202 265 274 319 346 355 378 382 391 438 454 483\nlast 10: 9843 9849 9861 9880 9895 9924 9942 9968 9975 9985\n"} |