# n more each day

It's been a while since I've been at school and I don't work in a field that practices this sort of stuff so I don't know the formula my brain can't wrap my head around the problem.

The problem:

You start with $0$ points. After $1$ day you gain $100$ points. The next day you gain $110$ points, then $120$ and so on.

If I remember correctly, there is a formula to get how many days until you reach $x$ points.

Side-note: couldn't find any tags to use.

-
You seem to have been a backbencher, rather like me! –  Awal Garg Jul 4 at 12:14
@AwalGarg Failed yr11, never did yr12. Haven't done this type of stuff since yr7 so it's been a while. –  Spedwards Jul 4 at 12:19
hehe, I was kidding though :P –  Awal Garg Jul 4 at 12:20

The number of points you get after $n$ days is $a_n = 90 + n\cdot 10$. There is a simple way to calculate the amount of points after $n$ days:

$$\sum_{i=1}^n a_i = \sum_{i=1}^n (90 + 10i) = \sum_{i=1}^n 90 + 10 \sum_{i=1}^n i = 90 n + 10 \sum_{i=1}^n i$$

Now, all you need to know is that the sum of the first $n$ integers is $$\sum_{i=1}^n i = \frac{n(n+1)}{2}$$ and you are done:

$$\sum_{i=1}^n a_i = 90 n + 10\cdot \frac{n(n+1)}{2} = 5n^2 + 95 n.$$

Now, since you want to know how many days it takes for you to reach at least $x$ points, you are solving an equation $$5n^2 + 95 n = x$$ for $n$. The exact solution to this is the root of the polynomial

$$5n^2 +95 n - x$$ which is $$\frac{-95 \pm \sqrt{95^2 + 20x}}{10}$$ This gives you two solutions, out of which one is negative and one is positive. You are only interested in the positive one, so you take the solution $$\alpha = \frac{-95 + \sqrt{95^2 + 20x}}{10}.$$

Of course, for most $x$, $\alpha$ will not be an integer, but since you know that the value of $p(n) = 5n^2 + 95n$ is strictly increasing and you know that $p(\alpha) = x$, you know that, if $\alpha$ is not an intger, that $p(\lfloor\alpha\rfloor)<x<p(\lceil\alpha\rceil)$, so you need $\lceil\alpha\rceil$ days to have more than $x$ points, and you will have less than $x$ the day before.

-
$\alpha$ need only a plus in the formula :) –  Ant Jul 4 at 13:32
@Ant Thank you, fixed. –  5xum Jul 4 at 14:06

Yes its called AP(Arithmetic Progression) An=a+(n-1)d So for example if you want to calculate at 6th day the points will be An=100+(6-1)10 An=150

Where a=initial amount at day 1 n=no. of days d=difference in increment i.e 10

-
I also think my problem was misinterpreted. 6 days would be 160 points. So a+n*d would be correct. –  Spedwards Jul 4 at 9:56