Start with 1 day:
f(1) = 1 partridge = 1 present
Then two days:
f(2) = 1 partridge + 2 turtle doves = 3 presents
Day 3:
f(3) = 1 + 2 + 3 = 6 presents
Day 4:
f(4) = 1 + 2 + 3 + 4 = 10 presents.
The sum of consecutive digits can be computed as:
f(n) = n(n+1) / 2
But I think what you are asking for is the *total* sum of presents.
S(1) = 1 = 1
S(2) = 1 + 3 = 4
S(3) = 1 + 3 + 6 = 10
S(4) = 1 + 3 + 6 + 10 = 20
S(5) = 1 + 3 + 6 + 10 + 15 = 35
Can you figure the formula for S(n)?
You can check the Online Encyclopedia of Integer Sequences, if you don't know the answer...
The sum of triangle numbers is the pyramidal (or tetrahedral) numbers given by the following formula.
S(n) = n(n+1)(n+2)/6
For S(12) = (12x13x14) / 6 = 364 gifts
For S(20) = (20x21x22) / 6 = 1,540 gifts
Incidentally, if you are familiar with binomials, the results are equivalent to C(n+2, 3).
(12 + 2) choose 3 = 364
(20 + 2) choose 3 = 1,540.
2006-12-08 03:27:31
·
answer #1
·
answered by Puzzling 7
·
0⤊
0⤋
For the each and on a daily basis volume despatched right here Algebraic formula works: x^2/2 + x/2 the place x is the day style. occasion, say day 6, inputting 6 into the formula supplies 36/2 + 6/2 = 18 + 3 =21. For the cumulative finished the Algebraic formula works: x^3/6 + x^2/2 + x/3 the place x is the day style. occasion, say day 12, inputting 12 into the formula supplies: 288 + seventy two + 4 = 364
2016-10-14 06:40:46
·
answer #2
·
answered by ? 4
·
0⤊
0⤋
Bah, I should have known this was a well-known sequence.
Renny B's second answer is correct for the total number of gifts received.
Humbug.
--------------
Neat!
You receive 12 partridges in a pair tree. 12 x 1
11 sets of 2 turtle doves. 11 x 2
10 sets of 3 french hens. 10 x 3
9 sets of 4 calling birds. 9 x 4
....
1 set of 12 drummers drumming 1 x 12
So one way to calculate it for n days of Christmas would be to calculate:
If n is even:
2[(1)(n) + (2)(n-1) + (3)(n-2)...(n/2-1)(n/2)]
If n is odd:
2[(1)(n) + (2)(n-1) + (3)(n-2)...(floor(n/2))(ceil(n/2) + 1)] + ceil(n/2)^2
A little messier than I expected but I think the formulas do the trick.
Working on another way to think of this....
2006-12-08 03:25:25
·
answer #3
·
answered by Jim Burnell 6
·
0⤊
0⤋
On the nth day of Christmas, my true love does indeed send to me a triangular number of gifts.
But if you want to know the today number of gifts received up to and including the nth day, then you need to sum these triangular numbers using the formula
n(n+1)(n+2)/6
2006-12-08 03:24:25
·
answer #4
·
answered by Anonymous
·
1⤊
0⤋
What you're looking for are TRIANGULAR NUMBERS. They are the sum of 1, 2, 3, 4, ..., up to a number N.
The formula for the N-th triangular number is:
(n-squared + n) / 2
2006-12-08 03:18:51
·
answer #5
·
answered by Adam H 1
·
0⤊
0⤋