OFFSET
0,1
EXAMPLE
a(3) = 6 not 4 as 2 + 9 + 6 = 17 is prime, while 2+9 +4 = 15 is composite.
MAPLE
a[1] := 2:for i from 2 to 120 do j := 2:while(true)do j := j+1: if((not isprime(j)) and (not (j=a[i-1]))) then bo := true: for h from 1 to i-1 do if(a[h]=j) then bo := false end if:end do: if(isprime(sum(a[k], k=1..i-1)+j) and bo=true) then a[i] := j:break:end if:end if:end do:end do:seq(a[k], k=1..120);
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Feb 26 2002
EXTENSIONS
Corrected and extended by Sascha Kurz, Mar 26 2002
STATUS
approved