Newbie wants to iterate over rationals
- To: mathgroup at smc.vnet.net
- Subject: [mg31066] Newbie wants to iterate over rationals
- From: Bob Harris <nitlion at mindspring.com>
- Date: Sat, 6 Oct 2001 03:32:54 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Howdy, I'm a newbie/occasional user of Mathematica. I have a problem that involves searching over 'all' rationals for values that pass some test. I'd like to search the interval (0,1) by increasing denominator, at the same time checking the reciprocal, negative, and negative-reciprocal. Is there any function in Mathematica that given an integer n would prodcue a list of all integers in the range 1..n that are relatively prime to n? Or should I just use gcd == 1 as a test? Thanks for any help, Bob H Lawrenceville, GA