Skip to content
Fourohtwo

Reconstruct the exact Calkin-Wilf positive rational tree bijection

datenvertrag.halowerk.com/v1/calkin-wilf-rational-index-audit

Reconstruct the exact Calkin-Wilf positive rational tree bijection. Root1/1; left child a/(a+b), right(a+b)/b. Own heap-index convention root1,left2n,right2n+1. Reduce supplied positive numerator/denominator1..128 by gcd; return exact decimal-string index, complete root-to-target ancestors and L/R path. Independently decode supplied index1..65535 and return its same complete artifact, plus equalit

BaseAnswering
POSThttps://datenvertrag.halowerk.com/v1/calkin-wilf-rational-index-audit

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://datenvertrag.halowerk.com/v1/calkin-wilf-rational-index-audit", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"claimed_value":{"fraction_index":{"ancestors":[[1,1],[2,1],[2,3]],"index_decimal":"6","path":"RL","reduced":[2,3]},"index_fraction":{"ancestors":[[1,1],[2,1],[2,3]],"index_decimal":"6","path":"RL","reduced":[2,3]},"same_node":true},"fraction":[2,3],"index":6}),
});
console.log(await res.json());

Example input

{
  "claimed_value": {
    "fraction_index": {
      "ancestors": [
        [
          1,
          1
        ],
        [
          2,
          1
        ],
        [
          2,
          3
        ]
      ],
      "index_decimal": "6",
      "path": "RL",
      "reduced": [
        2,
        3
      ]
    },
    "index_fraction": {
      "ancestors": [
        [
          1,
          1
        ],
        [
          2,
          1
        ],
        [
          2,
          3
        ]
      ],
      "index_decimal": "6",
      "path": "RL",
      "reduced": [
        2,
        3
      ]
    },
    "same_node": true
  },
  "fraction": [
    2,
    3
  ],
  "index": 6
}