{
"info": {
"author": "Indrajit Jana",
"author_email": "ijana@temple.edu",
"bugtrack_url": null,
"classifiers": [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
],
"description": "# primes from module primePy\nThis module contains several useful functions to work with prime numbers. For example, extracting all the prime factors (with multiplicity) of a positive integer reasonably fast. Following the list of all functions and their running time.\n\n## Getting started\nDownload the file primes.py and place it in the same directory where your python is installed. Or, simply run the command \n```\n>>>pip install primePy\n```\nto install the package. After installing via `pip` you can call it by \n```\n>>>from primePy import primes\n```\n and then execute the available methods.\n\n## Available methods\nYou may run `primes.about()` afer importing the package. The following is a list of all included methods.\n\n\n`primes.check(n)` returns *True* if *n* is a prime number.
\n`primes.factor(n)` returns the lowest prime factor of *n*.
\n`primes.facors(n)` returns all the prime factors of *n* with multiplicity.
\n`primes.first(n)` returns first *n* many prime.
\n`primes.upto(n)` returns all the prime less than or equal to *n*.
\n`primes.between(m,n)` returns all the prime between *m* and *n*.
\n`primes.phi(n)` returns the Euler's *phi(n)* i.e., the number of integers less than *n* which have no common factor with *n*.
\n\n\n## Demonstration\n\nThis program is tested on my personal laptop with the following configurations.\n\n>Processor: Intel(R) Core(TM) i3-4030U CPU @ 1.90Ghz
\n>Installed memory(RAM): 6.00GB
\n>System type: 64 bit Operating System, x64-based processor
\n>Operating system: Windows 10\n\n### Small numbers\nAll the following commands returnd results in less than *1 sec*.\n\n```\n>>> primes.check(56156149)\nFalse\n>>> primes.check(79012338765433)\nTrue\n```\n\n```\n>>> primes.factor(7568945625)\n3\n>>> primes.factor(5141)\n53\n```\n\n```\n>>> primes.factors(252)\n[2, 2, 3, 3, 7]\n>>> primes.factors(44410608)\n[2, 2, 2, 2, 3, 3, 11, 23, 23, 53]\n```\n\n```\n>>> primes.first(7)\n[2, 3, 5, 7, 11, 13, 17]\n>>> primes.first(37)\n[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83,\n89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157]\n>>> primes.first(5000)\n[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83,\n89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179,\n. . . . \n. . . .\n 48179, 48187, 48193, 48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, 48311, 48313, 48337, 48341, 48353, 48371, 48383, 48397, 48407, 48409, 48413, 48437, 48449, 48463, 48473, 48479, 48481, 48487, 48491, 48497, 48523, 48527, 48533, 48539, 48541, 48563, 48571, 48589, 48593, 48611]\n```\nOutcomes from the last command is truncated.\n\n```\n>>> primes.upto(16)\n[2, 3, 5, 7, 11, 13]\n>>> primes.upto(50000)\n[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83,\n89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179\n. . .\n. . .\n49789, 49801, 49807, 49811, 49823, 49831, 49843, 49853, 49871, 49877, 49891, 49919,\n49921, 49927, 49937, 49939, 49943, 49957, 49991, 49993, 49999]\n```\n\n```\n>>> primes.between(100,200)\n[101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]\n>>> primes.between(100000,500000)\n[100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, 100129, 100151, 100153,\n100169, 100183, 100189, 100193, 100207, 100213, 100237, 100267, 100271, 100279, 100291\n\n499661, 499663, 499669, 499673, 499679, 499687, 499691, 499693, 499711, 499717, 499729, 499739, 499747, 499781, 499787, 499801, 499819, 499853, 499879, 499883, 499897, 499903, 499927, 499943, 499957, 499969, 499973, 499979]\n```\n\n```\n>>> primes.phi(128)\n64\n>>> primes.phi(561534567567457)\n483618287856960\n```\n### A little bigger numbers\n\nAll the following commands returned results in less than *5 secs*.\n\n```\n>>> primes.factors(2910046587320501324077792713140104371205630933992706145011)\n[239, 701, 709, 1997, 1997, 3889, 5171, 5171, 6983, 10009, 4940867, 45845791, 3731292319]\n```\n\n```\n>>> primes.first(10000)[9999]\n104729\n```\nThe last command returns the 10000th prime.\n\n## Suggestions\nFeel free to drop your suggestion at the following email address
\n>Author: Indrajit Jana
\n>Email: ijana at temple dot edu\n\n\n\n\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/janaindrajit/primePy",
"keywords": "fast,prime,facorization,Eular phi,prime check",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "primePy",
"package_url": "https://pypi.org/project/primePy/",
"platform": "",
"project_url": "https://pypi.org/project/primePy/",
"project_urls": {
"Homepage": "https://github.com/janaindrajit/primePy"
},
"release_url": "https://pypi.org/project/primePy/1.3/",
"requires_dist": null,
"requires_python": "",
"summary": "This module contains several useful functions to work with prime numbers. from primePy import primes",
"version": "1.3"
},
"last_serial": 3909834,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "a225d34bd1695c02f24fcb1836270917",
"sha256": "80a9ff144dc5b085acc795dd1f44da7d9c55272f5e9ebaaa76c98cef2a111450"
},
"downloads": -1,
"filename": "primePy-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a225d34bd1695c02f24fcb1836270917",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 2879,
"upload_time": "2018-05-29T06:13:11",
"url": "https://files.pythonhosted.org/packages/29/20/4b9acaae72250f570f42353af56fe5927c3975b8fe2f68fcb390f9ce8ddf/primePy-1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "0abdebcf56b0e6bdf5f69235b44dc680",
"sha256": "53403569077e4d7f7ba7ac53096e4bc05ddf86f996695b7282d981eb0da765d1"
},
"downloads": -1,
"filename": "primePy-1.0.tar.gz",
"has_sig": false,
"md5_digest": "0abdebcf56b0e6bdf5f69235b44dc680",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3054,
"upload_time": "2018-05-29T06:13:12",
"url": "https://files.pythonhosted.org/packages/b5/90/1214274d75ca5496a310c9ac0f6d88708f570b4f47eb0e4989d7a011331e/primePy-1.0.tar.gz"
}
],
"1.1": [
{
"comment_text": "",
"digests": {
"md5": "46ccb5f25cb2551a717993b4335ca600",
"sha256": "45479300856cce7f0b55af62d48c6f17fba4aecd79ea44b888b0141e822372bb"
},
"downloads": -1,
"filename": "primePy-1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "46ccb5f25cb2551a717993b4335ca600",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4038,
"upload_time": "2018-05-29T06:55:58",
"url": "https://files.pythonhosted.org/packages/2b/f0/8c3623e908b9f15ad092576e4b7f734f14907c8f213da747adcd3ed05aaa/primePy-1.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "631331c7a6e8ab87064249d7eb4c8fbe",
"sha256": "302704b86ca6009e73e78ee647f23e87a9fc1ca58d31779471dd5b19fc0d95da"
},
"downloads": -1,
"filename": "primePy-1.1.tar.gz",
"has_sig": false,
"md5_digest": "631331c7a6e8ab87064249d7eb4c8fbe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3935,
"upload_time": "2018-05-29T06:55:59",
"url": "https://files.pythonhosted.org/packages/59/52/9dadb50c64f5a38036b2d78707fb65474370106afa940264500f060b218c/primePy-1.1.tar.gz"
}
],
"1.3": [
{
"comment_text": "",
"digests": {
"md5": "82cce93205516dfbc290f5b4f5c850dc",
"sha256": "5ed443718765be9bf7e2ff4c56cdff71b42140a15b39d054f9d99f0009e2317a"
},
"downloads": -1,
"filename": "primePy-1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "82cce93205516dfbc290f5b4f5c850dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4040,
"upload_time": "2018-05-29T17:18:17",
"url": "https://files.pythonhosted.org/packages/74/c1/bb7e334135859c3a92ec399bc89293ea73f28e815e35b43929c8db6af030/primePy-1.3-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "9cf3803848e4c30ec020660f81b658e2",
"sha256": "25fd7e25344b0789a5984c75d89f054fcf1f180bef20c998e4befbac92de4669"
},
"downloads": -1,
"filename": "primePy-1.3.tar.gz",
"has_sig": false,
"md5_digest": "9cf3803848e4c30ec020660f81b658e2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3914,
"upload_time": "2018-05-29T17:18:18",
"url": "https://files.pythonhosted.org/packages/35/77/0cfa1b4697cfb5336f3a96e8bc73327f64610be3a64c97275f1801afb395/primePy-1.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "82cce93205516dfbc290f5b4f5c850dc",
"sha256": "5ed443718765be9bf7e2ff4c56cdff71b42140a15b39d054f9d99f0009e2317a"
},
"downloads": -1,
"filename": "primePy-1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "82cce93205516dfbc290f5b4f5c850dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4040,
"upload_time": "2018-05-29T17:18:17",
"url": "https://files.pythonhosted.org/packages/74/c1/bb7e334135859c3a92ec399bc89293ea73f28e815e35b43929c8db6af030/primePy-1.3-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "9cf3803848e4c30ec020660f81b658e2",
"sha256": "25fd7e25344b0789a5984c75d89f054fcf1f180bef20c998e4befbac92de4669"
},
"downloads": -1,
"filename": "primePy-1.3.tar.gz",
"has_sig": false,
"md5_digest": "9cf3803848e4c30ec020660f81b658e2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3914,
"upload_time": "2018-05-29T17:18:18",
"url": "https://files.pythonhosted.org/packages/35/77/0cfa1b4697cfb5336f3a96e8bc73327f64610be3a64c97275f1801afb395/primePy-1.3.tar.gz"
}
]
}