User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Accepts integers from −9,007,199,254,740,991 to 9,007,199,254,740,991
Try:
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Misidentifying a number's properties leads to downstream errors in cryptography key selection, hash table sizing, and combinatorial proofs. This tool computes over 30 attributes of any integer: prime factorization, the complete divisor set, aliquot sum classification (perfect, abundant, or deficient), digit-level statistics including digital root and digit frequency, membership tests for sequences like Fibonacci and triangular numbers, and base representations in binary, octal, and hexadecimal. It also generates the full Collatz sequence for n and visualizes its trajectory. All computations run client-side with no server dependency.

The tool handles integers up to approximately 9 ร— 1015 with exact arithmetic via JavaScript's BigInt. Primality testing uses trial division up to โˆšn for moderate values and falls back to a deterministic Miller-Rabin variant for larger inputs. Note: factorization of semiprimes above 1012 may take several seconds. Roman numeral output is limited to n โ‰ค 3,999,999. Pro tip: use the divisor count to verify Euler's totient calculations, or check the digital root as a fast casting-out-nines sanity check on arithmetic results.

number analysis prime factorization number properties divisors digit sum number theory integer analysis math tool

Formulas

The primary factorization algorithm decomposes an integer n into its unique prime factors by trial division with a 6k ยฑ 1 wheel optimization, testing candidates up to โˆšn:

n = kโˆi=1 piai

where each pi is a distinct prime and ai โ‰ฅ 1 is its multiplicity.

The divisor count ฯ„(n) and divisor sum ฯƒ(n) are derived from the factorization:

ฯ„(n) = kโˆi=1 (ai + 1)
ฯƒ(n) = kโˆi=1 piai+1 โˆ’ 1pi โˆ’ 1

Euler's totient function counts integers from 1 to n that are coprime to n:

ฯ†(n) = n kโˆi=1 (1 โˆ’ 1pi)

The digital root is computed without iteration using modular arithmetic:

dr(n) =
{
0 if n = 09 if n mod 9 = 0n mod 9 otherwise

The Collatz conjecture iterates:

ni+1 =
{
ni2 if ni is even3ni + 1 if ni is odd

Where n = input integer, pi = i-th prime factor, ai = exponent of pi, ฯ„ = divisor count function, ฯƒ = divisor sum function, ฯ† = Euler's totient, dr = digital root.

Reference Data

PropertyDefinitionExampleFormula / Test
PrimeDivisible only by 1 and itself29No divisor in 2..โˆšn
CompositeHas divisors other than 1 and n28ยฌ prime โˆง n > 1
Perfect NumberEquals sum of proper divisors28 = 1+2+4+7+14ฯƒ(n) โˆ’ n = n
AbundantSum of proper divisors exceeds n12: 1+2+3+4+6 = 16ฯƒ(n) โˆ’ n > n
DeficientSum of proper divisors less than n8: 1+2+4 = 7ฯƒ(n) โˆ’ n < n
TriangularSum of first k naturals21 = 1+2+โ€ฆ+68n + 1 is a perfect square
FibonacciMember of the Fibonacci sequence135n2 ยฑ 4 is a perfect square
PalindromeReads the same forwards and backwards12321String reversal equality
ArmstrongSum of digitsk equals n (k = digit count)153 = 13+53+33โˆ‘ dik = n
HarshadDivisible by its digit sum18 รท 9 = 2n mod S(n) = 0
Happy NumberIterating sum of squared digits reaches 119 โ†’ 82 โ†’ โ€ฆ โ†’ 1Cycle detection (Floyd's)
Perfect Squareโˆšn is an integer144 = 122floor(โˆšn)2 = n
Perfect CubeCube root of n is an integer125 = 53round(n1/3)3 = n
Even / OddDivisibility by 242 (even)n mod 2
Digital RootIterative digit sum until single digit493 โ†’ 16 โ†’ 71 + (n โˆ’ 1) mod 9
Digit SumSum of all digits493 โ†’ 16โˆ‘ di
Euler's TotientCount of integers โ‰ค n coprime to nฯ†(12) = 4n โˆ (1 โˆ’ 1p)
Collatz LengthSteps to reach 1 via Collatz rule27 โ†’ 111 stepsIterative: if even n/2, else 3n+1
Roman NumeralStandard Roman representation2024 โ†’ MMXXIVSubtractive notation, vinculum for >3999
BinaryBase-2 representation42 โ†’ 101010n.toString(2)
OctalBase-8 representation42 โ†’ 52n.toString(8)
HexadecimalBase-16 representation255 โ†’ FFn.toString(16)

Frequently Asked Questions

Negative integers are accepted. The tool computes the absolute value for factorization, divisor analysis, and base conversions, while preserving the sign for display. Properties like "even/odd" apply to the signed value. Prime testing requires positive integers greater than 1, so negative inputs are classified as "not prime" per standard convention.
The tool handles integers up to approximately 9 ร— 1015 (the Number.MAX_SAFE_INTEGER boundary). Prime factorization uses trial division up to โˆšn, so a semiprime near 1015 requires testing up to ~31.6 million candidates, which may take 2 - 5 seconds. The computation runs in a Web Worker to keep the UI responsive.
The digit sum adds all digits once: for 493, it is 4 + 9 + 3 = 16. The digital root repeats this process until a single digit remains: 16 โ†’ 1 + 6 = 7. The shortcut formula is 1 + (n โˆ’ 1) mod 9, which is equivalent to repeated digit summation and is used as a casting-out-nines check in manual arithmetic.
A positive integer n is a Fibonacci number if and only if at least one of 5n2 + 4 or 5n2 โˆ’ 4 is a perfect square. This is the Gessel-Rao identity. It runs in constant time regardless of how large n is, making it far more efficient than iterating through the sequence.
The abundance is ฯƒ(n) โˆ’ 2n. A negative value means deficient (most integers), zero means perfect (only 51 known as of 2024), and positive means abundant. Highly abundant numbers appear frequently in combinatorics and are preferred for hash table sizes because their large divisor count distributes keys more evenly.
The Collatz conjecture (also called the 3n + 1 problem) remains unproven as of 2024. It has been verified computationally for all integers up to approximately 2.95 ร— 1020. This tool caps the iteration at 10,000 steps. If the sequence has not reached 1 by then, it reports the count as "> 10,000" with a note.