Cut off and discard core from pineapple quarters, then cut each quarter lengthwise into 5 pieces. Heat 1/2 tablespoon butter in a 12-inch heavy skillet over moderate heat until just melted, then add walnuts and cook, stirring, until a shade darker, about 2 minutes. Transfer walnuts with a slotted spoon to paper towels to drain and wipe skillet clean. Heat 1 tablespoon butter in skillet over moderately high heat until foam subsides, then saute one third of pineapple, turning over occasionally, until golden, 4 to 5 minutes. Transfer to a platter. Saute remaining pineapple in 2 batches in same manner, using 1 tablespoon butter per batch and transferring to platter. While last batch of pineapple cooks, heat sugar, rum, and remaining 2 tablespoons butter in a small heavy saucepan over moderately low heat, stirring, until sugar is dissolved, about 2 minutes. Remove from heat. Serve pineapple with sauce spooned on top and sprinkled with walnuts.