  We study entanglement of a pair of qubits and the bipartite entanglement
between the pair and the rest within open-ended Heisenberg $XXX$ and XY models.
The open boundary condition leads to strong oscillations of entanglements with
a two-site period, and the two kinds of entanglements are 180 degree out of
phase with each other. The mean pairwise entanglement and ground-state energy
per site in the $XXX$ model are found to be proportional to each other. We
study the effects of a single bulk impurity on entanglement, and find that
there exists threshold values of the relative coupling strength between the
impurity and its nearest neighbours, after which the impurity becomes pairwise
entangled with its nearest neighbours.
