5 ms·
NumClass – a Python CLI classifying integers into 200 number-theory properties
- c788630 6mo agoHi everyone, For the past few months I’ve been building a personal project called NumClass: a Python CLI tool that analyzes an integer and classifies it into a large set of number-theory properties. The idea started as a small experiment inspired by the YouTube channel Numberphile, but it quickly got out of hand and now supports 200+ classifiers. Examples of things it can detect: • perfect / abundant / weird numbers • Mersenne primes and primorial numbers • amicable, sociable and aspiring numbers (aliquot sequences) • Carmichael numbers and other pseudoprimes • narcissistic, Kaprekar and happy numbers • palindromic and truncatable primes • taxicab numbers (Hardy–Ramanujan style cube sums) • Fibonacci, Lucas, Pell and Padovan numbers • triangular, pentagonal and other figurate numbers • strange curiosities like Belphegor’s prime, vampire numbers and Munchausen numbers The current version contains 205 atomic classifiers plus 27 intersections (232 properties in total). Example output: [screenshot] Some features: • 200+ classifiers • extensible plugin-like architecture • configurable profiles (fast vs heavy computations) • OEIS sequence integration • support for very large integers (100000 digits by default) • explanations for each classification The project is open source: https://github.com/c788630/Numclass https://github.com/c788630/Numclass I’m now looking for people who would like to test it, especially: • mathematicians • Python developers • people interested in number theory • anyone who likes exploring interesting integer properties If you decide to try it out, I would really appreciate feedback on: • usability of the CLI • additional number-theory properties to implement • performance for very large numbers • any issues or bugs you encounter There are also a few small Easter eggs hidden in the program (including Klingon number input), so feel free to explore Installation instructions and documentation are available in the repository (docs folder).
- netvarun 6mo agoThis is an amazing project - thank you for building/sharing it!
- c788630 6mo agoThanks, glad you like it! If you end up trying it, I'd be very interested in your feedback.