{"id":15032850,"url":"https://github.com/ruby/prime","last_synced_at":"2025-05-15T16:09:47.531Z","repository":{"id":34841656,"uuid":"122466826","full_name":"ruby/prime","owner":"ruby","description":"Prime numbers and factorization library.","archived":false,"fork":false,"pushed_at":"2025-02-18T01:36:03.000Z","size":155,"stargazers_count":36,"open_issues_count":2,"forks_count":18,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-03-31T21:48:10.989Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-22T10:57:14.000Z","updated_at":"2025-02-18T01:36:06.000Z","dependencies_parsed_at":"2024-06-18T16:49:20.163Z","dependency_job_id":"28ddecc4-24f2-4c36-bb5a-c612449a5315","html_url":"https://github.com/ruby/prime","commit_stats":{"total_commits":106,"total_committers":26,"mean_commits":4.076923076923077,"dds":0.6698113207547169,"last_synced_commit":"ef29bdb2ab8709be981dcd5f91b9308e5c3f204d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fprime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fprime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fprime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fprime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/prime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737788,"owners_count":20987721,"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":["ruby"],"created_at":"2024-09-24T20:19:36.021Z","updated_at":"2025-04-07T22:09:13.183Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# Prime\n\n[![CI](https://github.com/ruby/prime/actions/workflows/test.yml/badge.svg)](https://github.com/ruby/prime/actions/workflows/test.yml)\n\nPrime numbers and factorization library.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'prime'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install prime\n\n## Usage\n\n```ruby\nrequire 'prime'\n\n# Prime is the set of all prime numbers, and it is Enumerable.\nPrime.take(4)             #=\u003e [2, 3, 5, 7]\nPrime.first(4)            #=\u003e [2, 3, 5, 7]\nPrime.each(7).to_a        #=\u003e [2, 3, 5, 7]\n\n# Determining whether an arbitrary integer is a prime number\nPrime.prime?(7)           #=\u003e true\n8.prime?                  #=\u003e false\n\n# Factorization in prime numbers\nPrime.prime_division(8959)                          #=\u003e [[17, 2], [31, 1]]\nPrime.int_from_prime_division([[17, 2], [31, 1]])   #=\u003e 8959\n17**2 * 31                                          #=\u003e 8959\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/prime.\n\n## License\n\nThe gem is available as open source under the terms of the [BSD-2-Clause](LICENSE.txt).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fprime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fprime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fprime/lists"}