Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can get the set of positive integers with PositiveIntegers:

sage: PP = PositiveIntegers(); PP
Positive integers
sage: PP.cardinality()
+Infinity
sage: iter(PP).next()
1

In addition for any given range of integers, you can use the IntegerRange class to get an objects representing them. In fact, PositiveIntegers is just a specialized subclass of IntegerRange.

sage: NN1 = IntegerRange(1, oo); NN1
{1, 2, ..}

What types of operations are looking to do with this set?