Regular Number Checker

n = 2ᵃ · 3ᵇ · 5ᶜ

CalculatorsFreeNo Signup
4.8(797 reviews)
All Tools

Loading tool...

About Regular Number Checker

A regular number checker testing if n = 2^a · 3^b · 5^c for non-negative integers a,b,c. Regular numbers (Hamming/5-smooth numbers) are important in music theory, Babylonian mathematics, and computer science. Client-side.

Regular Number Checker Features

  • Regular check
  • Exponents
  • Music theory
  • Sequence
  • Babylonian math
Regular numbers (Hamming/5-smooth): n = 2^a · 3^b · 5^c. First: 1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,27,30... Called 'regular' because they appear in Babylonian base-60 arithmetic. In music: 5-limit tuning uses intervals as ratios of regular numbers.

How to Use

Enter n:

  • Regular?: Only factors 2,3,5?
  • Exponents: The (a,b,c) triple
  • Sequence: Nearby regular numbers

Music Theory

5-limit tuning: intervals are ratios of regular numbers. Major third = 5/4, perfect fifth = 3/2, octave = 2/1. Just intonation uses these 'pure' intervals. The 12-tone equal temperament approximates them.

Babylonian Mathematics

Babylonians used base 60. Regular numbers have finite base-60 representations (like decimals in base 10 for powers of 2 and 5). They computed reciprocal tables for regular numbers up to 60² on clay tablets.

Step-by-Step Instructions

  1. 1Enter number.
  2. 2Check regular.
  3. 3View exponents.
  4. 4Find next regular.
  5. 5Browse sequence.

Regular Number Checker — Frequently Asked Questions

Why are they called Hamming numbers?+

R.W. Hamming proposed the problem of generating the sequence in ascending order, a classic computer science exercise. Each term is 2×, 3×, or 5× a previous term. Dijkstra gave an elegant O(n) solution using three pointers.

Why 'ugly numbers' in coding interviews?+

LeetCode calls them 'ugly numbers' (factors only 2,3,5). The algorithm: maintain min-heap or three pointers. Generate n-th ugly number efficiently. It's a classic DP/merge problem testing algorithmic thinking.

Connection to Babylonian math?+

Babylonians used sexagesimal (base 60=2²·3·5). Only regular numbers have terminating reciprocals in base 60, just as only numbers of form 2^a·5^b terminate in base 10. They compiled tables of reciprocals of regular numbers for division.

Share this tool: