Hi, > Q2. How can I define the set of all primes up to some limit N but > excluding 2 and multiples of some number D? Try this:
sage: N=100 sage: D=5 sage: [i for i in primes(3,N+1) if not i.divides(D)] [3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] Greeting, Phil -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org