On a 3x7 gear 1990s Trek 800, the rear derailleur skips the second-smallest and second-largest cog, but goes into the smallest and largest ones. How to fix this? Shifting towards larger cogs, the derailleur puts the chain onto all cogs, but shifting away from the largest, both 1 and 2 on the indexed shifter keep the chain on the largest cog. Shifter 3 puts the chain on the third largest cog. Sometimes for smaller cogs the shifter number differs by 1 from the cog number (shifter 6 keeps it on 3rd smallest cog) but shifter 7 puts it on the smallest cog.
It may have been caused by my incompetent adjustment of cable tension after the derailleur started having difficulty going onto the largest cog.
Bike bought new, all original Shimano components, little used, kept in a garage. No rust. Haven't changed chain in decades but not much stretch (~1/16 inch per 12 inches).
Derailleur cable looks clean, no rust or dirt visible. No kinks or other visible problems. Rear derailleur pivots and hinges are moving freely. Pushing on each jockey wheel's edge moves the edge about 1mm. Not sure if that is too loose. No visible wear, unsurprisingly given the rest of the drivetrain is original and not that worn. Moving derailleur by hand or by cable pulling is easy - it goes into all the gears. As far as I can tell by eye, the derailleur is straight (both viewed from above and from behind). The 2-3 sections of the chain line up behind each other.
Looking for cheap or simple solutions first.