Both are isoelectronic with Ne; i.e., their outside shells are filled with eight electrons and all have the same number of electrons (that is the isoelectronic part).
the pendulum loses momentum and stops because of gravity and wind resistance. it does not violate the law of conservation of energy because it is not gaining any more momentum than what it had started with