You don't need to factor, if you know the nth prime you can easily find what value is at the nth position.
If you're clever about the way you write your syntax tree you can limit the primes to below 13 or so. Don't think there are many useful language constructs that consist of more than 5 or so terms (I think you can limit it to 3 if you encode lists as (list a (list b (list c nil))).
If you're clever about the way you write your syntax tree you can limit the primes to below 13 or so. Don't think there are many useful language constructs that consist of more than 5 or so terms (I think you can limit it to 3 if you encode lists as (list a (list b (list c nil))).