PrimePairs
The lesser prime of a pair , both prime -- selects the family (=twin, =cousin, =sexy, …), as a lazy indexed family.
PrimePairs(gap)the prime with also prime, an indexed collection of open infinitude for every .Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer<0..>) -> indexed_collection<integer> | combinatorics | always |
Details
- A lazy indexed collection for each ; whether there are infinitely many prime pairs at ANY fixed gap is open (the twin-prime conjecture generalises to every gap), so for every , not just .
- , , are TwinPrimes, CousinPrimes, SexyPrimes verbatim.
- unranks the -th match by scanning forward, testing primality of and -- .
- Membership goes through Element: is true ( both prime), is false ( is not).
Enumeration
Examples
1 more kept as data, checked against the oraclesAbout
| Examples | 1 |
|---|
See also: Count, At, Element, TwinPrimes, CousinPrimes, SexyPrimes