Blum Integer Calculator
Check whether n is a product of two distinct primes that are both three modulo four.
What it does
A Blum integer is a semiprime whose two distinct prime factors are both congruent to three modulo four. The sequence begins 21, 33, 57, 69 and 77. The first example, 21, is three times seven, and both primes leave remainder three when divided by four.
These numbers are named after Manuel Blum, who used them in cryptographic constructions. Their special residue property makes certain square root computations hard in a well defined way, which is useful for protocol design.
The test factors the input, checks that there are exactly two distinct primes each to the first power, and then examines each prime modulo four. The residues are printed so the verdict is easy to confirm.
The input limit is one million, which keeps factoring immediate. All computations are exact integer operations.
The tool returns a readable error for values outside the allowed range.
How to use
- Enter a whole number n from 2 to 1,000,000.
- Read the classification in the main result box.
- Check the factorization beside it.
- Read the residues of the primes modulo four.
- The default n = 21 reproduces the worked example.
- Try n = 33 to confirm another Blum integer.
Formula
- n
- The integer being tested.
- p, q
- The two distinct prime factors.
- mod 4
- The residue condition on each prime.
Both primes must be distinct and appear to the first power, so a Blum integer is always a squarefree semiprime. The product of two primes that are three modulo four is one modulo four, which is a useful quick check.
Worked example
Example: n = 21
The page opens with n = 21.
- Factor 21 as 3 x 7.
- Check that both primes are distinct and to the first power.
- Compute residues: 3 modulo 4 is 3, and 7 modulo 4 is 3.
- Both primes satisfy the condition.
- The tool reports factorization 3 x 7, residues 3 and 3, and Blum integer.
- For 33 the factors are 3 and 11, both three modulo four.
Reference table
| n | Factorization | Residues | Blum integer |
|---|---|---|---|
| 15 | 3 x 5 | 3, 1 | No |
| 21 | 3 x 7 | 3, 3 | Yes |
| 33 | 3 x 11 | 3, 3 | Yes |
| 35 | 5 x 7 | 1, 3 | No |
| 49 | 7^2 | 3 only | No |
Limits
- Inputs above 1,000,000 are rejected to keep factoring quick.
- The two primes must be distinct, so prime squares fail.
- The tool tests one integer at a time.
- Factorization limits the upper bound.
Common mistakes
- Allowing the two primes to be equal.
- Accepting a prime that is one modulo four.
- Using a number with three prime factors.
- Assuming every semiprime is a Blum integer.
- Forgetting that the product is one modulo four.
Try it yourself
Quick checks. Answers sit tucked under each question.
Is 21 a Blum integer?
Yes, because 3 and 7 are distinct primes and both are 3 modulo 4.
Is 15 a Blum integer?
No, because 5 is 1 modulo 4.
Is 49 a Blum integer?
No, because the two primes are equal.
Questions
Who are Blum integers named after?
They are named after Manuel Blum.
Why are they useful?
Their residue property supports certain cryptographic constructions.
What is the product modulo four?
It is always one modulo four.
Can a prime square be a Blum integer?
No, the primes must be distinct.
Are results exact?
Yes, factorization and residues use integers.
What input range is accepted?
Whole numbers from 2 through 1,000,000.