{"id":20578361,"url":"https://github.com/g1eng/cola2","last_synced_at":"2025-05-09T21:34:15.281Z","repository":{"id":190335294,"uuid":"427901520","full_name":"g1eng/COLA2","owner":"g1eng","description":"An ancient Collatz map solver","archived":true,"fork":false,"pushed_at":"2021-11-20T15:18:15.000Z","size":1098,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T11:43:21.400Z","etag":null,"topics":["numerical-calculations","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g1eng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-14T10:47:05.000Z","updated_at":"2024-10-05T14:01:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e99f67e-f50c-4a15-b990-945ad55fa2b9","html_url":"https://github.com/g1eng/COLA2","commit_stats":null,"previous_names":["g1eng/cola2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g1eng%2FCOLA2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g1eng%2FCOLA2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g1eng%2FCOLA2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g1eng%2FCOLA2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g1eng","download_url":"https://codeload.github.com/g1eng/COLA2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253328766,"owners_count":21891525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["numerical-calculations","rust"],"created_at":"2024-11-16T06:12:43.986Z","updated_at":"2025-05-09T21:34:14.892Z","avatar_url":"https://github.com/g1eng.png","language":"Rust","readme":"# About\n\nCOLA2 is a simple solver program for Collatz conjecture (known as `3n+1` problem).\nAbout Collatz conjencture, see [wikipedia](https://en.wikipedia.org/wiki/3n%2B1). \n\nIn this program, the map for even `n|-\u003en/2` is called A, and the map for odd `n|-\u003e3n+1` is called B.\n\n# Requirement\n\n* rustc (\u003e=1.53.0 recommended)\n\n# Installation\n\nFor Unix-like operating system, simply make it:\n\n```\nmake\nmake install\n```\n\n# Usage\n\n## 1. give numbers via pipeline\n\n```\necho 153 | cola2\n153 36\necho 155555555555555555555555555553 | cola2\n155555555555555555555555555553 901\n```\n\n## 2. give numbers from a file\n\n```\nfor i in {1..8}; do\n  echo 2^$i-1 | bc\ndone \u003e num.dat\ncola2 \u003c num.dat\n1 0\n3 7\n7 16\n15 17\n31 106\n63 107\n127 46\n255 47\n```\n\n## 3. interactive\n\n`cola2 \u003center\u003e`\n\n# Tips: Make dot file to visualize convergence process\n\nFollowing sample script generates a DOT file to visualize Collatz map for numbers less than 257:\n\n```\n{\n  echo strict digraph map \\{\n  for i in {1..256}\n  do\n    echo $i | cola2 -d\n  done\n  echo \\}\n} \u003e collatz_map.dot\n```\n\n![Collatz map 256](docs/sample.png)\n\n# Author\n\nNomura Suzume \u003csuzume315[ATT]g00.g1e.org\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg1eng%2Fcola2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg1eng%2Fcola2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg1eng%2Fcola2/lists"}