Hiccups or erratic engine operation at certain RPMs can be caused by problems with the ignition system or fuel system. Ignition misfire or erratic fuel delivery can cause unstable engine operation. Additionally, if the fuel injectors are contaminated or damaged, this can lead to erratic fuel delivery to the engine, affecting engine operation at certain rpm. I would also consider damage to the exhaust system, such as leaks, holes or damage to the muffler, can affect engine performance under certain conditions, including at certain rpm, or damaged or malfunctioning sensors, such as the crankshaft position sensor (CKP) or throttle pedal position sensor (TPS), can affect engine performance under certain conditions.