I am trying to evaluate this limit without using the closed form expression for the sum of natural numbers raised to $k$th power.  $$\lim_{n \to \infty} \dfrac{ 1^n +2^n+\cdots +n^n}{n^n}$$   So far I have tried l'Hôpital which complicates it rather than simplifying and Cesaro Stolz doesn't seem to work either.
I remember that a couple of years ago a friend showed me and some other people the following expression:  $$\lim_{n\to \infty}\frac{1^n+2^n+\cdots+(n-1)^n}{n^n}.$$  As shown below, I can prove that this limit exists by the monotone convergence theorem. I also remember that my friend gave a very dubious "proof" that the value of the limit is $\frac{1}{e-1}$. I cannot remember the details of the proof, but I am fairly certain that it made the common error of treating $n$ as a variable in some places at some times and as a constant in other places at other times. Nevertheless, numerical analysis suggests that the value my friend gave was correct, even if his methods were flawed. My question is then:  What is the value of this limit and how do we prove it rigorously?  (Also, for bonus points, What might my friend's original proof have been and what exactly was his error, if any?)  I give my convergence proof below in two parts. In both parts, I define the sequence $a_n$ by $a_n=\frac{1^n+2^n+\cdots+(n-1)^n}{n^n}$ for all integers $n\ge 2$. First, I prove that $a_n$ is bounded above by $1$. Second, I prove that $a_n$ is increasing.   (1) The sequence $a_n$ satisfies $a_n&lt;1$ for all $n\ge 2$.  Note that $a_n&lt;1$ is equivalent to $1^n+2^n+\cdots+(n-1)^n&lt;n^n$. I prove this second statement by induction. Observe that $1^2=1&lt;4=2^2$. Now suppose that $1^n+2^n+\cdots+(n-1)^n&lt;n^n$ for some integer $n\ge 2$. Then  $$1^{n+1}+2^{n+1}+\cdots+(n-1)^{n+1}+n^{n+1}\le(n-1)(1^n+2^n+\cdots+(n-1)^n)+n^{n+1}&lt;(n-1)n^n+n^{n+1}&lt;(n+1)n^n+n^{n+1}\le n^{n+1}+(n+1)n^n+\binom{n+1}{2}n^{n-1}+\cdots+1=(n+1)^{n+1}.$$  (2) The sequence $a_n$ is increasing for all $n\ge 2$.  We must first prove the following preliminary proposition. (I'm not sure if "lemma" is appropriate for this.)  (2a) For all integers $n\ge 2$ and $2\le k\le n$, $\left(\frac{k-1}{k}\right)^n\le\left(\frac{k}{k+1}\right)^{n+1}$.  We observe that $k^2-1\le kn$, so upon division by $k(k^2-1)$, we get $\frac{1}{k}\le\frac{n}{k^2-1}$. By , we may find:  $$\frac{k+1}{k}\le 1+\frac{n}{k^2-1}\le\left(1+\frac{1}{k^2-1}\right)^n=\left(\frac{k^2}{k^2-1}\right)^n.$$  A little multiplication and we arrive at $\left(\frac{k-1}{k}\right)^n\le\left(\frac{k}{k+1}\right)^{n+1}$.  We may now first apply this to see that $\left(\frac{n-1}{n}\right)^n\le\left(\frac{n}{n+1}\right)^{n+1}$. Then we suppose that for some integer $2\le k\le n$, we have $\left(\frac{k}{n}\right)^n\le\left(\frac{k+1}{n+1}\right)^{n+1}$. Then:  $$\left(\frac{k-1}{n}\right)^n=\left(\frac{k}{n}\right)^n\left(\frac{k-1}{k}\right)^n\le\left(\frac{k+1}{n+1}\right)^{n+1}\left(\frac{k}{k+1}\right)^{n+1}=\left(\frac{k}{n+1}\right)^{n+1}.$$  By backwards (finite) induction from $n$, we have that $\left(\frac{k}{n}\right)^n\le\left(\frac{k+1}{n+1}\right)^{n+1}$ for all integers $1\le k\le n$, so:  $$a_n=\left(\frac{1}{n}\right)^n+\left(\frac{2}{n}\right)^n+\cdots+\left(\frac{n-1}{n}\right)^n\le\left(\frac{2}{n+1}\right)^{n+1}+\left(\frac{3}{n+1}\right)^{n+1}+\cdots+\left(\frac{n}{n+1}\right)^{n+1}&lt;\left(\frac{1}{n+1}\right)^{n+1}+\left(\frac{2}{n+1}\right)^{n+1}+\left(\frac{3}{n+1}\right)^{n+1}+\cdots+\left(\frac{n}{n+1}\right)^{n+1}=a_{n+1}.$$  (In fact, this proves that $a_n$ is strictly increasing.) By the monotone convergence theorem, $a_n$ converges.  I should note that I am not especially well-practiced in proving these sorts of inequalities, so I may have given a significantly more complicated proof than necessary. If this is the case, feel free to explain in a comment or in your answer. I'd love to get a better grip on these inequalities in addition to finding out what the limit is.  Thanks!
Why do bridge non-Captain officers commonly go on away missions? Ever since the days of Kirk, Spock, and McCoy, bridge officers in Starfleet have always had a prominent role in away team missions.  However, it would seem more logical to me that such hazardous (and, generally, specialized) duties should fall to lower-ranking and/or more dedicated teams.  Of course, it wouldn't have made for great TV if every away team was comprised of a bunch of red-shirts.  And it would definitely increase the show's budget to have an extra group of main characters whose sole purpose was to handle the away missions.  Still, I'm curious to know if there's ever been a real in-universe explanation for this practice?  I know it's been brought up a few times, in a few series/movies, that the Captain should not be taking part in hazardous away team missions.  But nothing is ever said (that I'm aware of) of the rest of the still valuable bridge crew or other senior officers. How do I install Ubuntu to a USB key? (without using Startup Disk Creator) Why did a Dementor try to take Harry's soul in the train? In "Harry Potter and the Prisoner of Azkaban" - when Harry and his friends were travelling to Hogwarts by train, the train stopped in between and Dementors were searching for Sirius Black. Why did one of the Dementors try to take Harry's soul? Alternative to Adobe Illustrator Can you recommend a good alternative to Adobe Illustrator?   I am learning vector based graphic design, but I am not ready to make such a large investment as to purchase a copy of Adobe Illustrator. Also, Illustrator might be a little more power than I need at the moment. I am using a Macintosh. Embedded Prolog Interpreter/Compiler for Java why is there no non-degenerate 2-forms on 4-sphere? Persist sort/filter selections Spoiler warning!  During the first escape attempt in Portal 2 (when GLaDOS is still in charge) she opens a door for you which you can choose to go through instead of following Wheatley (the blue-eyed ball). What happens if you go there? UK visa refusal For PLAB 2 I had applied for a visit visa (business) to appear for my PLAB 2 exam on 21 June 2019. I had to attend practice classes from an academy in Manchester for which I had attached the invitation letter; my duration was 15 days to prepare my exam in a better way. I had mentioned the cost of my trip to be £1500 and my brother sponsoring me for £3000 (my entire trip).   My rejection letter stated that I was going with my mother, when I had nowhere in my form or cover letter mentioned that I am going with my mother, because I was going alone. I had shown that my brother is my financial sponsor as I didnt have enough funds in my account. I had attested all the documents of my brother but somewhere in my form I made a mistake where I wrote the total money I have is £3000, but I had only £1200 in my account. I thought we had to write the total amount, so I put my brother's sponsor money, which was supposed to be £3000; he hadn't transferred it into my account, it was in his account only.  I made one more mistake in the form where they asked how much is the cost of travel to you personally. I wrote £1500 but I think I had to write nil there.   I don't know how to proceed now. Should I transfer £3000 into my account from my brother's account and get a bank statement proving the source of income? I don't have enough money in my account despite bring employed since Nov 2018 with a salary of £700 per month, as I had to make some big transactions such as booking my PLAB 2 exam (£830£), etc.  I have already booked the exam for £830 and I don't have much time left. How do we use drupal_add_library(), drupal_add_css() and drupal_add_js()? How do I use drupal_add_library(), drupal_add_css() and drupal_add_js() in Drupal 8?  I am porting a module that uses those functions. I am following what reported in , which says these functions have been removed in favor of #attached, but I am not able to attach these files to my configuration page.  The error I am getting is the following:     Uncaught PHP Exception LogicException: "You are not allowed to use js in #attached"   How do I attach CSS and JavaScript to a page? Importing a material from blender to unity Bibliography tools that are compatible with biblatex and biber Expanding code in etoolbox's \ifblank I am trying to use the etoolbox \ifblank (and its cousin \notblank), but I want to expand any macros in its test statement.  For example:  \documentclass{article} \usepackage{etoolbox}  \begin{document}  \newtoggle{longformt} \newcommand{\longform}{\toggletrue{longformt}} \newcommand{\iflong}[2]{\iftoggle{longformt}{#1}{#2}}  \newcommand{\quoteifnotblank}[1]{%     \notblank{#1}{``#1''}{}% }  % Try commenting this line. \longform  This should be completely blank if the form is short: \quoteifnotblank{\iflong{Some long quoted text}{}}  \end{document}   The problem here is that \notblank sees its argument of \iflong{Some long quoted text}{} as a string, not as code to be expanded, so the quotes always appear.  How do I expand arguments before they are passed to \notblank? .NET offers a generic list container whose performance is almost identical (see Performance of Arrays vs. Lists question). However they are quite different in initialization.   Arrays are very easy to initialize with a default value, and by definition they already have certain size:  string[] Ar = new string[10];   Which allows one to safely assign random items, say:  Ar[5]="hello";   with list things are more tricky. I can see two ways of doing the same initialization, neither of which is what you would call elegant:  List&lt;string&gt; L = new List&lt;string&gt;(10); for (int i=0;i&lt;10;i++) L.Add(null);   or  string[] Ar = new string[10]; List&lt;string&gt; L = new List&lt;string&gt;(Ar);   What would be a cleaner way?  EDIT: The answers so far refer to capacity, which is something else than pre-populating a list. For example, on a list just created with a capacity of 10, one cannot do L[2]="somevalue"  EDIT 2: People wonder why I want to use lists this way, as it is not the way they are intended to be used. I can see two reasons:   One could quite convincingly argue that lists are the "next generation" arrays, adding flexibility with almost no penalty. Therefore one should use them by default. I'm pointing out they might not be as easy to initialize. What I'm currently writing is a base class offering default functionality as part of a bigger framework. In the default functionality I offer, the size of the List is known in advanced and therefore I could have used an array. However, I want to offer any base class the chance to dynamically extend it and therefore I opt for a list. Escape a string for a sed replace pattern In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="&lt;funny characters here&gt;" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user. Q: How many arrangements of a,a,a,b,b,b,c,c,c are there such that  $\hspace{5mm}$ (i). no three consecutive letters are the same?  $\hspace{5mm}$ (ii). no two consecutive letters are the same?  A:(i). 1314. ${\hspace{5mm}}$ (ii). 174.  I thought of using the General Principle of Inclusion and Exclusion along with letting $p_i$ denote a property that.. , and doing so, I will evaluate $E(0)$, which gives us the number of arrangements without any of the properties.   How do I go about doing that? I am trying to use the method stated above in solving this question, but I am unable to generalize the properties $p_i$. Option to contact moderators Due to some "recent issues", I think the following is necessary:  Users need a way to contact moderators through the StackOverflow website.  This is especially important for suspensions, where there is no way to appeal or discuss the suspension from within SO itself.  Basically, there would be some kind of a box on the user's page that allows them to mention something to the moderators and some way to read the replies. (Or they could just go to the user's email.) How to hide a(n) (NTFS) partition from ubuntu I need to hide an NTFS partition from listing in the nautilus. How can I achieve that?   Is there any tool to do that?   And how can I hide files in ubuntu (except . operator) How many times more than $0$? Is “ ’s ” ever correct for pluralization?