OFFSET
1,1
COMMENTS
The smallest previously unused prime consistent with the definition is used at each step. - Franklin T. Adams-Watters, Oct 09 2006
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
5-2 = 3 is prime, (5-2)+ (5-3) = 5 is a prime,(5-2)+(5-3)+(11-3) = 13 is a prime.
MAPLE
N:= 10000: # to use primes up to N
A[1]:= 2:
P:= select(isprime, [seq(i, i=3..N, 2)]):
s:= 0:
for n from 2 do
for i from 1 to nops(P) do
if isprime(s + abs(P[i]-A[n-1])) then
s:= s+abs(P[i]-A[n-1]);
A[n]:= P[i];
P:= subsop(i=NULL, P);
break
fi
od;
if not assigned(A[n]) then break fi;
od:
seq(A[i], i=1..n-1); # Robert Israel, Sep 16 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, May 24 2004
EXTENSIONS
Corrected and extended by Franklin T. Adams-Watters, Oct 09 2006
STATUS
approved