Mathematical problems and number theory algorithms.
- Prime numbers and factorization
- GCD and LCM
- Modular arithmetic
- Power function
- Divisors and factors
- Perfect numbers and squares
- Armstrong numbers
- Modular exponentiation
- Arithmetic progressions
- Expression evaluation
- prime_number - Check if number is prime
- pn_primesum - Prime number sum
- pn_distinctprimes - Distinct prime factors
- pn_lucky_numbers - Lucky numbers
- gcdof2Num - GCD of two numbers
- GCD_Deleteone - GCD after deleting one element
- Countofdivisors - Count divisors of a number
- pn_cnt_divs - Count divisors
- factor - Find factors
- ma_a_b_modulo - (a^b) % m
- ma_divisible_eight - Divisibility by 8
- ma_exceltitle - Excel column title
- ModString - Modular string operations
- ImplementPowerFunction - Implement power function
- factorial - Factorial calculation
- DivideIntegers - Divide two integers without division operator
- perfect_num - Check perfect number
- perfect_square - Check perfect square
- PerfectNumbersQueue - Perfect numbers using queue
- armstrong_num - Armstrong number check
- Ismagic - Check magic number
- SmallestXOR - Smallest XOR
- SumofDigits - Sum of digits
- isAlphaNum - Check alphanumeric
- DifferentBitsSumPairwise - Sum of different bits in all pairs
- ArithematicProgressionFeasibility - Check if AP is feasible
- EvaluateExpression - Evaluate mathematical expression
- Master modular arithmetic—it appears everywhere
- (a * b) % m = ((a % m) * (b % m)) % m
- For modular inverse: use Fermat's theorem when m is prime
- Prime factorization in O(√n)
- Sieve modifications for advanced problems