You are here:

Advanced Math/graphing question

Advertisement


Question
QUESTION: I need to know if there is a function which describes the series below

The series is defined that an employee gets paid N for N days, then N+1 for the next N+1 days, and so on.

So he would get paid;

1,2,2,3,3,3,4,4,4,4,5,5,5,5,5

And I need the equation of his total return:

1,3,5,8,11,14,18,22,26,30,35,40,45,50,55

ANSWER: Note that in the series, there are 2-2's, 3-3's, 4-4's, etc.
This would make the pay the sum of squares before.
In other words, day 1 has a total of 1.

Days 2 and 3 have a total of 1 + 2(i-1), where i = 2 or 3.
That is the same as 2i - 1.

Days 4, 5, and 6 would have a total of 5 + 3(i-3), since 1+4=5.
That is the same as 3i - 4.

Days 7, 8, 9, and 10 would have a total of 14 + 4(i-6), since 1+4+9=14.
That is the same as 4i - 10.

Days 11, 12, 13, 14, and 15 would have a total of 30 + 5(i-10), since 1+4+9+16=30.
That is the same as 5i - 20.

Days 16, 17, 18, 19, 20, and 21 would have a total of 55 + 6(i-15).
That is the same as 6i - 35.

Every time the pay goes up by 1 per day to n units, the amount subtracted increases by n(n-1)/2.
This means that each time the amount paid is increased, the amount subtracted is the same as the summation from 1 to the current pay -1.

---------- FOLLOW-UP ----------

QUESTION: Scott,  thanks for your quick reply.  I might have misunderstood, but this doesn't answer my question. Im looking for the function where I get the total return for n days.  you method means I would have to iterate thru the series and know what the pay level is.

for example on day 5, with your method I would need to know that the pay is 3.

What I need is a function where the only input is the day number

ANSWER: The sum of 1 to n is n(n+1)/2.
To show this be examples,
 if n=1, n(n+1)/2 = 1*2/2 = 1;
 if n=2, n(n+1)/2 = 2*3/2 = 3; and
 if n=3, n(n+1)/2 = 3*4/2 = 6.

It can also be proved by taking 1+n + 2+(n-1) +  ....
If n is even, there are n/2 terms adding to n+1, so it is n(n+1)/2.
If n is odd, there are (n-1)/2 terms adding to n+1 and the last term in the middle is (n+1)/2.
So we get (n+1)(n-1)/2 + (n+1)/2 = (n^2-1)/2 + (n+1)/2 = (n^2+n)/2 = n(n+1)/2.

If the day is at the end of 2 years (730, or 731 with a leap year involved),
it can easily be found.  Take two times the number of days, which is 2*730 = 1460.
Using Excel, the squarerott(1460) = 38.20994635, try 38.
The sum of 1 through 38 is 38*39/2 = 19*39 = 741.
Since 741-38<730, 38 is the amount being made.


---------- FOLLOW-UP ----------

QUESTION: No, the answer for 3 days is 5, not 6.

Answer
The way to find the answer is to solve the equation k(k+1)/2 <= n for the greatest possible k.
Once this has been done, the answer is A + B where
A is [sum(m^2) for m going from 1 to k]   and
B is (k+1)P, where P is n - C, where C = [sum(m) from 1 to k].

For n = 1, k = 1.  This makes A be 1.  C is 1 as well, P = 1 - 1 = 0.  This makes B into 0.
Since the answer is A+B, then answer is 1.

At n=2, k is still 1, so A=1.  C = sum(m) from 1 to 1, so C=1, so n - C = 1.
Now k+1 = 2, so B = 2.  This makes A + B = 1 + 2 = 3, and that's the answer.

For n=3, k is 2 {since 2(2+1)/2=3 }, so A=1+4=5.  Now C = 1+2 = 3, so n-C = 0, so B=0,
so the answer, A+B, is 5.

For n=4, k is 2 again, so A is still 5.  Since k is still 2, C is still 3, so P = n-C = 1.
Since B = (k+1)P = 3*1 = 3, the answer is A+B = 5+3 = 8.

For n=5, k is still 2, so A is agaijn 5.  Since k is still 2, C is still 3, so P = n-C = 2.
Since B = (k+1)P = 3*2 = 6, the answer is A+B = 5+6 = 11.

For n=6, k is 3 { since 1+2+3=6 }, so A is 1+4+9 = 14.  Since k is 3, C is 1+2+3=6.
Since n-C=0, the answer is A, 14.

For n=7, k is still 3, so A is still 14.  Since C = 1+2+3 = 6, n-C = 1.
This makes B = (3+1)(1) = 4*1 = 4.  This makes the answer be 14+4 = 18.

