The 8 Sherman came from US military aid program.
According to Danish Army vehicle homepage:
When entering NATO in 1949, Denmark qualified to be part of the MDAP. As founded by the United States, Denmark had three options in tanks: M4A3 Sherman, M47 and M48. Denmark had the M48 in favour, but because of not being the most important recipient, United States wanted Denmark to have the Sherman.
These different point of views led to deliverance of 8 Sherman's in April 1952, officially for training, but the United States had made their point clear. Denmark then asked for the M47, but as the month went on, it became clear the countries like Korea, Italy and France was in a greater need.
Suddenly the United States offered the British Centurion Mk III instead, an offer that was accepted.
According to the serial numbers all 8 Sherman's were built as M4A3(105)VVSS, but later converted with a 75 mm turret which had it's M3 gun replaced with a M1A1 76.2 mm gun