Zum Inhalt
HALOWERK

Datenvertragswerk

kaprekar four digit basin census

For base2..10 enumerate the ENTIRE fixed4digit integer state space0..base^4-1, always retaining leadingzeros in digit extraction. Kaprekar transition sorts allfourdigits descending minus ascending, evaluated in that base. Return every attractorcycle in actual transition order rotated to minimum integer first, rows sorted by thatfirstmember; exact basin_size and counts by minimum steps until entering its cycle, with cyclemembers atdepth0. Allstates including repeated-digit zero basin.

POST https://datenvertrag.halowerk.com/v1/kaprekar-four-digit-basin-census

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
baseSiehe SchemaJa
claimed_basinsSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "base",
    "claimed_basins"
  ],
  "properties": {
    "base": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 2,
          "maximum": 10
        },
        {
          "type": "null"
        }
      ]
    },
    "claimed_basins": {
      "anyOf": [
        {
          "type": "array",
          "maxItems": 32,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "cycle",
              "basin_size",
              "depth_counts"
            ],
            "properties": {
              "cycle": {
                "type": "array",
                "maxItems": 32,
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9999
                },
                "minItems": 1
              },
              "basin_size": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000
              },
              "depth_counts": {
                "type": "array",
                "maxItems": 64,
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000
                },
                "minItems": 1
              }
            }
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "base": 10,
  "claimed_basins": [
    {
      "cycle": [
        0
      ],
      "basin_size": 10,
      "depth_counts": [
        1,
        9
      ]
    },
    {
      "cycle": [
        6174
      ],
      "basin_size": 9990,
      "depth_counts": [
        1,
        383,
        576,
        2400,
        1272,
        1518,
        1656,
        2184
      ]
    }
  ]
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →