Couldn't you just make the 5 a base of 2? I dunno, but that's the first thing I thought of.
2^x=5
x log 2 = log 5
x = log5 / log2
2^(n^2) - 2^n = 2^(log5/log2)
And since the bases are the same..
n^2 - n = log5/log2 and solve?
2^x=5
x log 2 = log 5
x = log5 / log2
2^(n^2) - 2^n = 2^(log5/log2)
And since the bases are the same..
n^2 - n = log5/log2 and solve?

