The number 42 is, famously, the answer to the question of life, the universe and everything in the Hitchhikers' Guide to the Galaxy.

But while the late author Douglas Adams always insisted he chose the number at random for his science fiction novel series, 42 has actually been perplexing mathematicians for decades.

Until now, it remained the last elusive link in a maths problem known as the Diophantian equation.

The question perplexing mathematicians was this: can you make all the numbers up to 100 from the sum of three cubes?

This is expressed, in mathematical notation, as k = x(cubed) + y(cubed) + z(cubed).

Named after Diophantes, the Greek father of Algebra, the original problem was set in 1954 at Cambridge University.

Some numbers are easy – for example, the number 29 can be written as 3³ + 1³ + 1³ (27 + 1 + 1). Others, for instance 4, 5, 13 and 14, have been proven to have no solution.

But 42 had remained elusive, with neither a solution nor proof that it has no solution.

Now a team led by the University of Bristol and Massachusetts Institute of Technology (MIT) have cracked it.

Professor Andrew Booker enlisted the help of MIT maths professor Andrew Sutherland, and they used Charity Engine – which uses power from more than 500,000 home computers while they are lying idle.

The answer, which took over a million hours of calculating to prove, is as follows: X = -80538738812075974, Y = 80435758145817515 and Z = 12602123297335631.

Professor Booker of the University of Bristol said: "I feel relieved. In this game it's impossible to be sure that you'll find something.