interplane.Get Omega
Read in your language

omega-rosetta

aien-dev/omega-rosetta

Brought by drakestapleton

branch main Branches Tags History

omega-rosetta / tasks / hofstadter-q-sequence / wolfram.txt

15 lines · 1072 bytes Raw Blame History
1Wolfram cross-check of tasks/hofstadter-q-sequence/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) = de27b38bf948ead1345c65bb3da9266300aceb854e1a42f813df336e35ba292f.
6agreement: YES
7query:
8q = ConstantArray[1, 100000];
9Do[q[[n]] = q[[n - q[[n - 1]]]] + q[[n - q[[n - 2]]]], {n, 3, 100000}];
10s = "first 10 terms: " <> StringRiffle[ToString /@ q[[1 ;; 10]], " "] <> "\n" <>
11 "the 1000th term: " <> ToString[q[[1000]]] <> "\n" <>
12 "terms up to the 100000th that are less than the term before: " <> ToString[Count[Differences[q], d_ /; d < 0]] <> "\n";
13{Hash[s, "SHA256", "HexString"], s}
14result:
15Out[1]= {"de27b38bf948ead1345c65bb3da9266300aceb854e1a42f813df336e35ba292f", "first 10 terms: 1 1 2 3 3 4 5 5 6 6\nthe 1000th term: 502\nterms up to the 100000th that are less than the term before: 49798\n"}