What would be the closed form of $ncdot n + (n-2)cdot(n-2) + (n-4)cdot(n-4) + dots$?
As part of solving this problem , I came up with the following expression:
$$text{ans} = ncdot n + (n-2)cdot (n-2) + (n-4)cdot (n-4) + dots$$
So I am just running a loop to calculate the ans. However, since there is a pattern in the form of a series, I am wondering if a closed form exists for it? Please also show the steps to obtain so that I can learn, in general, how to approach such problems for finding closed forms.
EDIT: series goes till 2 if n is even, and till 1 if n is odd.
sequences-and-series closed-form
|
show 3 more comments
As part of solving this problem , I came up with the following expression:
$$text{ans} = ncdot n + (n-2)cdot (n-2) + (n-4)cdot (n-4) + dots$$
So I am just running a loop to calculate the ans. However, since there is a pattern in the form of a series, I am wondering if a closed form exists for it? Please also show the steps to obtain so that I can learn, in general, how to approach such problems for finding closed forms.
EDIT: series goes till 2 if n is even, and till 1 if n is odd.
sequences-and-series closed-form
Do you know the formula for the sum of the first $m$ squares?
– Arnaud D.
Aug 17 '18 at 9:55
yes, n(n+1)(2n+1)/6. Ok, I got it. This is exactly a standard square sum sequences. How stupid I am. Thanks.
– user3243499
Aug 17 '18 at 10:00
It would be more amazing to compute $sum_{k=0}^p (n-2k)^2$ for $pleq frac n2$. The formula is nice
– Claude Leibovici
Aug 17 '18 at 10:03
Where exactly does it stop?
– Arnaud Mortier
Aug 17 '18 at 10:03
@user3243499: no, it's the sum of the squares of the same parity.
– Yves Daoust
Aug 17 '18 at 10:04
|
show 3 more comments
As part of solving this problem , I came up with the following expression:
$$text{ans} = ncdot n + (n-2)cdot (n-2) + (n-4)cdot (n-4) + dots$$
So I am just running a loop to calculate the ans. However, since there is a pattern in the form of a series, I am wondering if a closed form exists for it? Please also show the steps to obtain so that I can learn, in general, how to approach such problems for finding closed forms.
EDIT: series goes till 2 if n is even, and till 1 if n is odd.
sequences-and-series closed-form
As part of solving this problem , I came up with the following expression:
$$text{ans} = ncdot n + (n-2)cdot (n-2) + (n-4)cdot (n-4) + dots$$
So I am just running a loop to calculate the ans. However, since there is a pattern in the form of a series, I am wondering if a closed form exists for it? Please also show the steps to obtain so that I can learn, in general, how to approach such problems for finding closed forms.
EDIT: series goes till 2 if n is even, and till 1 if n is odd.
sequences-and-series closed-form
sequences-and-series closed-form
edited Aug 17 '18 at 10:12
asked Aug 17 '18 at 9:54
user3243499
192113
192113
Do you know the formula for the sum of the first $m$ squares?
– Arnaud D.
Aug 17 '18 at 9:55
yes, n(n+1)(2n+1)/6. Ok, I got it. This is exactly a standard square sum sequences. How stupid I am. Thanks.
– user3243499
Aug 17 '18 at 10:00
It would be more amazing to compute $sum_{k=0}^p (n-2k)^2$ for $pleq frac n2$. The formula is nice
– Claude Leibovici
Aug 17 '18 at 10:03
Where exactly does it stop?
– Arnaud Mortier
Aug 17 '18 at 10:03
@user3243499: no, it's the sum of the squares of the same parity.
– Yves Daoust
Aug 17 '18 at 10:04
|
show 3 more comments
Do you know the formula for the sum of the first $m$ squares?
– Arnaud D.
Aug 17 '18 at 9:55
yes, n(n+1)(2n+1)/6. Ok, I got it. This is exactly a standard square sum sequences. How stupid I am. Thanks.
– user3243499
Aug 17 '18 at 10:00
It would be more amazing to compute $sum_{k=0}^p (n-2k)^2$ for $pleq frac n2$. The formula is nice
– Claude Leibovici
Aug 17 '18 at 10:03
Where exactly does it stop?
– Arnaud Mortier
Aug 17 '18 at 10:03
@user3243499: no, it's the sum of the squares of the same parity.
– Yves Daoust
Aug 17 '18 at 10:04
Do you know the formula for the sum of the first $m$ squares?
– Arnaud D.
Aug 17 '18 at 9:55
Do you know the formula for the sum of the first $m$ squares?
– Arnaud D.
Aug 17 '18 at 9:55
yes, n(n+1)(2n+1)/6. Ok, I got it. This is exactly a standard square sum sequences. How stupid I am. Thanks.
– user3243499
Aug 17 '18 at 10:00
yes, n(n+1)(2n+1)/6. Ok, I got it. This is exactly a standard square sum sequences. How stupid I am. Thanks.
– user3243499
Aug 17 '18 at 10:00
It would be more amazing to compute $sum_{k=0}^p (n-2k)^2$ for $pleq frac n2$. The formula is nice
– Claude Leibovici
Aug 17 '18 at 10:03
It would be more amazing to compute $sum_{k=0}^p (n-2k)^2$ for $pleq frac n2$. The formula is nice
– Claude Leibovici
Aug 17 '18 at 10:03
Where exactly does it stop?
– Arnaud Mortier
Aug 17 '18 at 10:03
Where exactly does it stop?
– Arnaud Mortier
Aug 17 '18 at 10:03
@user3243499: no, it's the sum of the squares of the same parity.
– Yves Daoust
Aug 17 '18 at 10:04
@user3243499: no, it's the sum of the squares of the same parity.
– Yves Daoust
Aug 17 '18 at 10:04
|
show 3 more comments
5 Answers
5
active
oldest
votes
It is well known that the sum of terms that are a polynomial expression of degree $d$, evaluated at the integers, is a polynomial expression of degree $d+1$.
So if you consider four values of the sum, you can obtain the requested expression as the Lagrangian interpolation polynomial on these four points.
For even $n$,
$$(0,0),(2,4),(4,20),(6,56)tofrac{n^3+3n^2+2n}6.$$
For odd $n$,
$$(1,1),(3,10),(5,35),(7,84)tofrac{n^3+3n^2+2n}6.$$
add a comment |
If $n$ is even, you have
$
begin{align}
sum_{k=1}^{frac{n}2}(2k)^2&=4sum_{k=1}^{frac{n}2}k^2\
&=4cdotfrac{frac{n}2(frac{n}2+1)(2cdotfrac{n}2+1)}6\
&=frac{n(n+1)(n+2)}6 \
text{If $n$ is odd, you have} \
\
sum_{k=1}^{frac{n+1}2}(2k-1)^2&=4sum_{k=1}^{frac{n+1}2}k^2-4sum_{k=1}^{frac{n+1}2}k+sum_{k=1}^{frac{n+1}2}1 \
&=4cdotfrac{frac{n+1}2(frac{n+1}2+1)(2cdotfrac{n+1}2+1)}6-4cdotfrac{frac{n+1}2(frac{n+1}2+1)}2+frac{n+1}2 \
&=frac{n(n+1)(n+2)}6
end{align}$
add a comment |
Use the classic formula for the sum of increasing squares and some manipulation to find:
$$frac{1}{3} left(leftlfloor frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor
frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor frac{n-1}{2}rightrfloor
+3right)$$
I don't think that the formula is right for the even $n$.
– Yves Daoust
Aug 17 '18 at 10:17
add a comment |
An alternative method:
Let's call the sum of alternate squares up to $n$ by $s(n)$.iafor $n=0,1,2,3,4,5,6$ is
$0,1,4,10,20,35, 56$
The differences between these terms are:
$1,3,6,10,15,21$
which are the triangular numbers $frac{n(n+1)}{2}$. So this suggests that
$s(n) = sum_{m=0}^{n} frac{m(m+1)}{2}$
$= sum_{m=0}^{n} (frac{m^2}{2} + frac{m}{2})$
$=frac{n(n+1)(2n+1)}{12} + frac{n(n+1)}{4}$
$=frac{n(n+1)(2n+1) + 3n(n+1)}{12}$
$ = frac{n(n+1)(n+2)}{6}$
This is not a formal proof, but it does suggest a formula which can form the starting point of a proof by induction
add a comment |
Since $x^2=frac{x(x+1)}2+frac{(x-1)x}2$, your sum becomes $$sum_{k=1}^nfrac{k(k+1)}2=frac{n(n+1)(n+2)}6$$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2885596%2fwhat-would-be-the-closed-form-of-n-cdot-n-n-2-cdotn-2-n-4-cdotn-4%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is well known that the sum of terms that are a polynomial expression of degree $d$, evaluated at the integers, is a polynomial expression of degree $d+1$.
So if you consider four values of the sum, you can obtain the requested expression as the Lagrangian interpolation polynomial on these four points.
For even $n$,
$$(0,0),(2,4),(4,20),(6,56)tofrac{n^3+3n^2+2n}6.$$
For odd $n$,
$$(1,1),(3,10),(5,35),(7,84)tofrac{n^3+3n^2+2n}6.$$
add a comment |
It is well known that the sum of terms that are a polynomial expression of degree $d$, evaluated at the integers, is a polynomial expression of degree $d+1$.
So if you consider four values of the sum, you can obtain the requested expression as the Lagrangian interpolation polynomial on these four points.
For even $n$,
$$(0,0),(2,4),(4,20),(6,56)tofrac{n^3+3n^2+2n}6.$$
For odd $n$,
$$(1,1),(3,10),(5,35),(7,84)tofrac{n^3+3n^2+2n}6.$$
add a comment |
It is well known that the sum of terms that are a polynomial expression of degree $d$, evaluated at the integers, is a polynomial expression of degree $d+1$.
So if you consider four values of the sum, you can obtain the requested expression as the Lagrangian interpolation polynomial on these four points.
For even $n$,
$$(0,0),(2,4),(4,20),(6,56)tofrac{n^3+3n^2+2n}6.$$
For odd $n$,
$$(1,1),(3,10),(5,35),(7,84)tofrac{n^3+3n^2+2n}6.$$
It is well known that the sum of terms that are a polynomial expression of degree $d$, evaluated at the integers, is a polynomial expression of degree $d+1$.
So if you consider four values of the sum, you can obtain the requested expression as the Lagrangian interpolation polynomial on these four points.
For even $n$,
$$(0,0),(2,4),(4,20),(6,56)tofrac{n^3+3n^2+2n}6.$$
For odd $n$,
$$(1,1),(3,10),(5,35),(7,84)tofrac{n^3+3n^2+2n}6.$$
answered Aug 17 '18 at 10:11
Yves Daoust
124k671222
124k671222
add a comment |
add a comment |
If $n$ is even, you have
$
begin{align}
sum_{k=1}^{frac{n}2}(2k)^2&=4sum_{k=1}^{frac{n}2}k^2\
&=4cdotfrac{frac{n}2(frac{n}2+1)(2cdotfrac{n}2+1)}6\
&=frac{n(n+1)(n+2)}6 \
text{If $n$ is odd, you have} \
\
sum_{k=1}^{frac{n+1}2}(2k-1)^2&=4sum_{k=1}^{frac{n+1}2}k^2-4sum_{k=1}^{frac{n+1}2}k+sum_{k=1}^{frac{n+1}2}1 \
&=4cdotfrac{frac{n+1}2(frac{n+1}2+1)(2cdotfrac{n+1}2+1)}6-4cdotfrac{frac{n+1}2(frac{n+1}2+1)}2+frac{n+1}2 \
&=frac{n(n+1)(n+2)}6
end{align}$
add a comment |
If $n$ is even, you have
$
begin{align}
sum_{k=1}^{frac{n}2}(2k)^2&=4sum_{k=1}^{frac{n}2}k^2\
&=4cdotfrac{frac{n}2(frac{n}2+1)(2cdotfrac{n}2+1)}6\
&=frac{n(n+1)(n+2)}6 \
text{If $n$ is odd, you have} \
\
sum_{k=1}^{frac{n+1}2}(2k-1)^2&=4sum_{k=1}^{frac{n+1}2}k^2-4sum_{k=1}^{frac{n+1}2}k+sum_{k=1}^{frac{n+1}2}1 \
&=4cdotfrac{frac{n+1}2(frac{n+1}2+1)(2cdotfrac{n+1}2+1)}6-4cdotfrac{frac{n+1}2(frac{n+1}2+1)}2+frac{n+1}2 \
&=frac{n(n+1)(n+2)}6
end{align}$
add a comment |
If $n$ is even, you have
$
begin{align}
sum_{k=1}^{frac{n}2}(2k)^2&=4sum_{k=1}^{frac{n}2}k^2\
&=4cdotfrac{frac{n}2(frac{n}2+1)(2cdotfrac{n}2+1)}6\
&=frac{n(n+1)(n+2)}6 \
text{If $n$ is odd, you have} \
\
sum_{k=1}^{frac{n+1}2}(2k-1)^2&=4sum_{k=1}^{frac{n+1}2}k^2-4sum_{k=1}^{frac{n+1}2}k+sum_{k=1}^{frac{n+1}2}1 \
&=4cdotfrac{frac{n+1}2(frac{n+1}2+1)(2cdotfrac{n+1}2+1)}6-4cdotfrac{frac{n+1}2(frac{n+1}2+1)}2+frac{n+1}2 \
&=frac{n(n+1)(n+2)}6
end{align}$
If $n$ is even, you have
$
begin{align}
sum_{k=1}^{frac{n}2}(2k)^2&=4sum_{k=1}^{frac{n}2}k^2\
&=4cdotfrac{frac{n}2(frac{n}2+1)(2cdotfrac{n}2+1)}6\
&=frac{n(n+1)(n+2)}6 \
text{If $n$ is odd, you have} \
\
sum_{k=1}^{frac{n+1}2}(2k-1)^2&=4sum_{k=1}^{frac{n+1}2}k^2-4sum_{k=1}^{frac{n+1}2}k+sum_{k=1}^{frac{n+1}2}1 \
&=4cdotfrac{frac{n+1}2(frac{n+1}2+1)(2cdotfrac{n+1}2+1)}6-4cdotfrac{frac{n+1}2(frac{n+1}2+1)}2+frac{n+1}2 \
&=frac{n(n+1)(n+2)}6
end{align}$
answered Aug 17 '18 at 11:53
Abraham Zhang
596312
596312
add a comment |
add a comment |
Use the classic formula for the sum of increasing squares and some manipulation to find:
$$frac{1}{3} left(leftlfloor frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor
frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor frac{n-1}{2}rightrfloor
+3right)$$
I don't think that the formula is right for the even $n$.
– Yves Daoust
Aug 17 '18 at 10:17
add a comment |
Use the classic formula for the sum of increasing squares and some manipulation to find:
$$frac{1}{3} left(leftlfloor frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor
frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor frac{n-1}{2}rightrfloor
+3right)$$
I don't think that the formula is right for the even $n$.
– Yves Daoust
Aug 17 '18 at 10:17
add a comment |
Use the classic formula for the sum of increasing squares and some manipulation to find:
$$frac{1}{3} left(leftlfloor frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor
frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor frac{n-1}{2}rightrfloor
+3right)$$
Use the classic formula for the sum of increasing squares and some manipulation to find:
$$frac{1}{3} left(leftlfloor frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor
frac{n-1}{2}rightrfloor +1right) left(2 leftlfloor frac{n-1}{2}rightrfloor
+3right)$$
answered Aug 17 '18 at 10:04
David G. Stork
9,93521232
9,93521232
I don't think that the formula is right for the even $n$.
– Yves Daoust
Aug 17 '18 at 10:17
add a comment |
I don't think that the formula is right for the even $n$.
– Yves Daoust
Aug 17 '18 at 10:17
I don't think that the formula is right for the even $n$.
– Yves Daoust
Aug 17 '18 at 10:17
I don't think that the formula is right for the even $n$.
– Yves Daoust
Aug 17 '18 at 10:17
add a comment |
An alternative method:
Let's call the sum of alternate squares up to $n$ by $s(n)$.iafor $n=0,1,2,3,4,5,6$ is
$0,1,4,10,20,35, 56$
The differences between these terms are:
$1,3,6,10,15,21$
which are the triangular numbers $frac{n(n+1)}{2}$. So this suggests that
$s(n) = sum_{m=0}^{n} frac{m(m+1)}{2}$
$= sum_{m=0}^{n} (frac{m^2}{2} + frac{m}{2})$
$=frac{n(n+1)(2n+1)}{12} + frac{n(n+1)}{4}$
$=frac{n(n+1)(2n+1) + 3n(n+1)}{12}$
$ = frac{n(n+1)(n+2)}{6}$
This is not a formal proof, but it does suggest a formula which can form the starting point of a proof by induction
add a comment |
An alternative method:
Let's call the sum of alternate squares up to $n$ by $s(n)$.iafor $n=0,1,2,3,4,5,6$ is
$0,1,4,10,20,35, 56$
The differences between these terms are:
$1,3,6,10,15,21$
which are the triangular numbers $frac{n(n+1)}{2}$. So this suggests that
$s(n) = sum_{m=0}^{n} frac{m(m+1)}{2}$
$= sum_{m=0}^{n} (frac{m^2}{2} + frac{m}{2})$
$=frac{n(n+1)(2n+1)}{12} + frac{n(n+1)}{4}$
$=frac{n(n+1)(2n+1) + 3n(n+1)}{12}$
$ = frac{n(n+1)(n+2)}{6}$
This is not a formal proof, but it does suggest a formula which can form the starting point of a proof by induction
add a comment |
An alternative method:
Let's call the sum of alternate squares up to $n$ by $s(n)$.iafor $n=0,1,2,3,4,5,6$ is
$0,1,4,10,20,35, 56$
The differences between these terms are:
$1,3,6,10,15,21$
which are the triangular numbers $frac{n(n+1)}{2}$. So this suggests that
$s(n) = sum_{m=0}^{n} frac{m(m+1)}{2}$
$= sum_{m=0}^{n} (frac{m^2}{2} + frac{m}{2})$
$=frac{n(n+1)(2n+1)}{12} + frac{n(n+1)}{4}$
$=frac{n(n+1)(2n+1) + 3n(n+1)}{12}$
$ = frac{n(n+1)(n+2)}{6}$
This is not a formal proof, but it does suggest a formula which can form the starting point of a proof by induction
An alternative method:
Let's call the sum of alternate squares up to $n$ by $s(n)$.iafor $n=0,1,2,3,4,5,6$ is
$0,1,4,10,20,35, 56$
The differences between these terms are:
$1,3,6,10,15,21$
which are the triangular numbers $frac{n(n+1)}{2}$. So this suggests that
$s(n) = sum_{m=0}^{n} frac{m(m+1)}{2}$
$= sum_{m=0}^{n} (frac{m^2}{2} + frac{m}{2})$
$=frac{n(n+1)(2n+1)}{12} + frac{n(n+1)}{4}$
$=frac{n(n+1)(2n+1) + 3n(n+1)}{12}$
$ = frac{n(n+1)(n+2)}{6}$
This is not a formal proof, but it does suggest a formula which can form the starting point of a proof by induction
answered Aug 17 '18 at 11:29
gandalf61
7,718623
7,718623
add a comment |
add a comment |
Since $x^2=frac{x(x+1)}2+frac{(x-1)x}2$, your sum becomes $$sum_{k=1}^nfrac{k(k+1)}2=frac{n(n+1)(n+2)}6$$
add a comment |
Since $x^2=frac{x(x+1)}2+frac{(x-1)x}2$, your sum becomes $$sum_{k=1}^nfrac{k(k+1)}2=frac{n(n+1)(n+2)}6$$
add a comment |
Since $x^2=frac{x(x+1)}2+frac{(x-1)x}2$, your sum becomes $$sum_{k=1}^nfrac{k(k+1)}2=frac{n(n+1)(n+2)}6$$
Since $x^2=frac{x(x+1)}2+frac{(x-1)x}2$, your sum becomes $$sum_{k=1}^nfrac{k(k+1)}2=frac{n(n+1)(n+2)}6$$
answered Dec 28 '18 at 0:29
Abraham Zhang
596312
596312
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2885596%2fwhat-would-be-the-closed-form-of-n-cdot-n-n-2-cdotn-2-n-4-cdotn-4%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you know the formula for the sum of the first $m$ squares?
– Arnaud D.
Aug 17 '18 at 9:55
yes, n(n+1)(2n+1)/6. Ok, I got it. This is exactly a standard square sum sequences. How stupid I am. Thanks.
– user3243499
Aug 17 '18 at 10:00
It would be more amazing to compute $sum_{k=0}^p (n-2k)^2$ for $pleq frac n2$. The formula is nice
– Claude Leibovici
Aug 17 '18 at 10:03
Where exactly does it stop?
– Arnaud Mortier
Aug 17 '18 at 10:03
@user3243499: no, it's the sum of the squares of the same parity.
– Yves Daoust
Aug 17 '18 at 10:04