Help with Formula

Aerdan

New member
Joined
Oct 30, 2020
Messages
1
Hello, so this isn't for school, but rather developing a scaling XP system based off of post count on a web forum. I can break it down so it's calculated in parts, but since it has to be implemented with a large variety of post counts already established, I want to figure out the formula based on an existing number. I solved it once in college, but my brain doesn't work. Enough about that...

x = Post Count
y = User Level
c = Coefficient

The first level is hit when the coefficient is met. So let's say the coefficient is 5. Once x = 5, then y = 1. For the next level, it is now 2 times the coefficient to hit it, so for the same coefficient, that means an ADDITIONAL 10. When x = 15, y = 2. The data set would look similar to...

x = 0, y = 0
x = 5, y = 1
x = 15, y = 2
x = 30, y = 3
x = 50, y = 4

I miss my younger brain: I hope someone's here can help me figure out this equation. Thank you!
 
You have
Code:
y=0,  x = 0*5                         = 0
y=1,  x = 0*5 + 1*5                   = 5
y=2,  x = 0*5 + 1*5 + 2*5             = 15
y=3,  x = 0*5 + 1*5 + 2*5 + 3*5       = 30
y=4,  x = 0*5 + 1*5 + 2*5 + 3*5 + 4*5 = 50

Now consider the general case for a higher value of "y"
Code:
    0*5   +      1*5  +      2*5  + ... +  (y-2)*5  +  (y-1)*5  +      y*5   = x

Reverse the order of the above sum

    y*5   +  (y-1)*5  +  (y-2)*5  + ... +      2*5  +      1*5  +      0*5   =  x

Write them above each other, and add the corresponding columns

    0*5   +      1*5  +      2*5  + ... +  (y-2)*5  +  (y-1)*5  +      y*5   =  x
    y*5   +  (y-1)*5  +  (y-2)*5  + ... +      2*5  +      1*5  +      0*5   =  x
   ===============================================================================
    y*5   +      y*5  +      y*5  + ... +      y*5  +      y*5  +      y*5   = 2*x

Can you simplify the last line above?
 
Top