Tuesday, January 5, 2016

What's the formula for the 365 day penny challenge? – math.stackexchange.com #JHedzWorlD


You might have seen the viral posts about “save a penny a day for a year and make $667.95!” The mathematicians here already get the concept while some others may be going, “what“? Of course, what the challenge is referring to is adding a number of pennies to a jar for what day you’re on. So:


Day 1 = + .01 Day 2 = + .02 Day 3 = + .03 Day 4 = + .04 

So that in the end, you add it all up like so:


1 + 2 + 3 + 4 + 5 + 6 + ... = 667.95 

The real question is, what’s a simple formula for getting a sum of consecutive integers, starting at whole number 1, without having to actually count it all out?!




Have had a lot of friends ask about this lately, as it is all over FaceBook. The formula is actually quite simple:


(N (N + 1) ) / 2 where N = Highest value 

Or Simply $frac n(n+1)2$


Thus


365 (365 + 1) ) / 2 = 66795 

Divide that by 100 (because there’s 100 pennies in a dollar) and viola! $667.95


Now, this is an OLD math (think about 6th century BC), wherein these results are referred (correct me if I’m wrong anyone, been years since I was in school) to as triangle numbers. In part, because as you add them up, you can stack the results in the shape of a triangle!


1 = 1 * 1 + 2 = 3 * * * 1 + 2 + 3 = 6 * * * * * * 1 + 2 + 3 + 4 = 10 * * * * * * * * * * 

as pointed out by NoChance, the triangle is called “Pascal’s Triangle
He also has a fun story and answer to this question!



See? Fun stuff, numbers!





The real question is, what’s a simple formula for getting a sum of consecutive integers, starting at whole number 1, without having to actually count it all out



While others have answered the question, I could not resist to reflect some history associated with the question.


The question you asked relates back to a famous mathematician, Gauss, the story sometimes referred to as “Gauss Punishment”, goes like:


In elementary school in the late 1700’s, Gauss was asked to find the sum of the numbers from 1 to 100. The question was assigned as “busy work” by the teacher, but Gauss found the answer rather quickly by discovering a pattern. His observation was as follows:


1 + 2 + 3 + 4 + … + 98 + 99 + 100


Gauss noticed that if he was to split the numbers into two groups (1 to 50 and 51 to 100), he could add them together vertically to get a sum of 101.


1 + 2 + 3 + 4 + 5 + … + 48 + 49 + 50


100 + 99 + 98 + 97 + 96 + … + 53 + 52 + 51


1 + 100 = 101 2 + 99 = 101 3 + 98 = 101 . . . 48 + 53 = 101 49 + 52 = 101 50 + 51 = 101


Gauss realized then that his final total would be 50(101) = 5050.



The source of the above is mostly from The sum of the first 100 whole numbers.


Another version goes like, he wrote the numbers as follows:


001 + 002 + 003 +…+ 098 + 099 + 100 = S


100 + 099 + 098 +…+ 003 + 002 + 001 = S


(100+1)+(100+1)+(100+1)+…+ (100+1)+(100+1)+(100+1)= 2S


The value $(100+1)$ is repeated $100$ times.


so we get:


$$100 * (100+1) = 2S$$


but we only want the value of $S$


$$s=frac100*(100+1)2$$


Needless to say, the number 100 can be any positive integer and the method would work the same. It is amazing what goes in the mind of a kid who is very young!




As others pointed out, the answer is $frac n(n+1)2$. Here is an intuitive proof:


You can group first and last number whose sum is $n + 1$. The second and the second last have sum $n + 1$. If you continue like that, you will notice that all such pairs have sum $n + 1$ – that is, because the first one gets increased with $1$, the second in the pair – with $-1$. How many pairs are there? $fracn2$. So total sum of pairs is $frac n(n+1)2$




Let $S_1=1+2+3+….+(n-1)+n$,


and $S_2=n+(n-1)+(n-2)+…+2+1$, it should be clear that $S_1=S_2$


Add the two expression gives $S_1+S_2=(n+1)+(n+1)+…+(n+1)$ there are n terms, i.e. $2S_1=n(n+1)$ or $S_1=fracn(n+1)2$




$1+2+3+…+(n-1)+n=frac1+2+3+…+(n-1)+n+1+2+3+…+(n-1)+n2=frac(1+n)+(2+n-1)+(3+n-2)+…+(n+1)2=frac(n+1)+(n+1)+(n+1)+…+(n+1) left[ n mathrm-timesright]2=fracn(n+1)2$




As the growth is linear, the total is the number of days times the average amount, which is also the average of the first and last amounts


$$365timesfrac0.01+3.652.$$

















5  

$sumlimits_k=1^nk=fracn(n+1)2$ – barak manos 1 hour ago




    

All of the answers are very well written. Though I must point out that you'll end up with $$671.61$, since it's a leap year! – zz20s 1 hour ago




    

@zz20s oh you! Stahp et! 😛 – SpYk3HH 1 hour ago




    

By the way, the way you have written the values suggests that you are saving $m$ pennies a day (not only 1 penny) where $m$ is the day number. If you only deposit a penny a day, after $n$ days, you get $n*0.01$ Dollars only. – NoChance 1 hour ago




    

@zz20s And technically, the year is still off by 11 minutes and 14 seconds. should we account for that too? – SpYk3HH 1 hour ago
















1  

+1 for last sentence – zz20s 1 hour ago




1  

Your question and your answer to your question report the very same time (even the same second!). On one hand I'm curious to know "how" did you do it, on the other hand I'm also curious to know "why" did you do it… – Giovanni De Gaetano 1 hour ago




1  

The triangle is called Pascal's Triangle. And maybe you need to change "Multiply that by 100" to "Divide that by 100 ". – NoChance 1 hour ago




    

@GiovanniDeGaetano I did it to have this link to refer friends too who keep asking me about this. The extra answers are adding extra knowledge, always a plus. As to the how, anytime in a Stack site you ask a question, there is a checkbox at bottom (just above submit usually) that says something like "Answer your question". Checking that box will open an answer box where you can add an answer. It's for people who don't really need an answer, but want to help spread a little knowledge. I use it a lot on Stackoverflow when putting up questions people email me a lot. – SpYk3HH 1 hour ago




    

@NoChance Thanks, couldn't remember the name, and I fixed it. Sometimes I get brain to hand dislexia … or something like that. I know I meant divide but apparently typed multiply … lel – SpYk3HH 1 hour ago










    

+1 because of the neat story. Had the answer up there but this way is fun too! – SpYk3HH 1 hour ago




1  

Yep, the story is neat! It is one of my favorites. I think the history of mathematics is very beautiful but in schools they avoid telling us anything about it. – NoChance 1 hour ago


















JHedzWorlD


AIM GLOBAL






No comments:

Post a Comment