Calculate an infinite series by computer: get sum and number of terms for given precision











up vote
0
down vote

favorite












I need to find a sum and number of terms in an infinite series if ε ∈ (0;1) and x ∈ (1;5):



$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}$$



I was able to convert it into a simpler form, but stuck there:



$$lim_{k→∞} frac{x^k×k^2}{k!×(k+1)} = e^x frac{k^2}{k+1}$$



Can you suggest a direction to simplify the $frac{k^2}{k+1}$ portion, please?










share|cite|improve this question


















  • 1




    I'm not sure what you did above , but in the limit part that's wrong: it cannot be that the limit when $;ktoinfty;$ is something were $;k;$ appears... Also that...sign...like epsilon or something at the end of your first line: what is that in $;(0,1);$ ?
    – DonAntonio
    Nov 16 at 22:20












  • What you need to do is determine how large is the $k$th term for the particular $x$. For example, pick the upper bound of your interval $x=5$. Let's say you measure precision in the number of correct decimal digits. Then you need to pick some $d$ and find $k$ such that $$frac{k^2 5^k}{(k+1)!}< 10^{-d}$$ Then you can say that you need at least $k$ terms to get $d$ digits. Obviously, we should be using partial sums instead of a single term, but your series converges fast as factorials overtake the powers. So this bound should be a good start
    – Yuriy S
    Nov 16 at 22:27










  • And whatever you did with the limit is wrong as DonAntonio pointed out. What were you trying to do?
    – Yuriy S
    Nov 16 at 22:28










  • Thanks a lot for your input, @DonAntonio and Yuriy S! I would clarify the epsilon meaning with my professor because I was assuming that it's just my lack of knowledge about precisions in math (because I only know about $10^{-n}$ type of notations. • • • I've naively tried a limit because the series is convergent, so I was thinking that sum and limit notations are the same. I get that this was wrong assumption.
    – terales
    Nov 17 at 9:34












  • Just got a confirmation: ε ∈ (0;1) in CS class tasks, in my University at least, means that user can specify any input from 0 to 1. So the resulting epsilon would be in an expected $10^{-d}$ format.
    – terales
    Nov 17 at 12:00

















up vote
0
down vote

favorite












I need to find a sum and number of terms in an infinite series if ε ∈ (0;1) and x ∈ (1;5):



$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}$$



I was able to convert it into a simpler form, but stuck there:



$$lim_{k→∞} frac{x^k×k^2}{k!×(k+1)} = e^x frac{k^2}{k+1}$$



Can you suggest a direction to simplify the $frac{k^2}{k+1}$ portion, please?










share|cite|improve this question


















  • 1




    I'm not sure what you did above , but in the limit part that's wrong: it cannot be that the limit when $;ktoinfty;$ is something were $;k;$ appears... Also that...sign...like epsilon or something at the end of your first line: what is that in $;(0,1);$ ?
    – DonAntonio
    Nov 16 at 22:20












  • What you need to do is determine how large is the $k$th term for the particular $x$. For example, pick the upper bound of your interval $x=5$. Let's say you measure precision in the number of correct decimal digits. Then you need to pick some $d$ and find $k$ such that $$frac{k^2 5^k}{(k+1)!}< 10^{-d}$$ Then you can say that you need at least $k$ terms to get $d$ digits. Obviously, we should be using partial sums instead of a single term, but your series converges fast as factorials overtake the powers. So this bound should be a good start
    – Yuriy S
    Nov 16 at 22:27










  • And whatever you did with the limit is wrong as DonAntonio pointed out. What were you trying to do?
    – Yuriy S
    Nov 16 at 22:28










  • Thanks a lot for your input, @DonAntonio and Yuriy S! I would clarify the epsilon meaning with my professor because I was assuming that it's just my lack of knowledge about precisions in math (because I only know about $10^{-n}$ type of notations. • • • I've naively tried a limit because the series is convergent, so I was thinking that sum and limit notations are the same. I get that this was wrong assumption.
    – terales
    Nov 17 at 9:34












  • Just got a confirmation: ε ∈ (0;1) in CS class tasks, in my University at least, means that user can specify any input from 0 to 1. So the resulting epsilon would be in an expected $10^{-d}$ format.
    – terales
    Nov 17 at 12:00















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I need to find a sum and number of terms in an infinite series if ε ∈ (0;1) and x ∈ (1;5):



$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}$$



I was able to convert it into a simpler form, but stuck there:



$$lim_{k→∞} frac{x^k×k^2}{k!×(k+1)} = e^x frac{k^2}{k+1}$$



Can you suggest a direction to simplify the $frac{k^2}{k+1}$ portion, please?










share|cite|improve this question













I need to find a sum and number of terms in an infinite series if ε ∈ (0;1) and x ∈ (1;5):



$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}$$



I was able to convert it into a simpler form, but stuck there:



$$lim_{k→∞} frac{x^k×k^2}{k!×(k+1)} = e^x frac{k^2}{k+1}$$



Can you suggest a direction to simplify the $frac{k^2}{k+1}$ portion, please?







infinite-product






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 16 at 22:13









terales

1054




