{ "info": { "author": "Sameer Marathe", "author_email": "transmogrifier@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "EulerLib\n********\n\n`eulerlib`__ is a library of recreational mathematics and number theory related\nfunctions inspired by `Project Euler`_. Available functions include:\n\n* Prime number generation\n* Divisor functions (sigma functions)\n* Euler's totient function\n* Greatest Common Divisor (GCD) using Euclid's algorithm\n* Least Common Multiple (LCM)\n* Integer square root\n* Fibonacci numbers\n* Pandigital numbers\n* Palindrome numbers\n* Pythagorean triples\n\nFunctions from this library can be used to solve recreational mathematics and\nprogramming problems such as problems in Project Euler.\n\nInstallation\n------------\n`eulerlib`__ is avalaible through Python Package Index (`PyPI`_) using\n`pip`_. ::\n\n >>> pip install --upgrade eulerlib\n\nTo uninstall using `pip`_. ::\n\n >>> pip uninstall eulerlib\n\nUsage\n-----\nIn Python console you can import functions/classes from eulerlib as needed. ::\n\n >>> from eulerlib import primes\n >>> p10 = primes(10)\n >>> print(p10)\n [2, 3, 5, 7]\n\nThe *Divisors* class implements functions related to prime factorization,\nsigma functions etc. ::\n\n >>> from eulerlib import Divisors\n >>> mydiv = Divisors(10000)\n >>> div84 = mydiv.divisors(84) #divisors of 84\n >>> print(div84)\n [1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84]\n >>> pf840 = mydiv.prime_factors(840) # prime factors of 840\n >>> print(pf840)\n [(2, 3), (3, 1), (5, 1), (7, 1)]\n\n**Example**: Solved `Project Euler`_ `problem 3`_. ::\n\n from eulerlib import is_square, primes\n #get approximate square root of number since\n #largest prime factor < sq. root\n (is_sq, sqroot) = is_square(600851475143L)\n #get a list of primes less than the approx. square root.\n test_primes = primes(sqroot + 1L)\n #test the primes from the list to find the largest factor\n len_p = len(test_primes)\n for i in range(1,len_p+1):\n j = 0 - i\n test_fact = test_primes[j]\n if 600851475143L%test_fact == 0:\n break\n answer = test_fact #Set the answer\n\nSee complete `documentation`_.\n\nModules\n-------\n+----------------+------------------------------------------------------------+\n|prime_numbers.py| Functions to generate lists of primes. |\n+----------------+------------------------------------------------------------+\n|numtheory.py | * Euler's divisor functions (sigma funtions) |\n| | * Euler's totient function (phi function) |\n| | * Prime factors of a number |\n| | * Divisors of a number |\n| | * Greatest Common Divisor (GCD) |\n| | * Least Common Multiple (LCM) |\n| | * Digital root and digital sum of a number |\n+----------------+------------------------------------------------------------+\n|fibonacci.py | Functions related to the Fibonacci sequence. |\n+----------------+------------------------------------------------------------+\n|pythagoras.py | Functions related to Pythagorean triples. |\n+----------------+------------------------------------------------------------+\n|etc.py | Miscellaneous functions: |\n| | |\n| | * Pandigital numbers |\n| | * Conversion from decimal to base n (2-36) |\n| | * Number to lists and vice versa |\n| | * Palindrome numbers |\n+----------------+------------------------------------------------------------+\n\nDevelopment\n-----------\nSource code repositories (`GitHub`_, `BitBucket`_) are available.\n`Bug reports`_ and suggestions are most welcome.\n\nLicense\n-------\neulerlib is licensed under `Apache License 2.0`_.\n\n.. _Project Euler: https://projecteuler.net\n.. _PyPI: https://pypi.python.org/pypi\n.. _pip: https://pip.pypa.io\n.. _Apache License 2.0: https://www.apache.org/licenses/LICENSE-2.0.html\n.. _problem 3: https://projecteuler.net/problem=3\n.. _GitHub: https://github.com/transmogrifier/eulerlib\n.. _BitBucket: https://bitbucket.org/transmogrifier/eulerlib\n.. _Bug reports: https://github.com/transmogrifier/eulerlib/issues\n.. _documentation: http://pythonhosted.org/eulerlib\n.. _eulerlib1: https://pypi.python.org/pypi/eulerlib\n__ eulerlib1_\n__ eulerlib1_", "description_content_type": null, "docs_url": "https://pythonhosted.org/eulerlib/", "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/transmogrifier/eulerlib", "keywords": "mathematics project_euler number_theory prime_numbers", "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "eulerlib", "package_url": "https://pypi.org/project/eulerlib/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/eulerlib/", "project_urls": { "Homepage": "https://bitbucket.org/transmogrifier/eulerlib" }, "release_url": "https://pypi.org/project/eulerlib/0.2/", "requires_dist": null, "requires_python": null, "summary": "A library of number theory related functions inspired by Project Euler.", "version": "0.2" }, "last_serial": 1534769, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "da6238c3a0970ea998795ed2c4bc14b7", "sha256": "2dc242b8daad681b16f8d5e42de0f2c61920c3a53380a82c0d76f8209c4f3fa3" }, "downloads": -1, "filename": "eulerlib-0.1.zip", "has_sig": false, "md5_digest": "da6238c3a0970ea998795ed2c4bc14b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21259, "upload_time": "2015-04-23T16:38:59", "url": "https://files.pythonhosted.org/packages/81/ef/a4831f6b57b1363d69949f1642bb4de99f97a8d1a23bad8c554782cbce3f/eulerlib-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "959a757272cb62db680a7a8ff8b29637", "sha256": "f34771537c92d4c82ae67f34ea9dff9bd7489ecf009d50c3dc4e4459aeefe9af" }, "downloads": -1, "filename": "eulerlib-0.2.zip", "has_sig": false, "md5_digest": "959a757272cb62db680a7a8ff8b29637", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24300, "upload_time": "2015-05-05T22:17:44", "url": "https://files.pythonhosted.org/packages/62/32/561260dd42e193d31a584a77dbbf7c633a4259e9a7bf9ddf469cabf24e9b/eulerlib-0.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "959a757272cb62db680a7a8ff8b29637", "sha256": "f34771537c92d4c82ae67f34ea9dff9bd7489ecf009d50c3dc4e4459aeefe9af" }, "downloads": -1, "filename": "eulerlib-0.2.zip", "has_sig": false, "md5_digest": "959a757272cb62db680a7a8ff8b29637", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24300, "upload_time": "2015-05-05T22:17:44", "url": "https://files.pythonhosted.org/packages/62/32/561260dd42e193d31a584a77dbbf7c633a4259e9a7bf9ddf469cabf24e9b/eulerlib-0.2.zip" } ] }