Question: How to test if all elements of a list or a set are primes?

Hi

I want to count in a list L with many sublists the number of sublists, that contain m elements and only primes. How can I do that?

Example:

L:=[[2,3,5,7],[7,13,29],[2,3,4],[5,31,53]], m=3

The result should be 2, because only [7,13,29] and [5,31,53] satiesfy both criteria.

Thank you for an answer!

Please Wait...