1054








  • 1




    I'm not sure what you did above , but in the limit part that's wrong: it cannot be that the limit when $;ktoinfty;$ is something were $;k;$ appears... Also that...sign...like epsilon or something at the end of your first line: what is that in $;(0,1);$ ?
    – DonAntonio
    Nov 16 at 22:20












  • What you need to do is determine how large is the $k$th term for the particular $x$. For example, pick the upper bound of your interval $x=5$. Let's say you measure precision in the number of correct decimal digits. Then you need to pick some $d$ and find $k$ such that $$frac{k^2 5^k}{(k+1)!}< 10^{-d}$$ Then you can say that you need at least $k$ terms to get $d$ digits. Obviously, we should be using partial sums instead of a single term, but your series converges fast as factorials overtake the powers. So this bound should be a good start
    – Yuriy S
    Nov 16 at 22:27










  • And whatever you did with the limit is wrong as DonAntonio pointed out. What were you trying to do?
    – Yuriy S
    Nov 16 at 22:28










  • Thanks a lot for your input, @DonAntonio and Yuriy S! I would clarify the epsilon meaning with my professor because I was assuming that it's just my lack of knowledge about precisions in math (because I only know about $10^{-n}$ type of notations. • • • I've naively tried a limit because the series is convergent, so I was thinking that sum and limit notations are the same. I get that this was wrong assumption.
    – terales
    Nov 17 at 9:34












  • Just got a confirmation: ε ∈ (0;1) in CS class tasks, in my University at least, means that user can specify any input from 0 to 1. So the resulting epsilon would be in an expected $10^{-d}$ format.
    – terales
    Nov 17 at 12:00
















  • 1




    I'm not sure what you did above , but in the limit part that's wrong: it cannot be that the limit when $;ktoinfty;$ is something were $;k;$ appears... Also that...sign...like epsilon or something at the end of your first line: what is that in $;(0,1);$ ?
    – DonAntonio
    Nov 16 at 22:20












  • What you need to do is determine how large is the $k$th term for the particular $x$. For example, pick the upper bound of your interval $x=5$. Let's say you measure precision in the number of correct decimal digits. Then you need to pick some $d$ and find $k$ such that $$frac{k^2 5^k}{(k+1)!}< 10^{-d}$$ Then you can say that you need at least $k$ terms to get $d$ digits. Obviously, we should be using partial sums instead of a single term, but your series converges fast as factorials overtake the powers. So this bound should be a good start
    – Yuriy S
    Nov 16 at 22:27










  • And whatever you did with the limit is wrong as DonAntonio pointed out. What were you trying to do?
    – Yuriy S
    Nov 16 at 22:28










  • Thanks a lot for your input, @DonAntonio and Yuriy S! I would clarify the epsilon meaning with my professor because I was assuming that it's just my lack of knowledge about precisions in math (because I only know about $10^{-n}$ type of notations. • • • I've naively tried a limit because the series is convergent, so I was thinking that sum and limit notations are the same. I get that this was wrong assumption.
    – terales
    Nov 17 at 9:34












  • Just got a confirmation: ε ∈ (0;1) in CS class tasks, in my University at least, means that user can specify any input from 0 to 1. So the resulting epsilon would be in an expected $10^{-d}$ format.
    – terales
    Nov 17 at 12:00










1




1




I'm not sure what you did above , but in the limit part that's wrong: it cannot be that the limit when $;ktoinfty;$ is something were $;k;$ appears... Also that...sign...like epsilon or something at the end of your first line: what is that in $;(0,1);$ ?
– DonAntonio
Nov 16 at 22:20






I'm not sure what you did above , but in the limit part that's wrong: it cannot be that the limit when $;ktoinfty;$ is something were $;k;$ appears... Also that...sign...like epsilon or something at the end of your first line: what is that in $;(0,1);$ ?
– DonAntonio
Nov 16 at 22:20














What you need to do is determine how large is the $k$th term for the particular $x$. For example, pick the upper bound of your interval $x=5$. Let's say you measure precision in the number of correct decimal digits. Then you need to pick some $d$ and find $k$ such that $$frac{k^2 5^k}{(k+1)!}< 10^{-d}$$ Then you can say that you need at least $k$ terms to get $d$ digits. Obviously, we should be using partial sums instead of a single term, but your series converges fast as factorials overtake the powers. So this bound should be a good start
– Yuriy S
Nov 16 at 22:27




What you need to do is determine how large is the $k$th term for the particular $x$. For example, pick the upper bound of your interval $x=5$. Let's say you measure precision in the number of correct decimal digits. Then you need to pick some $d$ and find $k$ such that $$frac{k^2 5^k}{(k+1)!}< 10^{-d}$$ Then you can say that you need at least $k$ terms to get $d$ digits. Obviously, we should be using partial sums instead of a single term, but your series converges fast as factorials overtake the powers. So this bound should be a good start
– Yuriy S
Nov 16 at 22:27












And whatever you did with the limit is wrong as DonAntonio pointed out. What were you trying to do?
– Yuriy S
Nov 16 at 22:28




And whatever you did with the limit is wrong as DonAntonio pointed out. What were you trying to do?
– Yuriy S
Nov 16 at 22:28












Thanks a lot for your input, @DonAntonio and Yuriy S! I would clarify the epsilon meaning with my professor because I was assuming that it's just my lack of knowledge about precisions in math (because I only know about $10^{-n}$ type of notations. • • • I've naively tried a limit because the series is convergent, so I was thinking that sum and limit notations are the same. I get that this was wrong assumption.
– terales
Nov 17 at 9:34






Thanks a lot for your input, @DonAntonio and Yuriy S! I would clarify the epsilon meaning with my professor because I was assuming that it's just my lack of knowledge about precisions in math (because I only know about $10^{-n}$ type of notations. • • • I've naively tried a limit because the series is convergent, so I was thinking that sum and limit notations are the same. I get that this was wrong assumption.
– terales
Nov 17 at 9:34














Just got a confirmation: ε ∈ (0;1) in CS class tasks, in my University at least, means that user can specify any input from 0 to 1. So the resulting epsilon would be in an expected $10^{-d}$ format.
– terales
Nov 17 at 12:00






Just got a confirmation: ε ∈ (0;1) in CS class tasks, in my University at least, means that user can specify any input from 0 to 1. So the resulting epsilon would be in an expected $10^{-d}$ format.
– terales
Nov 17 at 12:00












3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










$$
begin{align}
sum_{k=0}^inftyfrac{k^2x^k}{(k+1)!}
&=sum_{k=0}^inftyfrac{((k+1)k-(k+1)+1),x^k}{(k+1)!}tag1\
&=sum_{k=1}^inftyfrac{x^k}{(k-1)!}-sum_{k=0}^inftyfrac{x^k}{k!}+sum_{k=0}^inftyfrac{x^k}{(k+1)!}tag2\
&=xsum_{k=0}^inftyfrac{x^k}{k!}-sum_{k=0}^inftyfrac{x^k}{k!}+frac1xleft(sum_{k=0}^inftyfrac{x^k}{k!}-1right)tag3\
&=(x-1)e^x+frac{e^x-1}xtag4\[3pt]
&=frac{(x^3+1)e^x-(x+1)}{x(x+1)}tag5
end{align}
$$

Explanation:
$(1)$: $k^2=(k+1)k-(k+1)+1$
$(2)$: cancel numerators and denominators
$phantom{text{(2):}}$ since $(k+1)k=0$ when $k=0$, we can remove the $k=0$ term from the first sum
$(3)$: substitute $kmapsto k+1$ in the first sum and $kmapsto k-1$ in the last sum
$(4)$: recognize the series for $e^x$
$(5)$: simplify the fraction






