Yes. "Rail-to Rail" is always a lie. Those saturation characteristics graphs are one of the most important parts of the data sheet for a part like this. For a high impedance load you should be able to get within <0.1V or so if you're careful (i.e. don't make it source much current).Well, here it is with the LT1635. I could not get to 5V because of the limitations of the op amp I believe. I had to add the capacitor also. I tweaked the resistors further but I think it is not in the spirit of the exercise. Looking at the literature, this class of op amps has a lot of sophisticated uses and using it for a simple problem such as this I think is overkill. Still, it's fun to try.
Also, I'm working on a completely different approach so please don't spill the beans just yet.
View attachment 286620
View attachment 286622
I'm not sure the exercise wants it to get to 5V. That would be the peak voltage for lots of harmonics, but with only 4 I think the top will be rounded off below that.
That cap isn't necessary if you choose the right resistor values. You seem to have missed the point about using a part with a built in reference to make the offset. The circuit below does this job with a single power supply, 1 IC and 7 resistors (although in the real world, I'd add a couple of caps too).