I have worked it out in Excel; the formulas have been changed to what they are; in the spreadsheet, for example in row 7, n was A7, k was B7, A was C7, C was D7, P was E7, B was F7, and the answe was in G7.  There was also a * for multiplication.

The 1st column has n.
The 2nd column has k=TRUNC((-1+(1+8n)^0.5)/2).
The 3rd column has A=((2n+3)n+1)n/6.
The 4th column has C=k(k+1)/2.
The 5th column has P=n-C.
The 6th column has B=(k+1)P.
The 7th column has the answer, which is A+B.
n  k    A   C   P   B  Answer
1  1    1   1  0   0    1
2  1    1   1  1   2    3
3  2    5   3  0   0    5
4  2    5   3  1   3    8
5  2    5   3  2   6   11
6  3   14   6  0   0   14
7  3   14   6  1   4   18
8  3   14   6  2   8   22
9  3   14   6  3  12   26
10  4   30  10  0   0   30
11  4   30  10  1   5   35
12  4   30  10  2  10   40
13  4   30  10  3  15   45
14  4   30  10  4  20   50
15  5   55  15  0   0   55
16  5   55  15  1   6   61
17  5   55  15  2  12   67
18  5   55  15  3  18   73
19  5   55  15  4  24   79
20  5   55  15  5  30   85
21  6   91  21  0   0   91
22  6   91  21  1   7   98
23  6   91  21  2  14  105
24  6   91  21  3  21  112
25  6   91  21  4  28  119
26  6   91  21  5  35  126
27  6   91  21  6  42  133
28  7  140  28  0   0  140
29  7  140  28  1   8  148
30  7  140  28  2  16  156
31  7  140  28  3  24  164
32  7  140  28  4  32  172
33  7  140  28  5  40  180
34  7  140  28  6  48  188
35  7  140  28  7  56  196
36  8  204  36  0   0  204
37  8  204  36  1   9  213
38  8  204  36  2  18  222
39  8  204  36  3  27  231
40  8  204  36  4  36  240
41  8  204  36  5  45  249
42  8  204  36  6  54  258
43  8  204  36  7  63  267
44  8  204  36  8  72  276
45  9  285  45  0   0  285
46  9  285  45  1  10  295

Advanced Math

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scott A Wilson

Expertise

I can answer any question in general math, arithetic, discret math, algebra, box problems, geometry, filling a tank with water, trigonometry, pre-calculus, linear algebra, complex mathematics, probability, statistics, and most of anything else that relates to math. I can even tell you it takes me over 2,000 steps to go a mile, but is that relevant?

Experience

Experience in the area; I have tutored people in the above areas of mathematics for almost two years in AllExperts.com. I have tutored people here and there in mathematics since before I received a BS degree almost 25 years ago. In just two more years, I received an MS degree as well, but more on that later. I tutored at OSU in the math center for all six years I was there. Most students offering assistance were juniors, seniors, or graduate students. I was allowed to tutor as a freshman. I tutored at Mathnasium for well over a year. I worked at The Boeing Company for over 5 years. I received an MS degreee in Mathematics from Oregon State Univeristy. The classes I took were over 100 hours of upper division credits in mathematical courses such as calculus, statistics, probabilty, linear algrebra, powers, linear regression, matrices, and more. I graduated with honors in both my BS and MS degrees. Past/Present Clients: College Students at Oregon State University, various math people since college, over 7,500 people on the PC from the US and rest the world.

Publications
My master's paper was published in the OSU journal. The subject of it was Numerical Analysis used in shock waves and rarefaction fans. It dealt with discontinuities that arose over time. They were solved using the Leap Frog method. That method was used and improvements of it were shown. The improvements were by Enquist-Osher, Godunov, and Lax-Wendroff.

Education/Credentials
Master of Science at OSU with high honors in mathematics. Bachelor of Science at OSU with high honors in mathematical sciences. This degree involved mathematics, statistics, and computer science. I also took sophmore level physics and chemistry while I was attending college. On the side I took raquetball, but that's still not relevant.

Awards and Honors
I earned high honors in both my BS degree and MS degree from Oregon State. I was in near the top in most of my classes. In several classes in mathematics, I was first. In a class of over 100 students, I was always one of the first ones to complete the test. I graduated with well over 50 credits in upper division mathematics.

Past/Present Clients
My clients have been students at OSU, people nearby, friends with math questions, and several people every day on the PC, and you're probably make one more.

©2012 About.com, a part of The New York Times Company. All rights reserved.