<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aratrik Ghosh</title>
    <description>The latest articles on DEV Community by Aratrik Ghosh (@aratrik_ghosh_d4a546d80ba).</description>
    <link>https://dev.to/aratrik_ghosh_d4a546d80ba</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3886348%2F1ad19028-4edf-466f-9da4-05e4253882eb.png</url>
      <title>DEV Community: Aratrik Ghosh</title>
      <link>https://dev.to/aratrik_ghosh_d4a546d80ba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aratrik_ghosh_d4a546d80ba"/>
    <language>en</language>
    <item>
      <title>I Built a Python Library That Classifies 3000+ Number Types — At 15</title>
      <dc:creator>Aratrik Ghosh</dc:creator>
      <pubDate>Sat, 18 Apr 2026 17:26:29 +0000</pubDate>
      <link>https://dev.to/aratrik_ghosh_d4a546d80ba/i-built-a-python-library-that-classifies-3000-number-types-at-15-o8n</link>
      <guid>https://dev.to/aratrik_ghosh_d4a546d80ba/i-built-a-python-library-that-classifies-3000-number-types-at-15-o8n</guid>
      <description>&lt;p&gt;I'm 15, in Class 10, and I just shipped my first Python package to PyPI. Here's what I built and why nobody else had done it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;There are tons of Python libraries for number &lt;em&gt;computation&lt;/em&gt; — factoring, GCDs, prime generation. But none of them answer this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What type of number is this?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not just "is it prime?" — I mean every named mathematical category it belongs to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numclassify&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;nc&lt;/span&gt;

&lt;span class="n"&gt;nc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_true_properties&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1729&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# ['taxicab', 'carmichael', 'zeisel', 'odd', 'deficient', 'squarefree']
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;1729 is the Hardy-Ramanujan number — smallest expressible as sum of two cubes in two different ways. It's also a Carmichael number and a Zeisel number. Most people only know one of those facts. numclassify knows all of them instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;p&gt;3000+ named number types, 10 categories, zero dependencies, Python 3.8–3.13.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Polygonal&lt;/td&gt;
&lt;td&gt;998&lt;/td&gt;
&lt;td&gt;Triangular, Square, Pentagonal…&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Centered Polygonal&lt;/td&gt;
&lt;td&gt;998&lt;/td&gt;
&lt;td&gt;Centered Triangular, Centered Hexagonal…&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prime families&lt;/td&gt;
&lt;td&gt;41&lt;/td&gt;
&lt;td&gt;Twin, Mersenne, Sophie Germain…&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Digital invariants&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Armstrong, Harshad, Happy, Disarium…&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Divisor-based&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;Perfect, Abundant, Weird, Amicable…&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sequences&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Fibonacci, Lucas, Catalan, Bell…&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Powers&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;Perfect Square, Taxicab…&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Number theory&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;Evil, Carmichael, Keith…&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Quick Examples
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numclassify&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;nc&lt;/span&gt;

&lt;span class="c1"&gt;# Boolean checks
&lt;/span&gt;&lt;span class="n"&gt;nc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_prime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;         &lt;span class="c1"&gt;# True
&lt;/span&gt;&lt;span class="n"&gt;nc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_armstrong&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;153&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;# True
&lt;/span&gt;&lt;span class="n"&gt;nc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_perfect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;       &lt;span class="c1"&gt;# True
&lt;/span&gt;
&lt;span class="c1"&gt;# All true properties
&lt;/span&gt;&lt;span class="n"&gt;nc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_true_properties&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;153&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# ['armstrong', 'harshad', 'triangular', 'abundant']
&lt;/span&gt;
&lt;span class="c1"&gt;# Search a range
&lt;/span&gt;&lt;span class="n"&gt;nc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_in_range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_armstrong&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# [1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474]
&lt;/span&gt;
&lt;span class="c1"&gt;# What's the most "special" number between 1 and 1000?
&lt;/span&gt;&lt;span class="n"&gt;nc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;most_special_in_range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  CLI
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;numclassify check 1729
taxicab        ✓
carmichael     ✓
zeisel         ✓
odd            ✓

&lt;span class="nv"&gt;$ &lt;/span&gt;numclassify find armstrong &lt;span class="nt"&gt;--limit&lt;/span&gt; 5
1, 2, 3, 153, 370

&lt;span class="nv"&gt;$ &lt;/span&gt;numclassify info armstrong
Name:        armstrong
Category:    digital_invariants
Description: Sum of digits each raised to power of digit count
Examples:    1, 2, 3, 153, 370, 371, 407
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;numclassify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GitHub: &lt;a href="https://github.com/aratrikghosh2011-tech/numclassify" rel="noopener noreferrer"&gt;https://github.com/aratrikghosh2011-tech/numclassify&lt;/a&gt;&lt;br&gt;
PyPI: &lt;a href="https://pypi.org/project/numclassify/" rel="noopener noreferrer"&gt;https://pypi.org/project/numclassify/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Built this because I was studying number theory for competitive maths and kept writing the same classification checks over and over. Figured if I needed it, others did too.&lt;/p&gt;

&lt;p&gt;Feedback welcome — especially if you find a number type I'm missing.&lt;/p&gt;

</description>
      <category>python</category>
      <category>opensource</category>
      <category>mathematics</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
