I don't know if I have an odd question, or if this has been asked before (research has not provided me with an answer or question about this). But I have a large amount of summation I need to do, which would be fine if I didn't intend for this to be part of game, which needs to operate at a decent frame rate.
If I were to turn this equation into code, due to the size number may reach in my game this will quickly turn very computationally heavy, and wont function quickly for many users.
In this example below, a is the current amount the user owns, b is the target amount to reach after purchase, c is the cost of the items, making $c_t$ the total cost, and finally beta is the base cost of the items (the price when a = 0)
For example, if a user owns 3 items, and wants to purchase 2 more, their target total would then be 3+2 = 5. The cost for these items due to a scaling price would be 4^4 + 5^5 or a total cost of 3381. Express mathematically, the equation is: $$\sum_{x=a}^b{{\beta}x^x}=c_{a+(a+1)...b}=c_t$$
Re-arranging for the part I actually care about and need to approximate (Beta is static, it never changes once set, so I believe it should be able to be moved around):
$$\sum_{x=a}^b{x^x}=c_{a+(a+1)...b}/{\beta}=c_t/\beta$$
Is it possible to write this summation (or very closely approximate it) in a method that uses less repeated actions, as I intend to use this for a game of mine, but I can't have a for loop run thousands of times per frame and maintain decent frame rates for players, so being able to approximate or rewrite without repeated sum or product would massive free the frame rates of my users, as there would be much less useless usage of computer resources.
The only part I care about is the sum (below) and the possibility of expressing it in such a way that it would be far less computationally repetitive at larger amounts of b.
$$\sum_{x=a}^b{x^x}$$
EDIT: Minor typos, hopefully I've got them all.
