The Rule of Two is self-enforcing as much as anything. One Sith is too easy to kill, and then the Sith are extinct, and so the Sith are encouraged by their tradition to take an apprentice. Three or more Sith will fight and kill each other for dominance. One Master, one apprentice is thus a self-balancing system.
As for Vader's and Palpatine's view of Luke, note that Vader sees Luke as a potential "ally", while Palpatine views him as an "asset". This is in keeping with their personas from the prequel movies (yes I know those were written later) and other EU sources; Palpatine has played fast and loose with the Rule of Two for his own ends since before he killed his master, Darth Plagueis. He was training Maul before killing Plagueis, and had Tyrannus as an apprentice while luring Anakin (Anain's turning required a surprising amount of patience, considering how little of it Anakin himself had).
Vader, for his part, had many of his own apprentices in the EU, seen by Vader as near-equals instead of Palpatine's view of - well, basically everyone - as pawns. Vader's training of new Sith cannot have gone unnoticed by Palpatine; at least one notable example - Lumiya - was culled from Palpatine's own Emperor's Hand cadre. Vader also tells Luke:
Luke, you can destroy the Emperor. He has foreseen this. It is your destiny. Join me, and we can rule the galaxy as father and son!
Palpatine probably has a way out of that possible future, but if that statement was true and not just a tempting lie, then Palpatine did indeed foresee his own death. It just didn't come in exactly the way he may have seen.
Luke says it himself in RotJ: "Your overconfidence is your weakness"; for over 30 years, Palpatine has played with the galaxy and its factions like a chess game, and has, like a true grand master, seen hundreds of moves ahead and had an answer for every move, no matter how bad the move may have seemed, that placed him at an advantage to any opponent. With his elaborate checkmate of the Rebel Alliance in full swing, and the last real threat to his rule writhing in pain at his feet, he was reveling in his own genius. Everything was going his way...
Except that in his glee, he had ignored his trained dog, Vader. Palpatine was, in the first place, ready to discard him in favor of Luke, exactly as he'd done with Tyrannus. Not exactly endearing, and as Palpatine had pretty much condemned Vader mere seconds ago, he wasn't high on the Emperor's list of mental priorities. Second, Vader was watching Palpatine torture his own son to death. Everyone knows it doesn't matter how well-trained a mother dog is or how eagerly she obeys your commands; kick one of her puppies in front of her and you have a pretty angry momma dog on your hands, that will not sit, will not roll over, and will not stay. So it was with Vader and Luke; Vader saw the man, the Jedi, that he would never be in his own son, and something reawoke in him, pulling him back from Darkness to the Light to defend his son.