These notes constitute a diminished fifth or an augmented fourth interval. It is also known as a tritone. The tritone is naturally dissonant and begs for resolution to a more stable, consonant note combination. It is the most common device in all music to bridge from one harmonic structure to another.
Mathematically, one note is tuned to the geometric mean of an octave. In this example, F# is located in the middle of two notes C played an octave apart. The upper C has a frequency of twice the lower C's frequency. This makes the frequency of F# the square root of 2 (about 1.414) times the frequency of the lower C, and upper C the square root of 2 times the frequency of F#. Odd that notes which are perfectly spaced out on the keyboard within an octave do not blend in a stable fashion. The graph indicates a more random pattern than, say, an interval of a fifth.
Click to hear this sound as played on a piano: C & F#