Before transpositions and such, it works, effectively, like this:
$$P(n)=\begin{cases}A&n\equiv9\mod12\\A\sharp&n\equiv10\mod12\\B&n\equiv11\mod12\\C&n\equiv0\mod12\\C\sharp&n\equiv1\mod12\\D&n\equiv2\mod12\\D\sharp&n\equiv3\mod12\\E&n\equiv4\mod12\\F&n\equiv5\mod12\\F\sharp&n\equiv6\mod12\\G&n\equiv7\mod12\\G\sharp&n\equiv8\mod12\end{cases}$$
$$O(n)=\left\lfloor\frac{n}{12}\right\rfloor$$
Where $P$ is the note name and $O$ is the octave number.
EDIT:
In western music, there are 8 "notes" per octave (though there are 12 actual tones). The notes in one octave are obtained from the previous octave by doubling the frequency. For example, $A4$ has a frequency of $440$ Hz, so $A3$ is $220$ Hz and $A5$ is $880$ Hz. The notes in a single octave are related by specific ratios of frequencies that are dependent on a few factors which can be read about here.
Transposition, in music, is the act of moving the notes of a song up or down based on the needs of key, instrument, and a number of other factors. For example, if you wanted to transpose $A4$ up 6 tones, you would get $D\sharp5$ (since the octave starts, traditionally, at $C$ and has period $12$).
So, the method by which OEIS does its "Listen to this Sequence" stuff works, more finely, like this:
- Add to the terms of the sequence the amount being transposed.
- Store the adjusted terms as hexadecimal values suitable for MIDI
- Write the notes (with start and stop instructions and other relevant data) as hexadecimal values to a MIDI file.
- (USER) Open MIDI file in appropriate player.
- (Player) Interpret hexadecimal values for terms from sequence as $P(n)$ and $O(n)$ from above.
- (Player) Use instrument base tone (varies by MIDI device) as a starting point.
- (Player) Adjust base tone to octave by doubling (or halving).
- (Player) Adjust octave tone to pitch by appropriate ratio.
For a list of Western music note frequencies, see here. Of course, it is cheaper on memory to just store the base frequency of $A4\rightarrow440$ and adjust from there.