Mach No and altitude
The speed of sound (a) at any alitiude in air is given by:
a = sqrt(gamma*R*T), where:
a = true air speed in m/s
gamma = 1.4
R = gas constant fo air, usually taken to be 287 J/kg.K
T = temperature in Kelvin
Some useful conversions for you to use with the above:
1 kt = 0.51444 m/s
Temperature in kelvin = Temperature in deg C + 273.15
If you intend to maintain a constant Mach No as you climb, the TAS required to maintain that constant Mach No will DECREASE as you climb, because the outside air temperature is decreasing as you gain altitude.
If you maintain constant TAS as you climb, the Mach No will slowly increase because the speed of sound is decreasing (due to the temperature decreasing). As a guide, Mach 1 at ISA Sea Level is 340.29 m/s (661 kt), reducing to 295 m/s (573 kt) at the tropopause (36,089ft in the ISA).