OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
P, C:= selectremove(isprime, [$2..100]):
np:= nops(P): nc:= nops(C):
ip:= 1: ic:= 0: t:= 2: R:= 2:
do
if isprime(t) then
ip:= ip+1;
if ip > np then break fi;
R:= R, P[ip];
t:= t + P[ip];
else
ic:= ic+1;
if ic > nc then break fi;
R:= R, C[ic];
t:= t + C[ic];
fi
od:
R; # Robert Israel, Oct 07 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 17 2002
EXTENSIONS
Corrected and extended by Sean A. Irvine, Nov 29 2009
Offset corrected by Robert Israel, Oct 09 2024
STATUS
approved