A Certain Tune is a tune that is often hummed by characters in the Toaru Majutsu no Index and Toaru Kagaku no Railgun anime.
It is in 4/4 time and is often sung in light and comedic situations. It is often sung in a low pitch, although, a higher pitched version is not unheard of.
Variations of how it hummed are often present depending on the character, such as Mikoto singing in a higher pitch.
Toaru Majutsu no Index
Much later, the tune is once again hummed by both Aogami Pierce and Tsukuyomi Komoe during the cold opening of the first episode of Toaru Majutsu no Index II. Later in the season, both Index and Orsola Aquinas hum it at the same time during the scene where Touma is forced to decide which door is the one that doesn't have either of them taking a bath that would lead to some hijinks. The tune is once again heard during Index and Accelerator's short ride with Orson, as Index reads a perverted version of the Ugly Duckling.
Toaru Kagaku no Railgun
Misaka Mikoto hums this in the very first scene of the episode with a different pitch. Later in the season, Touma hums the tune in the post-credits scene just before he meets Mikoto near a certain vending machine.