Can we modify any hash function like SHA-1 or MD5 to perform multiple iterations at once to gain calculation speed? Is it mathematically possible to adapt a given hash function (f.e. SHA-1 or MD5) so it performs a known number of iterations at once?

Concrete example would be:

data = SHA1_10000(data)


instead of:

for (i = 0; i &lt; 10000; i++) data = SHA1(data)


while resulting in the same output, but being 10000 times faster.
If you would find something like this, it would probably even point to a weakness in the hash function.

Impossiblity in the random oracle model. Hash functions are often assumed to behave like random oracles (i.e., for every new query they return a uniformly random value, while answering consistently for repeated queries). For a random oracle, the output is not defined before querying the random oracle at the input - so in this model it should be relatively easy to argue that it is impossible to find what you are asking for.