In the case of m=2, a1=61, a2=21, and a3=31.
Solving for the General Case
To solve for the closed form solution of every power sum we use the following process.
Take the bottom left half of Pascal's infinite matrix. Remove the top left-bottom right diagonal of 1's. Remove the top row and right most column of 0's. Invert the matrix. Now, the jth row from the right yields the coefficients, ai of the sum of (j-1)th powers. A full proof and explanation is given in this document.
This table contains the coefficients of the closed form solutions for the first 61 power sums. As an example, the 3rd column from the right reads:
312161
This means a3=31, a2=21, and a1=61. Thus the closed form solution is a3n3+a2n2+a1n=31n3+21n2+61n.
How it was made:
I used the code below for CS50 to generate the bottom 61 rows and columns of Pascal's matrix. After eliminating the unnecessary rows and columns, I then inverted the matrix on this website (huge thanks to whomever made this). I had to fill in 455 0's (probably due to the range of a long double) by hand but don't worry, all numbers in the giant table linked above are accurate.
#include <math.h
#include <stdio.h
#include <stdlib.h
#include <string.h
#include <ctype.h
#include <cs50.h
int main(void)
{
printf("count= ");
int count = GetInt();
// numerator
long double i;
// denominator
long double j;
long double numb;
long long integer;
long long sign;
for (j = count; j = 0; j--)
{
for (i = count + 1; i = 1; i--)
{
if (i j)
{
numb = roundl(tgammal(i + 1) / tgammal(i - j + 1) / tgammal(j + 1));
/** tgamma in cs50 always underestimates the gamma function by like .00000000001.
* If we typeset numb to an int without using the ceil function, integer would be one too small.
**/
integer = ceill(numb);
// sign on each number
sign = powl(-1, i + j);
printf("%lli ", -1 * integer * sign);
}
else
{
printf("0 ");
}
}
printf("\n");
}
}
This discussion board is a place to discuss our Daily Challenges and the math and science
related to those challenges. Explanations are more than just a solution — they should
explain the steps and thinking strategies that you used to obtain the solution. Comments
should further the discussion of math and science.
When posting on Brilliant:
Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.
Markdown
Appears as
*italics* or _italics_
italics
**bold** or __bold__
bold
- bulleted - list
bulleted
list
1. numbered 2. list
numbered
list
Note: you must add a full line of space before and after lists for them to show up correctly
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
There are no comments in this discussion.