1 | initial version |

Nice homework!

```
sage: J = [1..50]
sage: Set( [ bool( ZZ.ideal( [a,b] ) == ZZ.ideal( gcd(a,b) ) ) for a in J for b in J ] )
{True}
```

means that for two integers $a,b$ in the rather small interval of integers $J$ from $1$ to $50$ we have the equality of the ideals which are generated by:

- $a$ and $b$ (two generators),
- respectively by their gcd (one generator).

*New homework:*

What is telling us the following?

```
sage: Set( [ bool( ZZ.ideal( [a,b,c] ) == ZZ.ideal( gcd([a,b,c]) ) ) for a in J for b in J for c in J ] )
{True}
```

*Bonus:*

What is telling us the following?

```
sage: C = cartesian_product( [ range(100, 120) for _ in range(4) ] )
sage: C.random_element()
(114, 119, 111, 106)
sage: Set( [ bool( ZZ.ideal(list(c)) == ZZ.ideal( gcd(list(c)) ) ) for c in C ] )
{True}
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.