65 has two unique representations
65 = 5 · 13
Both primes are 1 modulo 4, so the theorem permits representations. In fact, 65 = 1² + 8² = 4² + 7². Each pair contributes eight ordered signed solutions, giving r₂(65) = 16.
Commas, spaces, or underscores may group digits in sets of three. Negative values and decimals are not valid because this tool searches integer squares.
For n = 325, select Find representations to get (1, 18), (6, 17), and (10, 15), plus the prime-factor test.
For a positive integer n, first write its prime factorization. A representation n = a² + b² exists exactly when every prime factor that is 3 modulo 4 has an even exponent.
n = 2e₀ · ∏ pᵢeᵢ · ∏ qⱼfⱼ
pᵢ ≡ 1 (mod 4), qⱼ ≡ 3 (mod 4)
n = a² + b² ⇔ every fⱼ is even
The power of 2 and the exponents on primes that are 1 modulo 4 do not block existence. The calculator shows each factor’s residue class and whether it passes the condition.
This calculator lists only pairs with 0 ≤ a ≤ b. That removes duplicates caused by swapping the two values or changing their signs.
For example, the unique pair (1, 2) represents the eight ordered signed pairs formed by choosing signs and swapping coordinates.
r₂(n) = 4 ∏(eᵢ + 1)
The product uses only exponents of primes pᵢ ≡ 1 (mod 4), provided every 3-mod-4 exponent is even.
A pair with one zero or with a = b contributes four ordered signed pairs; a pair with 0 < a < b contributes eight.
65 = 5 · 13
Both primes are 1 modulo 4, so the theorem permits representations. In fact, 65 = 1² + 8² = 4² + 7². Each pair contributes eight ordered signed solutions, giving r₂(65) = 16.
3 = 3¹
The prime 3 is congruent to 3 modulo 4 and has odd exponent 1. It fails the theorem condition, so no integers a and b can satisfy a² + b² = 3.
25 = 5² = 0² + 5² = 3² + 4²
The unique pairs are (0, 5) and (3, 4). Their symmetry contributions are four and eight, matching r₂(25) = 12.
45 = 3² · 5
The prime 3 occurs to the even exponent 2, so it does not block a representation. The unique pair is (3, 6), since 3² + 6² = 45.
A positive integer is a sum of two integer squares exactly when every prime congruent to 3 modulo 4 has an even exponent in its prime factorization. Zero is the special case 0² + 0².
No. The main list uses 0 ≤ a ≤ b, so (1, 8) and (8, 1) appear once as (1, 8). The ordered signed total counts both orders separately.
Yes. Every perfect square k² has the representation 0² + k². Zero itself has the single pair (0, 0).
For positive n that passes the theorem, multiply 4 by e + 1 for every exponent e belonging to a prime factor congruent to 1 modulo 4. This gives all ordered signed pairs, including swaps and zero coordinates.
Different lattice points can lie on the same circle x² + y² = n. For example, 65 has both (1, 8) and (4, 7).
Enter a whole number from 0 through 1,000,000,000,000. The upper limit keeps trial-division factorization and complete pair enumeration predictable on phones and desktop browsers.
Yes. The calculation runs entirely in your browser and does not upload, save, or add your number to the page URL.