interplane.Get Omega
Read in your language

omega-rosetta

aien-dev/omega-rosetta

Brought by drakestapleton

branch main Branches Tags History

omega-rosetta / tasks / smith-numbers / wolfram.txt

16 lines · 1126 bytes Raw Blame History
1Wolfram cross-check of tasks/smith-numbers/expected.txt
2tool: WolframLanguageEvaluator (Wolfram MCP, https://agenttools.wolfram.com/mcp), 2026-10-27
3The query builds the task's whole output text from Wolfram built-ins, independently of omc and
4of oracle.py, and returns {SHA-256 of that text, the text}. It agrees when that SHA-256 equals
5sha256(expected.txt) = 3774404002938e87d724cdf9c23973c3380bb6155e2bc1d42e06d8d370da71c4.
6agreement: YES
7query:
8ds[n_] := Total[IntegerDigits[n]];
9smithQ[n_] := CompositeQ[n] && ds[n] == Total[(ds[#[[1]]] #[[2]]) & /@ FactorInteger[n]];
10sm = Select[Range[2, 9999], smithQ];
11s = "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}
15result:
16Out[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"}