The TVTropes Trope Finder is where you can come to ask questions like "Do we have this one?" and "What's the trope about...?" Trying to rediscover a long lost show or other medium but need a little help? Head to Media Finder and try your luck there. Want to propose a new trope? You should be over at You Know, That Thing Where.
^ I thought about that one, but the Laconic describes the trope as "A character who is normally much more competent starts acting stupid in order to drive the plot forward." In this case, the character is made dumber for a gag that could be easily removed without affecting the rest of the story.
If it's part of a realization that they messed up a simple piece of a complex calculation (likely with some disastrous result), you're looking at E = MC Hammer overlapping with something in the neighborhood of Mismeasurement, Carry the One, and Misplaced a Decimal Point
Edited by Scorpion451Hum, I think Rule of Funny is the closest one. Thanks!
When a character's intelligence and/or maturity wildly oscillates within the same story arc.
For example, in Crash Twinsanity, Cortex is an evil genius who can create impressive machinery and has figured out how to travel between dimensions. However, a single cutscene has him expressing shock that 4 is lower than 6 for a quick joke.