Task

Considering in order of length, n, all sequences of consecutive
primes, p, from 2 onwards, where p < 1000 and n>0, select those
sequences whose sum is prime, and for these display the length of the
sequence, the last item in the sequence, and the sum.




function sp(integer n) return is_prime(sum(get_primes(-n))) end function
sequence res = apply(filter(tagset(length(get_primes_le(1000))),sp),sprint)
printf(1,"Found %d of em: %s\n",{length(res),join(shorten(res,"",5),", ")})
