This problem did not occur when the car was taken for a test drive and when it was picked up after purchase. The engine runs fine once it has started.
Any ideas what might be the problem? I have a warranty with the car but I don't know much use this will be.