# connected sum of knots

Hi! I was trying to recursively construct connected sums of knots, but I seem to run in to some problems when connect summing a knot to itself more than two times:

B = BraidGroup(2)

trefoil = Knot(B([1,1,1]))

K = trefoil.connected_sum(trefoil)

L = K.connected_sum(trefoil)

This does not work:

`ValueError Traceback (most recent call last) ipython-input-1-7b977cf99468 in module() 2 trefoil = Knot(B([Integer(1),Integer(1),Integer(1)])) 3 K = trefoil.connected_sum(trefoil) --> 4 L = K.connected_sum(trefoil) /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/knots/knot.pyc in connected_sum(self, other) 294 return Knot(B(list(b1.Tietze()) 295 + [(abs(i) + b2s) * Integer(i).sign() for i in b2.Tietze()] --> 296 + [b1s])) 297 /home/sc_serv/sage/local/lib/python2.7/site-packages/sage/knots/knot.pyc in __init__(self, data, check) 104 if check: 105 if self.number_of_components() != 1: --> 106 raise ValueError("the input has more than 1 connected component") 107 108 def __repr__(self): ValueError: the input has more than 1 connected component`

Am I doing something wrong here? Thanks in advance!

Note that, calling

`t`

the trefoil knot and`tt`

its connected sum with itself, one gets different errors when trying the connected sum of`tt`

with`t`

, versus of`t`

with`tt`

. Indeed, defining:one attempt gives:

while the other attempt gives:

so it does not work either way? the result should be the same! anyway, it seems to have problems even when all knots are called in different ways, very weird!