Goldbach Partition Count
Count unordered prime pairs p≤q with p+q equal to an even n≥4, including equal-prime pairs, using a sieve limited to n≤1,000,000.
Description
A Goldbach partition writes an even integer as a sum of two primes.
A Goldbach partition writes an even integer as a sum of two primes. Counting unordered pairs means reversed orders count once, while equal-prime pairs remain valid.1
The tool returns count. The indexing and output conventions below determine how to read these values.
When to use Goldbach Partition Count
Use this for the following task: Count unordered prime pairs p≤q with p+q equal to an even n≥4, including equal-prime pairs, using a sieve limited to n≤1,000,000. Use the input and output conventions below to reproduce the intended mathematical quantity.
How to use Goldbach Partition Count and understand its results
- Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
- Enter n according to the field table, then run the tool.
- Read count. Use the stated units, indexing and interpretation of the numerical result.
- Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| n | Even integer at least four (sieve resource limit 1000000) | integer; minimum 4; maximum 1000000 | Required |
Require even n at least four, sieve primes through n and scan possible first primes only through the midpoint.
count = number of prime p≤n/2 for which n−p is prime The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| count | Unordered Goldbach partition count | integer |
{
"input": {
"n": 26
},
"output": {
"count": 3
}
} Limitations and assumptions
The integer is at most one million. This counts a supplied case and does not prove Goldbach’s conjecture for all even integers.
Use the declared integer bounds and string formats. Large exact outputs remain decimal strings; numerical approximations use ordinary floating-point arithmetic. A rejected input is different from a valid zero count or false membership flag.
Alternative or Complementary methods
Choose Prime Counting by the Sieve of Eratosthenes when you need its operation: Count primes at most n exactly with the sieve of Eratosthenes, excluding zero and one and limiting n to 1,000,000. Choose Twin Prime Pair Checker for the complementary operation: Check whether two nonnegative integers are prime and differ by two, accepting either order and limiting each candidate to 10¹² for trial division.
Background reference: OEIS A045917.
References
-
OEIS A045917 — OEIS Foundation
Similar or alternative tools
- Prime Counting by the Sieve of Eratosthenes
Count primes at most n exactly with the sieve of Eratosthenes, excluding zero and one and limiting n to 1,000,000.
- Twin Prime Pair Checker
Check whether two nonnegative integers are prime and differ by two, accepting either order and limiting each candidate to 10¹² for trial division.