How to develop a good key change depends largely on what key you are transitioning to and from. As a mathematically-oriented person, you can probably find logic in the notion that you want to transition over chord progressions that are shared between both keys, preferably leading to the dominant of the new key (V) and then resolving to the tonic of the new key. This is one of various techniques for implementing a key change, but the most reliable.
If you can work in the subdominant of the new key as well, all the better, as in this classic example by The Beach Boys, "Don't Worry Baby," which transitions up a whole step from E to F# using a progression that is a very simple to understand and useful example:
The main progression is:
E: I - IV - V - I
Well, it's been building up in side of me for, oh, I don't know how long...
To transition to the new key, the song uses ii - V in the original key followed by "ii - V" in the new key, before resolving to the tonic of the new key.
ii - V
but she looks in my eyes
iii(F#: ii/I) - VI(F#: V/I)
and makes me realize (when she says)
F#: I - IV - V - I
F#: Don't worry baby
Note that the transition involves setting up a chord progression that resolves to the tonic of the new key by transitioning to the chords relative to the new key, but with some overlap with the old key (iii in E, ii (subdominant) in F#).