|
|
A091652
|
|
A stable set of primes created by a greedy algorithm.
|
|
3
|
|
|
3, 7, 13, 23, 31, 37, 43, 47, 53, 61, 67, 73, 79, 83, 89, 97, 113, 127, 139, 151, 157, 167, 181, 193, 199, 211, 223, 227, 233, 241, 251, 263, 271, 277, 293, 317, 337, 349, 359, 367, 373, 379, 389, 401, 409, 421, 433, 439, 443, 449, 457, 467, 479, 491, 503, 523
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The Greenfields show that the integers from 1 to 2n can always be paired to form n (not necessarily distinct) primes. A greedy algorithm, starting with 2n, quickly finds the n primes. Interestingly, as n increases, the set of primes produced by this algorithm forms a stable set of prime numbers. Why?
|
|
LINKS
|
|
|
EXAMPLE
|
When the greedy algorithm pairs the numbers 1 to 20, it finds the following 10 primes: 37=20+17, 37=19+18, 31=16+15, 23=14+9, 23=13+10, 23=12+11, 13=8+5, 13=7+6, 7=4+3 and 3=2+1.
|
|
MATHEMATICA
|
n=1000; lst=Reverse[Range[2n]]; prms={}; Do[m=lst[[1]]; lst=Delete[lst, 1]; pos=1; While[Not[PrimeQ[m+lst[[pos]]]], pos++ ]; prms=Union[prms, {m+lst[[pos]]}]; lst=Delete[lst, pos], {i, n}]; prms
|
|
CROSSREFS
|
Cf. A091653 (complement of these primes), A091654 (frequency of these primes).
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|