MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Newbie wants to iterate over rationals

  • To: mathgroup at
  • Subject: [mg31066] Newbie wants to iterate over rationals
  • From: Bob Harris <nitlion at>
  • Date: Sat, 6 Oct 2001 03:32:54 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


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

  • Prev by Date: Re: convert .EPS to .GIF or .JPEG
  • Next by Date: Errorbars in BOTH directions
  • Previous by thread: Re: convert .EPS to .GIF or .JPEG
  • Next by thread: Errorbars in BOTH directions