share|cite|improve this answer





















  • I had the big pleasure to show again your beautiful approximation. Cheers.
    – Claude Leibovici
    Nov 18 at 3:58










  • So interesting that your final answer is exactly that of mine, yet you are complaining me..........
    – Mostafa Ayaz
    Nov 18 at 20:40










  • Oh God, so results are the same? Is it possible to get rid of $x^3+1$?
    – terales
    Nov 18 at 20:46










  • @MostafaAyaz: your answer was not correct until you edited it. Now that you've added the $-frac1x$, it matches my answer.
    – robjohn
    Nov 18 at 20:57






  • 1




    @terales: Both $(4)$ and $(5)$ are complete answers. $(4)$ is nice in that the limit as $xto0$ can be seen more easily. $(5)$ is nice in that it is a bit cleaner. However, my answer is not the same as Mostafa Ayaz's answer before he corrected it.
    – robjohn
    Nov 18 at 21:00




















up vote
2
down vote













$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}{\=sum_{k=0}^∞ frac{(k^2+k)x^k}{(k+1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=sum_{k=1}^∞ frac{x^k}{(k-1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=xe^x-sum_{k=0}^∞ frac{kx^k}{(k+1)!}}$$also $$sum_{k=0}^∞ frac{kx^k}{(k+1)!}=sum_{k=0}^∞ frac{x^k}{k!}-sum_{k=0}^∞ frac{x^k}{(k+1)!}=e^x-sum_{k=0}^∞ frac{x^{k+1}}{x(k+1)!}=e^x-{1over x}(e^x-1)$$therefore $$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}=e^x(x-1+{1over x})-{1over x}$$






share|cite|improve this answer























  • Wow, thanks! It took me 30 mins to understand tricks with $k^2=k^2 + k-k$, $x^k=x×x^{k-1}$ and $kx^k=(k+1)x^k-x^k$. Now I see how beautiful your solution is!
    – terales
    Nov 17 at 9:38












  • I'm happy if it could help you!
    – Mostafa Ayaz
    Nov 17 at 14:39






  • 1




    Notice that the series converges to $0$ at $x=0$, but $e^x!left(x-1-frac1xright)$ blows up.
    – robjohn
    Nov 17 at 15:07




















up vote
2
down vote













I had very serious mistakes in my answer. Trying to fix them now.



After Yuriy S's comment, if you need to find $k$ such that
$$frac{k^2, x^k}{(k+1)!}< 10^{-d} tag 1$$
Since $$frac{k^2}{(k+1)!}=frac k{k+1} frac 1 {(k-1)!}sim frac 1 {(k-1)!}$$
we can approximate $(1)$ by equation
$$(k-1)! = ( x,{10^d}),x^{k-1}$$ or, simpler,
$$n!= (x,10^d), x^n qquad text{where }qquad n=k-1$$ If you look at this question of mine, you will see a magnificent approximation of the inverse factorial function which was proposed by @robjohn.



Applied to this case, this would give
$$color{blue} { ksim e, x,e^{W(t)}+frac 12} qquad text{where }qquad color{blue} {t=frac {log left(frac{x, 10^{2 d}}{2 pi }right) } {2e x }}tag 2$$ where appears $W(.)$ which is Lambert function.



Let us try for a few values of $x$ and $d$. The next table reports in the real domain the value given by the approximation $(2)$ as well as the exact solution of $(1)$. You just need to use the next integer.
$$left(
begin{array}{ccc}
x & d & text{approximation} & text{exact} \
1 & 4 & 8.33367 & 8.28080 \
1 & 5 & 9.41743 & 9.37320 \
1 & 6 & 10.4438 & 10.4056 \
1 & 7 & 11.4258 & 11.3922 \
1 & 8 & 12.3721 & 12.3420 \
1 & 9 & 13.2888 & 13.2615 \
& & & \
2 & 4 & 12.0127 & 11.9689 \
2 & 5 & 13.2892 & 13.2517 \
2 & 6 & 14.5002 & 14.4674 \
2 & 7 & 15.6595 & 15.6302 \
2 & 8 & 16.7765 & 16.7500 \
2 & 9 & 17.8579 & 17.8338 \
& & & \
3 & 4 & 15.3123 & 15.2744 \
3 & 5 & 16.7140 & 16.6810 \
3 & 6 & 18.0471 & 18.0178 \
3 & 7 & 19.3250 & 19.2987 \
3 & 8 & 20.5572 & 20.5333 \
3 & 9 & 21.7508 & 21.7288 \
& & & \
4 & 4 & 18.4409 & 18.4071 \
4 & 5 & 19.9348 & 19.9051 \
4 & 6 & 21.3592 & 21.3326 \
4 & 7 & 22.7268 & 22.7028 \
4 & 8 & 24.0470 & 24.0250 \
4 & 9 & 25.3267 & 25.3063 \
& & & \
5 & 4 & 21.4717 & 21.4412 \
5 & 5 & 23.0379 & 23.0108 \
5 & 6 & 24.5347 & 24.5104 \
5 & 7 & 25.9744 & 25.9521 \
5 & 8 & 27.3656 & 27.3452 \
5 & 9 & 28.7152 & 28.6963
end{array}
right)$$






share|cite|improve this answer























  • Thanks for an answer! I can't get "assume that k is large and reduce the problem to…" part. $k$ seems to be less than 1000 for a precision of 4 digits, isn't it?
    – terales
    Nov 17 at 9:57






  • 1




    @terales. In fact, it is a typo ! $k$ does not need to be large at all. I shall edit now. Cheers.
    – Claude Leibovici
    Nov 17 at 10:23






  • 1




    @terales. $frac{k^2}{(k+1)!}=frac k {k+1} times frac{1}{(k-1)!}approx frac{1}{(k-1)!}$
    – Claude Leibovici
    Nov 18 at 4:01










  • Wow, how elegant it is! Thanks a lot for your comment from the real math side!
    – terales
    Nov 18 at 18:13













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',
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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3001698%2fcalculate-an-infinite-series-by-computer-get-sum-and-number-of-terms-for-given%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










$$
begin{align}
sum_{k=0}^inftyfrac{k^2x^k}{(k+1)!}
&=sum_{k=0}^inftyfrac{((k+1)k-(k+1)+1),x^k}{(k+1)!}tag1\
&=sum_{k=1}^inftyfrac{x^k}{(k-1)!}-sum_{k=0}^inftyfrac{x^k}{k!}+sum_{k=0}^inftyfrac{x^k}{(k+1)!}tag2\
&=xsum_{k=0}^inftyfrac{x^k}{k!}-sum_{k=0}^inftyfrac{x^k}{k!}+frac1xleft(sum_{k=0}^inftyfrac{x^k}{k!}-1right)tag3\
&=(x-1)e^x+frac{e^x-1}xtag4\[3pt]
&=frac{(x^3+1)e^x-(x+1)}{x(x+1)}tag5
end{align}
$$

Explanation:
$(1)$: $k^2=(k+1)k-(k+1)+1$
$(2)$: cancel numerators and denominators
$phantom{text{(2):}}$ since $(k+1)k=0$ when $k=0$, we can remove the $k=0$ term from the first sum
$(3)$: substitute $kmapsto k+1$ in the first sum and $kmapsto k-1$ in the last sum
$(4)$: recognize the series for $e^x$
$(5)$: simplify the fraction






share|cite|improve this answer





















  • I had the big pleasure to show again your beautiful approximation. Cheers.
    – Claude Leibovici
    Nov 18 at 3:58










  • So interesting that your final answer is exactly that of mine, yet you are complaining me..........
    – Mostafa Ayaz
    Nov 18 at 20:40










  • Oh God, so results are the same? Is it possible to get rid of $x^3+1$?
    – terales
    Nov 18 at 20:46










  • @MostafaAyaz: your answer was not correct until you edited it. Now that you've added the $-frac1x$, it matches my answer.
    – robjohn
    Nov 18 at 20:57






  • 1




    @terales: Both $(4)$ and $(5)$ are complete answers. $(4)$ is nice in that the limit as $xto0$ can be seen more easily. $(5)$ is nice in that it is a bit cleaner. However, my answer is not the same as Mostafa Ayaz's answer before he corrected it.
    – robjohn
    Nov 18 at 21:00

















up vote
1
down vote



accepted










$$
begin{align}
sum_{k=0}^inftyfrac{k^2x^k}{(k+1)!}
&=sum_{k=0}^inftyfrac{((k+1)k-(k+1)+1),x^k}{(k+1)!}tag1\
&=sum_{k=1}^inftyfrac{x^k}{(k-1)!}-sum_{k=0}^inftyfrac{x^k}{k!}+sum_{k=0}^inftyfrac{x^k}{(k+1)!}tag2\
&=xsum_{k=0}^inftyfrac{x^k}{k!}-sum_{k=0}^inftyfrac{x^k}{k!}+frac1xleft(sum_{k=0}^inftyfrac{x^k}{k!}-1right)tag3\
&=(x-1)e^x+frac{e^x-1}xtag4\[3pt]
&=frac{(x^3+1)e^x-(x+1)}{x(x+1)}tag5
end{align}
$$

Explanation:
$(1)$: $k^2=(k+1)k-(k+1)+1$
$(2)$: cancel numerators and denominators
$phantom{text{(2):}}$ since $(k+1)k=0$ when $k=0$, we can remove the $k=0$ term from the first sum
$(3)$: substitute $kmapsto k+1$ in the first sum and $kmapsto k-1$ in the last sum
$(4)$: recognize the series for $e^x$
$(5)$: simplify the fraction






share|cite|improve this answer





















  • I had the big pleasure to show again your beautiful approximation. Cheers.
    – Claude Leibovici
    Nov 18 at 3:58










  • So interesting that your final answer is exactly that of mine, yet you are complaining me..........
    – Mostafa Ayaz
    Nov 18 at 20:40










  • Oh God, so results are the same? Is it possible to get rid of $x^3+1$?
    – terales
    Nov 18 at 20:46










  • @MostafaAyaz: your answer was not correct until you edited it. Now that you've added the $-frac1x$, it matches my answer.
    – robjohn
    Nov 18 at 20:57






  • 1




    @terales: Both $(4)$ and $(5)$ are complete answers. $(4)$ is nice in that the limit as $xto0$ can be seen more easily. $(5)$ is nice in that it is a bit cleaner. However, my answer is not the same as Mostafa Ayaz's answer before he corrected it.
    – robjohn
    Nov 18 at 21:00















up vote
1
down vote



accepted







up vote
1
down vote



accepted






$$
begin{align}
sum_{k=0}^inftyfrac{k^2x^k}{(k+1)!}
&=sum_{k=0}^inftyfrac{((k+1)k-(k+1)+1),x^k}{(k+1)!}tag1\
&=sum_{k=1}^inftyfrac{x^k}{(k-1)!}-sum_{k=0}^inftyfrac{x^k}{k!}+sum_{k=0}^inftyfrac{x^k}{(k+1)!}tag2\
&=xsum_{k=0}^inftyfrac{x^k}{k!}-sum_{k=0}^inftyfrac{x^k}{k!}+frac1xleft(sum_{k=0}^inftyfrac{x^k}{k!}-1right)tag3\
&=(x-1)e^x+frac{e^x-1}xtag4\[3pt]
&=frac{(x^3+1)e^x-(x+1)}{x(x+1)}tag5
end{align}
$$

Explanation:
$(1)$: $k^2=(k+1)k-(k+1)+1$
$(2)$: cancel numerators and denominators
$phantom{text{(2):}}$ since $(k+1)k=0$ when $k=0$, we can remove the $k=0$ term from the first sum
$(3)$: substitute $kmapsto k+1$ in the first sum and $kmapsto k-1$ in the last sum
$(4)$: recognize the series for $e^x$
$(5)$: simplify the fraction






share|cite|improve this answer












$$
begin{align}
sum_{k=0}^inftyfrac{k^2x^k}{(k+1)!}
&=sum_{k=0}^inftyfrac{((k+1)k-(k+1)+1),x^k}{(k+1)!}tag1\
&=sum_{k=1}^inftyfrac{x^k}{(k-1)!}-sum_{k=0}^inftyfrac{x^k}{k!}+sum_{k=0}^inftyfrac{x^k}{(k+1)!}tag2\
&=xsum_{k=0}^inftyfrac{x^k}{k!}-sum_{k=0}^inftyfrac{x^k}{k!}+frac1xleft(sum_{k=0}^inftyfrac{x^k}{k!}-1right)tag3\
&=(x-1)e^x+frac{e^x-1}xtag4\[3pt]
&=frac{(x^3+1)e^x-(x+1)}{x(x+1)}tag5
end{align}
$$

Explanation:
$(1)$: $k^2=(k+1)k-(k+1)+1$
$(2)$: cancel numerators and denominators
$phantom{text{(2):}}$ since $(k+1)k=0$ when $k=0$, we can remove the $k=0$ term from the first sum
$(3)$: substitute $kmapsto k+1$ in the first sum and $kmapsto k-1$ in the last sum
$(4)$: recognize the series for $e^x$
$(5)$: simplify the fraction







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Nov 17 at 15:06









robjohn

263k27301621




263k27301621












  • I had the big pleasure to show again your beautiful approximation. Cheers.
    – Claude Leibovici
    Nov 18 at 3:58










  • So interesting that your final answer is exactly that of mine, yet you are complaining me..........
    – Mostafa Ayaz
    Nov 18 at 20:40










  • Oh God, so results are the same? Is it possible to get rid of $x^3+1$?
    – terales
    Nov 18 at 20:46










  • @MostafaAyaz: your answer was not correct until you edited it. Now that you've added the $-frac1x$, it matches my answer.
    – robjohn
    Nov 18 at 20:57






  • 1




    @terales: Both $(4)$ and $(5)$ are complete answers. $(4)$ is nice in that the limit as $xto0$ can be seen more easily. $(5)$ is nice in that it is a bit cleaner. However, my answer is not the same as Mostafa Ayaz's answer before he corrected it.
    – robjohn
    Nov 18 at 21:00




















  • I had the big pleasure to show again your beautiful approximation. Cheers.
    – Claude Leibovici
    Nov 18 at 3:58










  • So interesting that your final answer is exactly that of mine, yet you are complaining me..........
    – Mostafa Ayaz
    Nov 18 at 20:40










  • Oh God, so results are the same? Is it possible to get rid of $x^3+1$?
    – terales
    Nov 18 at 20:46










  • @MostafaAyaz: your answer was not correct until you edited it. Now that you've added the $-frac1x$, it matches my answer.
    – robjohn
    Nov 18 at 20:57






  • 1




    @terales: Both $(4)$ and $(5)$ are complete answers. $(4)$ is nice in that the limit as $xto0$ can be seen more easily. $(5)$ is nice in that it is a bit cleaner. However, my answer is not the same as Mostafa Ayaz's answer before he corrected it.
    – robjohn
    Nov 18 at 21:00


















I had the big pleasure to show again your beautiful approximation. Cheers.
– Claude Leibovici
Nov 18 at 3:58




I had the big pleasure to show again your beautiful approximation. Cheers.
– Claude Leibovici
Nov 18 at 3:58












So interesting that your final answer is exactly that of mine, yet you are complaining me..........
– Mostafa Ayaz
Nov 18 at 20:40




So interesting that your final answer is exactly that of mine, yet you are complaining me..........
– Mostafa Ayaz
Nov 18 at 20:40












Oh God, so results are the same? Is it possible to get rid of $x^3+1$?
– terales
Nov 18 at 20:46




Oh God, so results are the same? Is it possible to get rid of $x^3+1$?
– terales
Nov 18 at 20:46












@MostafaAyaz: your answer was not correct until you edited it. Now that you've added the $-frac1x$, it matches my answer.
– robjohn
Nov 18 at 20:57




@MostafaAyaz: your answer was not correct until you edited it. Now that you've added the $-frac1x$, it matches my answer.
– robjohn
Nov 18 at 20:57




1




1




@terales: Both $(4)$ and $(5)$ are complete answers. $(4)$ is nice in that the limit as $xto0$ can be seen more easily. $(5)$ is nice in that it is a bit cleaner. However, my answer is not the same as Mostafa Ayaz's answer before he corrected it.
– robjohn
Nov 18 at 21:00






@terales: Both $(4)$ and $(5)$ are complete answers. $(4)$ is nice in that the limit as $xto0$ can be seen more easily. $(5)$ is nice in that it is a bit cleaner. However, my answer is not the same as Mostafa Ayaz's answer before he corrected it.
– robjohn
Nov 18 at 21:00












up vote
2
down vote













$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}{\=sum_{k=0}^∞ frac{(k^2+k)x^k}{(k+1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=sum_{k=1}^∞ frac{x^k}{(k-1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=xe^x-sum_{k=0}^∞ frac{kx^k}{(k+1)!}}$$also $$sum_{k=0}^∞ frac{kx^k}{(k+1)!}=sum_{k=0}^∞ frac{x^k}{k!}-sum_{k=0}^∞ frac{x^k}{(k+1)!}=e^x-sum_{k=0}^∞ frac{x^{k+1}}{x(k+1)!}=e^x-{1over x}(e^x-1)$$therefore $$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}=e^x(x-1+{1over x})-{1over x}$$






share|cite|improve this answer























  • Wow, thanks! It took me 30 mins to understand tricks with $k^2=k^2 + k-k$, $x^k=x×x^{k-1}$ and $kx^k=(k+1)x^k-x^k$. Now I see how beautiful your solution is!
    – terales
    Nov 17 at 9:38












  • I'm happy if it could help you!
    – Mostafa Ayaz
    Nov 17 at 14:39






  • 1




    Notice that the series converges to $0$ at $x=0$, but $e^x!left(x-1-frac1xright)$ blows up.
    – robjohn
    Nov 17 at 15:07

















up vote
2
down vote













$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}{\=sum_{k=0}^∞ frac{(k^2+k)x^k}{(k+1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=sum_{k=1}^∞ frac{x^k}{(k-1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=xe^x-sum_{k=0}^∞ frac{kx^k}{(k+1)!}}$$also $$sum_{k=0}^∞ frac{kx^k}{(k+1)!}=sum_{k=0}^∞ frac{x^k}{k!}-sum_{k=0}^∞ frac{x^k}{(k+1)!}=e^x-sum_{k=0}^∞ frac{x^{k+1}}{x(k+1)!}=e^x-{1over x}(e^x-1)$$therefore $$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}=e^x(x-1+{1over x})-{1over x}$$






share|cite|improve this answer























  • Wow, thanks! It took me 30 mins to understand tricks with $k^2=k^2 + k-k$, $x^k=x×x^{k-1}$ and $kx^k=(k+1)x^k-x^k$. Now I see how beautiful your solution is!
    – terales
    Nov 17 at 9:38












  • I'm happy if it could help you!
    – Mostafa Ayaz
    Nov 17 at 14:39






  • 1




    Notice that the series converges to $0$ at $x=0$, but $e^x!left(x-1-frac1xright)$ blows up.
    – robjohn
    Nov 17 at 15:07















up vote
2
down vote










up vote
2
down vote









$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}{\=sum_{k=0}^∞ frac{(k^2+k)x^k}{(k+1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=sum_{k=1}^∞ frac{x^k}{(k-1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=xe^x-sum_{k=0}^∞ frac{kx^k}{(k+1)!}}$$also $$sum_{k=0}^∞ frac{kx^k}{(k+1)!}=sum_{k=0}^∞ frac{x^k}{k!}-sum_{k=0}^∞ frac{x^k}{(k+1)!}=e^x-sum_{k=0}^∞ frac{x^{k+1}}{x(k+1)!}=e^x-{1over x}(e^x-1)$$therefore $$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}=e^x(x-1+{1over x})-{1over x}$$






share|cite|improve this answer














$$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}{\=sum_{k=0}^∞ frac{(k^2+k)x^k}{(k+1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=sum_{k=1}^∞ frac{x^k}{(k-1)!}-sum_{k=0}^∞ frac{kx^k}{(k+1)!}\=xe^x-sum_{k=0}^∞ frac{kx^k}{(k+1)!}}$$also $$sum_{k=0}^∞ frac{kx^k}{(k+1)!}=sum_{k=0}^∞ frac{x^k}{k!}-sum_{k=0}^∞ frac{x^k}{(k+1)!}=e^x-sum_{k=0}^∞ frac{x^{k+1}}{x(k+1)!}=e^x-{1over x}(e^x-1)$$therefore $$sum_{k=0}^∞ frac{k^2x^k}{(k+1)!}=e^x(x-1+{1over x})-{1over x}$$







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Nov 18 at 20:40

























answered Nov 16 at 23:04









Mostafa Ayaz

12.5k3733




12.5k3733












  • Wow, thanks! It took me 30 mins to understand tricks with $k^2=k^2 + k-k$, $x^k=x×x^{k-1}$ and $kx^k=(k+1)x^k-x^k$. Now I see how beautiful your solution is!
    – terales
    Nov 17 at 9:38












  • I'm happy if it could help you!
    – Mostafa Ayaz
    Nov 17 at 14:39






  • 1




    Notice that the series converges to $0$ at $x=0$, but $e^x!left(x-1-frac1xright)$ blows up.
    – robjohn
    Nov 17 at 15:07




















  • Wow, thanks! It took me 30 mins to understand tricks with $k^2=k^2 + k-k$, $x^k=x×x^{k-1}$ and $kx^k=(k+1)x^k-x^k$. Now I see how beautiful your solution is!
    – terales
    Nov 17 at 9:38












  • I'm happy if it could help you!
    – Mostafa Ayaz
    Nov 17 at 14:39






  • 1




    Notice that the series converges to $0$ at $x=0$, but $e^x!left(x-1-frac1xright)$ blows up.
    – robjohn
    Nov 17 at 15:07


















Wow, thanks! It took me 30 mins to understand tricks with $k^2=k^2 + k-k$, $x^k=x×x^{k-1}$ and $kx^k=(k+1)x^k-x^k$. Now I see how beautiful your solution is!
– terales
Nov 17 at 9:38






Wow, thanks! It took me 30 mins to understand tricks with $k^2=k^2 + k-k$, $x^k=x×x^{k-1}$ and $kx^k=(k+1)x^k-x^k$. Now I see how beautiful your solution is!
– terales
Nov 17 at 9:38














I'm happy if it could help you!
– Mostafa Ayaz
Nov 17 at 14:39




I'm happy if it could help you!
– Mostafa Ayaz
Nov 17 at 14:39




1




1




Notice that the series converges to $0$ at $x=0$, but $e^x!left(x-1-frac1xright)$ blows up.
– robjohn
Nov 17 at 15:07






Notice that the series converges to $0$ at $x=0$, but $e^x!left(x-1-frac1xright)$ blows up.
– robjohn
Nov 17 at 15:07












up vote
2
down vote













I had very serious mistakes in my answer. Trying to fix them now.



After Yuriy S's comment, if you need to find $k$ such that
$$frac{k^2, x^k}{(k+1)!}< 10^{-d} tag 1$$
Since $$frac{k^2}{(k+1)!}=frac k{k+1} frac 1 {(k-1)!}sim frac 1 {(k-1)!}$$
we can approximate $(1)$ by equation
$$(k-1)! = ( x,{10^d}),x^{k-1}$$ or, simpler,
$$n!= (x,10^d), x^n qquad text{where }qquad n=k-1$$ If you look at this question of mine, you will see a magnificent approximation of the inverse factorial function which was proposed by @robjohn.



Applied to this case, this would give
$$color{blue} { ksim e, x,e^{W(t)}+frac 12} qquad text{where }qquad color{blue} {t=frac {log left(frac{x, 10^{2 d}}{2 pi }right) } {2e x }}tag 2$$ where appears $W(.)$ which is Lambert function.



Let us try for a few values of $x$ and $d$. The next table reports in the real domain the value given by the approximation $(2)$ as well as the exact solution of $(1)$. You just need to use the next integer.
$$left(
begin{array}{ccc}
x & d & text{approximation} & text{exact} \
1 & 4 & 8.33367 & 8.28080 \
1 & 5 & 9.41743 & 9.37320 \
1 & 6 & 10.4438 & 10.4056 \
1 & 7 & 11.4258 & 11.3922 \
1 & 8 & 12.3721 & 12.3420 \
1 & 9 & 13.2888 & 13.2615 \
& & & \
2 & 4 & 12.0127 & 11.9689 \
2 & 5 & 13.2892 & 13.2517 \
2 & 6 & 14.5002 & 14.4674 \
2 & 7 & 15.6595 & 15.6302 \
2 & 8 & 16.7765 & 16.7500 \
2 & 9 & 17.8579 & 17.8338 \
& & & \
3 & 4 & 15.3123 & 15.2744 \
3 & 5 & 16.7140 & 16.6810 \
3 & 6 & 18.0471 & 18.0178 \
3 & 7 & 19.3250 & 19.2987 \
3 & 8 & 20.5572 & 20.5333 \
3 & 9 & 21.7508 & 21.7288 \
& & & \
4 & 4 & 18.4409 & 18.4071 \
4 & 5 & 19.9348 & 19.9051 \
4 & 6 & 21.3592 & 21.3326 \
4 & 7 & 22.7268 & 22.7028 \
4 & 8 & 24.0470 & 24.0250 \
4 & 9 & 25.3267 & 25.3063 \
& & & \
5 & 4 & 21.4717 & 21.4412 \
5 & 5 & 23.0379 & 23.0108 \
5 & 6 & 24.5347 & 24.5104 \
5 & 7 & 25.9744 & 25.9521 \
5 & 8 & 27.3656 & 27.3452 \
5 & 9 & 28.7152 & 28.6963
end{array}
right)$$






share|cite|improve this answer























  • Thanks for an answer! I can't get "assume that k is large and reduce the problem to…" part. $k$ seems to be less than 1000 for a precision of 4 digits, isn't it?
    – terales
    Nov 17 at 9:57






  • 1




    @terales. In fact, it is a typo ! $k$ does not need to be large at all. I shall edit now. Cheers.
    – Claude Leibovici
    Nov 17 at 10:23






  • 1




    @terales. $frac{k^2}{(k+1)!}=frac k {k+1} times frac{1}{(k-1)!}approx frac{1}{(k-1)!}$
    – Claude Leibovici
    Nov 18 at 4:01










  • Wow, how elegant it is! Thanks a lot for your comment from the real math side!
    – terales
    Nov 18 at 18:13

















up vote
2
down vote













I had very serious mistakes in my answer. Trying to fix them now.



After Yuriy S's comment, if you need to find $k$ such that
$$frac{k^2, x^k}{(k+1)!}< 10^{-d} tag 1$$
Since $$frac{k^2}{(k+1)!}=frac k{k+1} frac 1 {(k-1)!}sim frac 1 {(k-1)!}$$
we can approximate $(1)$ by equation
$$(k-1)! = ( x,{10^d}),x^{k-1}$$ or, simpler,
$$n!= (x,10^d), x^n qquad text{where }qquad n=k-1$$ If you look at this question of mine, you will see a magnificent approximation of the inverse factorial function which was proposed by @robjohn.



Applied to this case, this would give
$$color{blue} { ksim e, x,e^{W(t)}+frac 12} qquad text{where }qquad color{blue} {t=frac {log left(frac{x, 10^{2 d}}{2 pi }right) } {2e x }}tag 2$$ where appears $W(.)$ which is Lambert function.



Let us try for a few values of $x$ and $d$. The next table reports in the real domain the value given by the approximation $(2)$ as well as the exact solution of $(1)$. You just need to use the next integer.
$$left(
begin{array}{ccc}
x & d & text{approximation} & text{exact} \
1 & 4 & 8.33367 & 8.28080 \
1 & 5 & 9.41743 & 9.37320 \
1 & 6 & 10.4438 & 10.4056 \
1 & 7 & 11.4258 & 11.3922 \
1 & 8 & 12.3721 & 12.3420 \
1 & 9 & 13.2888 & 13.2615 \
& & & \
2 & 4 & 12.0127 & 11.9689 \
2 & 5 & 13.2892 & 13.2517 \
2 & 6 & 14.5002 & 14.4674 \
2 & 7 & 15.6595 & 15.6302 \
2 & 8 & 16.7765 & 16.7500 \
2 & 9 & 17.8579 & 17.8338 \
& & & \
3 & 4 & 15.3123 & 15.2744 \
3 & 5 & 16.7140 & 16.6810 \
3 & 6 & 18.0471 & 18.0178 \
3 & 7 & 19.3250 & 19.2987 \
3 & 8 & 20.5572 & 20.5333 \
3 & 9 & 21.7508 & 21.7288 \
& & & \
4 & 4 & 18.4409 & 18.4071 \
4 & 5 & 19.9348 & 19.9051 \
4 & 6 & 21.3592 & 21.3326 \
4 & 7 & 22.7268 & 22.7028 \
4 & 8 & 24.0470 & 24.0250 \
4 & 9 & 25.3267 & 25.3063 \
& & & \
5 & 4 & 21.4717 & 21.4412 \
5 & 5 & 23.0379 & 23.0108 \
5 & 6 & 24.5347 & 24.5104 \
5 & 7 & 25.9744 & 25.9521 \
5 & 8 & 27.3656 & 27.3452 \
5 & 9 & 28.7152 & 28.6963
end{array}
right)$$






share|cite|improve this answer























  • Thanks for an answer! I can't get "assume that k is large and reduce the problem to…" part. $k$ seems to be less than 1000 for a precision of 4 digits, isn't it?
    – terales
    Nov 17 at 9:57






  • 1




    @terales. In fact, it is a typo ! $k$ does not need to be large at all. I shall edit now. Cheers.
    – Claude Leibovici
    Nov 17 at 10:23






  • 1




    @terales. $frac{k^2}{(k+1)!}=frac k {k+1} times frac{1}{(k-1)!}approx frac{1}{(k-1)!}$
    – Claude Leibovici
    Nov 18 at 4:01










  • Wow, how elegant it is! Thanks a lot for your comment from the real math side!
    – terales
    Nov 18 at 18:13















up vote
2
down vote










up vote
2
down vote









I had very serious mistakes in my answer. Trying to fix them now.



After Yuriy S's comment, if you need to find $k$ such that
$$frac{k^2, x^k}{(k+1)!}< 10^{-d} tag 1$$
Since $$frac{k^2}{(k+1)!}=frac k{k+1} frac 1 {(k-1)!}sim frac 1 {(k-1)!}$$
we can approximate $(1)$ by equation
$$(k-1)! = ( x,{10^d}),x^{k-1}$$ or, simpler,
$$n!= (x,10^d), x^n qquad text{where }qquad n=k-1$$ If you look at this question of mine, you will see a magnificent approximation of the inverse factorial function which was proposed by @robjohn.



Applied to this case, this would give
$$color{blue} { ksim e, x,e^{W(t)}+frac 12} qquad text{where }qquad color{blue} {t=frac {log left(frac{x, 10^{2 d}}{2 pi }right) } {2e x }}tag 2$$ where appears $W(.)$ which is Lambert function.



Let us try for a few values of $x$ and $d$. The next table reports in the real domain the value given by the approximation $(2)$ as well as the exact solution of $(1)$. You just need to use the next integer.
$$left(
begin{array}{ccc}
x & d & text{approximation} & text{exact} \
1 & 4 & 8.33367 & 8.28080 \
1 & 5 & 9.41743 & 9.37320 \
1 & 6 & 10.4438 & 10.4056 \
1 & 7 & 11.4258 & 11.3922 \
1 & 8 & 12.3721 & 12.3420 \
1 & 9 & 13.2888 & 13.2615 \
& & & \
2 & 4 & 12.0127 & 11.9689 \
2 & 5 & 13.2892 & 13.2517 \
2 & 6 & 14.5002 & 14.4674 \
2 & 7 & 15.6595 & 15.6302 \
2 & 8 & 16.7765 & 16.7500 \
2 & 9 & 17.8579 & 17.8338 \
& & & \
3 & 4 & 15.3123 & 15.2744 \
3 & 5 & 16.7140 & 16.6810 \
3 & 6 & 18.0471 & 18.0178 \
3 & 7 & 19.3250 & 19.2987 \
3 & 8 & 20.5572 & 20.5333 \
3 & 9 & 21.7508 & 21.7288 \
& & & \
4 & 4 & 18.4409 & 18.4071 \
4 & 5 & 19.9348 & 19.9051 \
4 & 6 & 21.3592 & 21.3326 \
4 & 7 & 22.7268 & 22.7028 \
4 & 8 & 24.0470 & 24.0250 \
4 & 9 & 25.3267 & 25.3063 \
& & & \
5 & 4 & 21.4717 & 21.4412 \
5 & 5 & 23.0379 & 23.0108 \
5 & 6 & 24.5347 & 24.5104 \
5 & 7 & 25.9744 & 25.9521 \
5 & 8 & 27.3656 & 27.3452 \
5 & 9 & 28.7152 & 28.6963
end{array}
right)$$






share|cite|improve this answer














I had very serious mistakes in my answer. Trying to fix them now.



After Yuriy S's comment, if you need to find $k$ such that
$$frac{k^2, x^k}{(k+1)!}< 10^{-d} tag 1$$
Since $$frac{k^2}{(k+1)!}=frac k{k+1} frac 1 {(k-1)!}sim frac 1 {(k-1)!}$$
we can approximate $(1)$ by equation
$$(k-1)! = ( x,{10^d}),x^{k-1}$$ or, simpler,
$$n!= (x,10^d), x^n qquad text{where }qquad n=k-1$$ If you look at this question of mine, you will see a magnificent approximation of the inverse factorial function which was proposed by @robjohn.



Applied to this case, this would give
$$color{blue} { ksim e, x,e^{W(t)}+frac 12} qquad text{where }qquad color{blue} {t=frac {log left(frac{x, 10^{2 d}}{2 pi }right) } {2e x }}tag 2$$ where appears $W(.)$ which is Lambert function.



Let us try for a few values of $x$ and $d$. The next table reports in the real domain the value given by the approximation $(2)$ as well as the exact solution of $(1)$. You just need to use the next integer.
$$left(
begin{array}{ccc}
x & d & text{approximation} & text{exact} \
1 & 4 & 8.33367 & 8.28080 \
1 & 5 & 9.41743 & 9.37320 \
1 & 6 & 10.4438 & 10.4056 \
1 & 7 & 11.4258 & 11.3922 \
1 & 8 & 12.3721 & 12.3420 \
1 & 9 & 13.2888 & 13.2615 \
& & & \
2 & 4 & 12.0127 & 11.9689 \
2 & 5 & 13.2892 & 13.2517 \
2 & 6 & 14.5002 & 14.4674 \
2 & 7 & 15.6595 & 15.6302 \
2 & 8 & 16.7765 & 16.7500 \
2 & 9 & 17.8579 & 17.8338 \
& & & \
3 & 4 & 15.3123 & 15.2744 \
3 & 5 & 16.7140 & 16.6810 \
3 & 6 & 18.0471 & 18.0178 \
3 & 7 & 19.3250 & 19.2987 \
3 & 8 & 20.5572 & 20.5333 \
3 & 9 & 21.7508 & 21.7288 \
& & & \
4 & 4 & 18.4409 & 18.4071 \
4 & 5 & 19.9348 & 19.9051 \
4 & 6 & 21.3592 & 21.3326 \
4 & 7 & 22.7268 & 22.7028 \
4 & 8 & 24.0470 & 24.0250 \
4 & 9 & 25.3267 & 25.3063 \
& & & \
5 & 4 & 21.4717 & 21.4412 \
5 & 5 & 23.0379 & 23.0108 \
5 & 6 & 24.5347 & 24.5104 \
5 & 7 & 25.9744 & 25.9521 \
5 & 8 & 27.3656 & 27.3452 \
5 & 9 & 28.7152 & 28.6963
end{array}
right)$$







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Nov 21 at 6:02

























answered Nov 17 at 6:36









Claude Leibovici

116k1156131




116k1156131












  • Thanks for an answer! I can't get "assume that k is large and reduce the problem to…" part. $k$ seems to be less than 1000 for a precision of 4 digits, isn't it?
    – terales
    Nov 17 at 9:57






  • 1




    @terales. In fact, it is a typo ! $k$ does not need to be large at all. I shall edit now. Cheers.
    – Claude Leibovici
    Nov 17 at 10:23






  • 1




    @terales. $frac{k^2}{(k+1)!}=frac k {k+1} times frac{1}{(k-1)!}approx frac{1}{(k-1)!}$
    – Claude Leibovici
    Nov 18 at 4:01










  • Wow, how elegant it is! Thanks a lot for your comment from the real math side!
    – terales
    Nov 18 at 18:13




















  • Thanks for an answer! I can't get "assume that k is large and reduce the problem to…" part. $k$ seems to be less than 1000 for a precision of 4 digits, isn't it?
    – terales
    Nov 17 at 9:57






  • 1




    @terales. In fact, it is a typo ! $k$ does not need to be large at all. I shall edit now. Cheers.
    – Claude Leibovici
    Nov 17 at 10:23






  • 1




    @terales. $frac{k^2}{(k+1)!}=frac k {k+1} times frac{1}{(k-1)!}approx frac{1}{(k-1)!}$
    – Claude Leibovici
    Nov 18 at 4:01










  • Wow, how elegant it is! Thanks a lot for your comment from the real math side!
    – terales
    Nov 18 at 18:13


















Thanks for an answer! I can't get "assume that k is large and reduce the problem to…" part. $k$ seems to be less than 1000 for a precision of 4 digits, isn't it?
– terales
Nov 17 at 9:57




Thanks for an answer! I can't get "assume that k is large and reduce the problem to…" part. $k$ seems to be less than 1000 for a precision of 4 digits, isn't it?
– terales
Nov 17 at 9:57




1




1




@terales. In fact, it is a typo ! $k$ does not need to be large at all. I shall edit now. Cheers.
– Claude Leibovici
Nov 17 at 10:23




@terales. In fact, it is a typo ! $k$ does not need to be large at all. I shall edit now. Cheers.
– Claude Leibovici
Nov 17 at 10:23




1




1




@terales. $frac{k^2}{(k+1)!}=frac k {k+1} times frac{1}{(k-1)!}approx frac{1}{(k-1)!}$
– Claude Leibovici
Nov 18 at 4:01




@terales. $frac{k^2}{(k+1)!}=frac k {k+1} times frac{1}{(k-1)!}approx frac{1}{(k-1)!}$
– Claude Leibovici
Nov 18 at 4:01












Wow, how elegant it is! Thanks a lot for your comment from the real math side!
– terales
Nov 18 at 18:13






Wow, how elegant it is! Thanks a lot for your comment from the real math side!
– terales
Nov 18 at 18:13




















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3001698%2fcalculate-an-infinite-series-by-computer-get-sum-and-number-of-terms-for-given%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Probability when a professor distributes a quiz and homework assignment to a class of n students.

Aardman Animations

Are they similar matrix