|
|
A086498
|
|
Rearrangement of primes such that every (2n)-th partial sum is a prime. Every (2n+1)-st term is the smallest prime which has not been included earlier.
|
|
4
|
|
|
2, 3, 5, 7, 11, 13, 17, 31, 19, 23, 29, 37, 41, 43, 47, 61, 53, 67, 59, 73, 71, 97, 79, 83, 89, 103, 101, 109, 107, 127, 113, 151, 131, 139, 137, 163, 149, 199, 157, 173, 167, 181, 179, 271, 191, 229, 193, 257, 197, 277, 211, 239, 223, 263, 227, 313, 233, 241, 251
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MAPLE
|
N:= 100: # to get all terms before the first term > Prime(N).
Primes:= [seq(ithprime(i), i=2..N)]: nP:= N-1: S:= 2: R:= 2:
do
found:= false;
for j from 1 to nP do
if isprime(S+Primes[j]) then
R:= R, Primes[j];
S:= S + Primes[j];
Primes:= subsop(j=NULL, Primes);
nP:= nP-1;
found:= true;
break
fi
od;
if not found or nP = 0 then break fi;
R:= R, Primes[1];
S:= S + Primes[1];
Primes:= Primes[2..-1];
nP:= nP-1;
od:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|