This project is an algorithmic implementation in C designed to identify Refactorable Numbers (also known as TAU numbers) within the field of Number Theory.
A natural number
Formally, if
-
Number: 12
-
Divisors: 1, 2, 3, 4, 6, 12
-
Count of Divisors ($d(n)$): 6
-
Check:
$12 \div 6 = 2$ (Remainder 0) -> ✅ TAU Number -
Number: 15
-
Divisors: 1, 3, 5, 15
-
Count of Divisors ($d(n)$): 4
-
Check:
$15 \div 4 = 3.75$ (Remainder exists) -> ❌ Not a TAU Number
The algorithm follows a computational approach to factorization:
- Input Acquisition: Takes an integer input from the user.
-
Iteration & Factorization: Loops through all integers from 1 to
$n$ to identify factors. - Divisor Counting: Accumulates the total count of positive divisors.
-
Modular Validation: Applies the modulus operator (
%) to check if the original number is divisible by the divisor count. - Result Output: Displays detailed factorization steps and the final classification.
- Compile the code:
gcc tau_analyzer.c -o analyzer
- Run the program:
./analyzer
- Enter a number to verify its property.
This repository demonstrates the application of control structures (loops/conditionals) and arithmetic algorithms in C.