Post History
SageMath, 68 66 64 Byte. 62 if you don't count the m= g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1 Returns False for borromean coprimes and True for all other natural ...
Answer
#11: Post edited
- ### SageMath, <strike>68</strike> <strike>66</strike> 64 Byte. 62 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of all pairs. It is shorter than comparing each to `1` or `2`. When 1 pairs `gcd` is 1, the minimal value is also 1 and it isn't a borromean coprime. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
Alternativ version:```g=gcd;m(a,b,c)=(min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1)```However, this returns a `symbolic_expression` and only converts to `"True"` or `"False"` when it is printed or converted to a string.- There is probably a much shorter solution.
- You can test it here: https://sagecell.sagemath.org/ But you have to copy-paste the code.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- ### SageMath, <strike>68</strike> <strike>66</strike> 64 Byte. 62 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of all pairs. It is shorter than comparing each to `1` or `2`. When 1 pairs `gcd` is 1, the minimal value is also 1 and it isn't a borromean coprime. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- You can test it here: https://sagecell.sagemath.org/ But you have to copy-paste the code.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
#10: Post edited
### SageMath, <strike>58 Byte 56 Byte</strike> 54 Byte. 52 if you don't count the `m=`- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of all pairs. It is shorter than comparing each to `1` or `2`. When 1 pairs `gcd` is 1, the minimal value is also 1 and it isn't a borromean coprime. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- You can test it here: https://sagecell.sagemath.org/ But you have to copy-paste the code.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- ### SageMath, <strike>68</strike> <strike>66</strike> 64 Byte. 62 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of all pairs. It is shorter than comparing each to `1` or `2`. When 1 pairs `gcd` is 1, the minimal value is also 1 and it isn't a borromean coprime. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- Alternativ version:
- ```
- g=gcd;m(a,b,c)=(min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1)
- ```
- However, this returns a `symbolic_expression` and only converts to `"True"` or `"False"` when it is printed or converted to a string.
- There is probably a much shorter solution.
- You can test it here: https://sagecell.sagemath.org/ But you have to copy-paste the code.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
#9: Post edited
- ### SageMath, <strike>58 Byte 56 Byte</strike> 54 Byte. 52 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of all pairs. It is shorter than comparing each to `1` or `2`. When 1 pairs `gcd` is 1, the minimal value is also 1 and it isn't a borromean coprime. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- ### SageMath, <strike>58 Byte 56 Byte</strike> 54 Byte. 52 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of all pairs. It is shorter than comparing each to `1` or `2`. When 1 pairs `gcd` is 1, the minimal value is also 1 and it isn't a borromean coprime. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- You can test it here: https://sagecell.sagemath.org/ But you have to copy-paste the code.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
#8: Post edited
- ### SageMath, <strike>58 Byte 56 Byte</strike> 54 Byte. 52 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
Returns `False` for Borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.- There is probably a much shorter solution.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- ### SageMath, <strike>58 Byte 56 Byte</strike> 54 Byte. 52 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of all pairs. It is shorter than comparing each to `1` or `2`. When 1 pairs `gcd` is 1, the minimal value is also 1 and it isn't a borromean coprime. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
#7: Post edited
- ### SageMath, <strike>58 Byte 56 Byte</strike> 54 Byte. 52 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
Returns `False` for Borromean coprimes and `True` for all other numbers. Use it like this `m(6,10,15)`.- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- ### SageMath, <strike>58 Byte 56 Byte</strike> 54 Byte. 52 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for Borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
#6: Post edited
### SageMath, <strike>58 Byte</strike> 56 Byte. 54 if you don't count the `m=`- ```
g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)- ```
Returns `True` for Borromean coprimes and `False` for all other numbers. Use it like this `m(6,10,15)`.- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
#### Old version:- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
It was longer and mixed `True` and `False`
- ### SageMath, <strike>58 Byte 56 Byte</strike> 54 Byte. 52 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))<2or g(g(b,c),a)>1
- ```
- Returns `False` for Borromean coprimes and `True` for all other numbers. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- #### Older version:
- Didn't mix `True` and `False`:
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
#5: Post edited
- ### SageMath, <strike>58 Byte</strike> 56 Byte. 54 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
Returns `False` for Borromean coprimes and `True` for all other numbers. Use it like this `m(6,10,15)`.- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- #### Old version:
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
````
- ### SageMath, <strike>58 Byte</strike> 56 Byte. 54 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- Returns `True` for Borromean coprimes and `False` for all other numbers. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- #### Old version:
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- It was longer and mixed `True` and `False`
#4: Post edited
### SageMath, 58 Byte- ```
m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)- ```
- Returns `False` for Borromean coprimes and `True` for all other numbers. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
There is probably a much shorter solution.
- ### SageMath, <strike>58 Byte</strike> 56 Byte. 54 if you don't count the `m=`
- ```
- g=gcd;m=lambda a,b,c:(min(g(a,b),g(a,c),g(b,c))>1)&(g(g(b,c),a)<2)
- ```
- Returns `False` for Borromean coprimes and `True` for all other numbers. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
- #### Old version:
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ````
#3: Post edited
- ### SageMath, 58 Byte
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- Returns `False` for Borromean coprimes and `True` for all other numbers. Use it like this `m(6,10,15)`.
Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so i had to nest 2 `gcd` calls to test if the total gcd is 1.- There is probably a much shorter solution.
- ### SageMath, 58 Byte
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- Returns `False` for Borromean coprimes and `True` for all other numbers. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so 2 nested `gcd` calls are need to test if the total gcd is 1.
- There is probably a much shorter solution.
#2: Post edited
- ### SageMath, 58 Byte
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
Returns `False` for Borromean coprimes and `True` for all other numbers. Us it like this `m(6,10,15)`.Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so i had to use nest 2 `gcd` calls to test if the total gcd is 1.- There is probably a much shorter solution.
- ### SageMath, 58 Byte
- ```
- m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1)
- ```
- Returns `False` for Borromean coprimes and `True` for all other numbers. Use it like this `m(6,10,15)`.
- Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so i had to nest 2 `gcd` calls to test if the total gcd is 1.
- There is probably a much shorter solution.
#1: Initial revision
### SageMath, 58 Byte ``` m=lambda a,b,c:min(gcd(a,b),gcd(a,c),gcd(b,c))<2|(gcd(gcd(b,c),a)>1) ``` Returns `False` for Borromean coprimes and `True` for all other numbers. Us it like this `m(6,10,15)`. Using `min` to get the lowest `gcd` of each pair. It is shorter than comparing each to `1` or `2`. Sadly, SageMath `gcd()` doesn't support more than 2 arguments, unlike regular python, so i had to use nest 2 `gcd` calls to test if the total gcd is 1. There is probably a much shorter solution.