Index: sage/rings/rational_field.py
===================================================================
--- sage/rings/rational_field.py	(revision 2802)
+++ sage/rings/rational_field.py	(revision 3168)
@@ -176,13 +176,40 @@
 
     def __iter__(self):
-        yield self(0)
-        yield self(1)
-        yield self(-1)
-        from integer_ring import IntegerRing
-        for n in IntegerRing():
-            m = abs(n)
-            for d in abs(n).coprime_integers(m):
-                yield n/d
-                yield d/n
+        r"""
+        Creates an iterator that generates the rational numbers without
+        repetition. It uses the sequence defined by $a_0=0$ and
+        $a_{n+1}=\frac{1}{2\lfloor a_n\rfloor+1-a_n}$ and generates the
+        sequence $$a_0,a_1,-a_1,a_2,-a_2,\ldots$$
+
+        EXAMPLES:
+
+        This example creates a list consisting of the first 10 terms
+        generated by this function.
+
+            sage: import itertools
+            sage: [a for a in itertools.islice(Rationals(),10)]
+            [0, 1, -1, 1/2, -1/2, 2, -2, 1/3, -1/3, 3/2]
+
+        NOTES:
+            A proof of the correctness of this formula is attributed to
+            Sam Vandervelde and Don Zagier [A002487], but a better
+            reference for the origin of this formula would be welcome.
+
+            REFERENCES:
+                 [A002487] Sloane's OLEIS,
+                 http://www.research.att.com/~njas/sequences/A002487
+
+        AUTHORS:
+            - Nils Bruin (2007-02-20)
+        """
+
+        from sage.rings.arith import floor
+
+        n=self(0)
+        yield n
+        while True:
+          n=1/(2*floor(n)+1-n)
+          yield n
+          yield -n
 
     def complex_embedding(self, prec=53):
