I just found out that $$\sum _{i=0}^n\:i^2= \frac{n\left(n+1\right)\left(2n+1\right)}{6}$$ and  $$\sum _{i=0}^n\:i^3 = \frac{n^2\left(n+1\right)^2}{4}$$ but I don't understand how did we get the expression $\frac{n\left(n+1\right)\left(2n+1\right)}{6}$ from this $\sum _{i=0}^n\:i^2$.  Can you help me with this.  Thank you in advance.
I am just starting into calculus and I have a question about the following statement I encountered while learning about definite integrals:  $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$  I really have no idea why this statement is true. Can someone please explain why this is true and if possible show how to arrive at one given the other?
Why are there not generic phone OS installers? Using LINQ to concatenate strings What is the most efficient way to write the old-school:  StringBuilder sb = new StringBuilder(); if (strings.Count &gt; 0) {     foreach (string s in strings)     {         sb.Append(s + ", ");     }     sb.Remove(sb.Length - 2, 2); } return sb.ToString();   ...in LINQ? Understanding Bash's Read-a-File Command Substitution I am trying to understand how exactly Bash treats the following line:  $(&lt; "$FILE")   According to the Bash man page, this is equivalent to:  $(cat "$FILE")   and I can follow the line of reasoning for this second line. Bash performs variable expansion on $FILE, enters command substitution, passes the value of $FILE to cat, cat outputs the contents of $FILE to standard output, command substitution finishes by replacing the entire line with the standard output resulting from the command inside, and Bash attempts to execute it like a simple command.  However, for the first line I mentioned above, I understand it as: Bash performs variable substitution on $FILE, Bash opens $FILE for reading on standard input, somehow standard input is copied to standard output, command substitution finishes, and Bash attempts to execute the resulting standard output.  Can someone please explain to me how the contents of $FILE goes from stdin to stdout? How do you open a command line? How do you access the command line or run option to put the commands into the system? To prove that $f_n(x) = \frac{nx}{1+n^2x^2}$ does not uniformly converge to $f(x) = 0$ on $[0,1]$ When electric dipole placed in non uniform electric field, what is the approach to calculate torque acting on it? Can it be zero? Is it possible to change the Environment of a parent process in Python? In Linux When I invoke python from the shell it replicates its environment, and starts the python process. Therefore if I do something like the following:  import os os.environ["FOO"] = "A_Value"   When the python process returns, FOO, assuming it was undefined originally, will still be undefined. Is there a way for the python process (or any child process) to modify the environment of its parent process?  I know you typically solve this problem using something like  source script_name.sh   But this conflicts with other requirements I have. Let $p$ be a prime number . The order of a $p$-Sylow subgroup of the group $GL_{50}(F_p)$ of invertible $50\times50$ matrices with entries from the finite field $F_p$,equals which of the following    1.$p^{50}$ 2.$p^{125}$ 3.$p^{1250}$ 4.$p^{1225}$    I think order of this  group is $p^{2500}$  .A  sylow p-subgroup of order $P^k$ divides  order of the group but $p^{k+1}$  does not. I confused here how to apply these things . Limits of trig functions What function satisfies $ f(x)+f\left(\frac{1-x}x\right)=x$ ? How to get a list of the filenames of the figures embedded in a document I have a TeX document that is embedding a huge amount of figures from a fig folder that is full of another humongous amount of other figures.  I would like to move the document along with its figures, but I don't want to take the whole fig folder, just the figures in there that are embedded by the document.  Is there a package (or any other way) that allows me to, for example, print out the filenames of all the figures embedded by the document? Something like:  fig/figurename1.eps fig/figurename2.eps ... etc   I could then just copy-paste that list and add some cp's in a plain text file and automate the copy of those files to my desired location by running the file in my shell:  $ cp fig/figurename1.eps wherever/fig/ $ cp fig/figurename2.eps wherever/fig/ ... etc   Of course this is just an idea, if somebody has an alternative to the "file listing and copy-pasting in a shell file" I would be happy to listen =) When do you use at the office? And when do you use in the office? What's the difference between the phrases? The Fibonacci sequence is defined recursively by $F_1 = 1, F_2 = 1, \; \&amp; \; F_n = F_{n−1} + F_{n−2} \; \text{ for } n ≥ 3.$ Prove that $2 \mid F_n \iff 3 \mid n.$   Proof by Strong Induction : $\bbox[5px,border:1px solid green]{\color{green}{n = 1 }}$ $2 \mid F_1$ is false. Also, $3 \mid 1$ is false. The implication [False $\iff$ False] is vacuously true.  $\bbox[5px,border:1px solid green]{\color{green}{\text{Induction Hypothesis}}}$ Assume that $2 \mid F_i \iff 3 \mid n$ for every integer $i$ with $1 ≤ i ≤ k$.  $\bbox[5px,border:1px solid green]{\color{green}{k + 1 \text{th Case}}} \;$  To prove:  $\quad 2 \mid F_{k + 1} \iff 3 \mid k + 1.$   $\bbox[5px,border:1px solid green]{\color{green}{n = k + 1 = 2}} \;$ $2 \mid F_2$ is false. Also, $3 \mid 2$ is false. So [False $\iff$ False] is vacuously true.  Hence assume that $k + 1 ≥ 3.$ We now consider three cases:  $\bbox[5px,border:1px solid green]{\color{green}{\text{Case 1: } k + 1 = 3q}}$ Thus $3 \require{cancel}\cancel{\mid} k$ and $3 \require{cancel}\cancel{\mid} (k − 1)$. By the ind hyp, $3 \require{cancel}\cancel{\mid} k    \iff F_k$ odd &amp; $3 \require{cancel}\cancel{\mid} (k − 1) \iff F_{k - 1}$ odd. Since $F_{k+1} = F_k + F_{k−1}$, thus $F_{k+1}$ = odd + odd = even.  $\bbox[5px,border:1px solid green]{\color{green}{\text{Case 2: } k + 1 = 3q + 1}}$  Thus $3 | k$ and $3 \require{cancel}\cancel{\mid} (k − 1).$ By the ind hyp, $3 | k \iff F_k$ even &amp; $3 \require{cancel}\cancel{\mid} (k − 1) \iff F_{k - 1}$ odd. Thus $F_{k+1}$ odd.  $\bbox[5px,border:1px solid green]{\color{green}{{\text{Case 3: }} k + 1 = 3q + 2}}$ Thus $3 \require{cancel}\cancel{\mid} k$ and $3 | (k −1).$ By the ind hyp, $3 \require{cancel}\cancel{\mid} k \iff F_k$ odd and $3 \mid (k − 1) \iff F_{k - 1}$ even. Thus $F_{k+1}$ odd. $\blacksquare$  $\Large{1.}$ Does the proof clinch the $(\Leftarrow)$ of the $(k + 1)$th case?   $\Large{2.}$ Since the recursion contains $n, n - 1, n - 2$, thus the recursion "time lag" is $3$ here. So shouldn't $3$ base cases be checked?   $\Large{3.}$ Further to #2, shouldn't "assume $k + 1 \geq \cancel{3} 4$" instead?   $\Large{4.}$ Shouldn't the $n = k + 1 = 2$ case precede the induction hypothesis?  I referenced . Source: Exercise 6.35, P152 of Mathematical Proofs, 2nd ed. by Chartrand et al    Supplement to peterwhy's Answer:  $\Large{1.1.}$ I wrongly believed that all 3 Cases proved the $\Leftarrow$. I now see that Case 1 is $\Leftarrow$ via a Direct Proof. Cases 2 and 3 are $\Rightarrow$ via a Proof by Contraposition. Nonetheless, how would one foreknow/prevision to start from $3 \mid n$  for both directions of the proof? Random images appearing in my home directory... Where are they coming from? Here's an odd problem I've had for a while. Every so often, I find that I have several jpeg images sitting in my home directory that I didn't put there. I'm fairly sure this isn't a security breach but rather, there's something writing these files in there that I've forgotten about.  Here's what I'm looking at today:  oli@bert:~$ ls -l *.jpg -rw------- 1 oli oli  8061 2010-11-19 18:30 An-alien-from-Mars-Attack-002.jpg -rw------- 1 oli oli 24362 2010-11-19 18:30 An-alien-from-Mars-Attack-006.jpg -rw------- 1 oli oli  8147 2010-11-05 18:08 Avatar-Film---2009-002.jpg -rw------- 1 oli oli 35602 2010-11-05 18:08 Avatar-Film---2009-006.jpg -rw------- 1 oli oli  6058 2010-12-03 18:42 Britney-Spears-victim-of--002.jpg -rw------- 1 oli oli 28330 2010-12-03 18:42 Britney-Spears-victim-of--006.jpg -rw------- 1 oli oli  8135 2010-11-12 19:19 charlie-brooker-twitter-p-002.jpg -rw------- 1 oli oli 22115 2010-11-12 19:19 charlie-brooker-twitter-p-006.jpg -rw------- 1 oli oli  8059 2010-10-29 18:47 Leonardo-DiCaprio-002.jpg -rw------- 1 oli oli 29988 2010-10-29 18:47 Leonardo-DiCaprio-006.jpg -rw------- 1 oli oli  8064 2010-10-22 16:41 Spot-the-difference-.-.-.-002.jpg -rw------- 1 oli oli 29188 2010-10-22 16:41 Spot-the-difference-.-.-.-006.jpg   They all seem like they're TV or film related... But I honestly don't have a clue what could be writing them. They don't bother me enough to go on a full-scale witch hunt but if anybody knows of something that writes images in the home directory like this, please let me know. How can adding an infinite number of rationals yield an irrational number? For example how come $\zeta(2)=\sum_{n=1}^{\infty}n^{-2}=\frac{\pi^2}{6}$. It seems counter intuitive that you can add numbers in $\mathbb{Q}$ and get an irrational number. How to add a WiX custom action that happens only on uninstall (via MSI)? I would like to modify an MSI installer (created through ) to delete an entire directory on uninstall.  I understand the RemoveFile and RemoveFolder options in WiX, but these are not robust enough to recursively delete an entire folder that has content created after the installation.  I noticed the similar Stack Overflow question , but I was wondering if this could be done more simply using a call to a batch script to delete the folder.  This is my first time using WiX, and I'm still getting the hang of . What would be a basic example of a custom action that will run a batch script on uninstall? Automatically add vertical space /only/ between two sequential paragraphs I am using KOMA-script scrreprt class.  I know I can use \usepackage{parskip} or \setlength{\parskip}{12pt}, but both of these also affect headings.  Adding \vspace{12pt} manually between all two sequential paragraphs seems to work, but that's anything but convenient. Is there a way to automate it? How do you check the windows version in Win32 at runtime? How do you check the windows version in Win32 at runtime? What is the difference between Non-preemptive, Preemptive and Selective Preemptive Kernel? How can I find $\gcd(a^m+1,a^n+1)$ with $a,m,n$ positive integers?    I have this idea:  Let $d=\gcd(m,n)$. Then there exist positive integers $x,y$ such that $mx-ny=d$ (WLOG). We shall find $G=\gcd(a^m+1,a^n+1)$.  If $m,n$ are odd, then $d$ is odd, therefore one and only one of $x,y$ is even. We have:  $$a^{ny}(a^d+1)=a^{mx}+a^{ny}=(a^{mx}-1)+(a^{ny}+1)=(a^{mx}+1)+(a^{ny}-1).$$  If $x$ is even and $y$ is odd, then $a^{m}+1\mid a^{mx}-1$ and $a^{n}+1\mid a^{ny}+1$, therefore $G\mid a^{ny}(a^d+1)$. If $x$ is odd and $y$ is even, then $a^{m}+1\mid a^{mx}+1$ and $a^{n}+1\mid a^{ny}-1$, thus $G\mid a^{ny}(a^d+1)$. However, since $\gcd(a^m+1,a^{ny})=\gcd(a^n+1,a^{ny})=1$, so $\gcd(G,a^{ny})=1$, hence $G\mid a^d+1$. We also have $a^d+1\mid a^{m}+1$ and $a^d+1\mid a^{n}+1$, so $a^d+1\mid G$. Thus $G=a^d+1$.  If $v_2(m)=v_2(n)=v_2(d)=k&gt;1$, then there exist some odd numbers $m_1,n_1,d_1$ such that $m=2^km_1,n=2^kn_1,d=2^kd_1$. We shall have $m_1x-n_1y=d_1$, so one and only one of $x,y$ is even, and we can use the same argument when $m,n$ are odd, so $G=a^d+1$.  However, if $v_2(m) \neq v_2(n)$, I cannot find any solutions for this. I think that $G \in \{1,2\}$, but I cannot prove or disprove it. How can I find $G=\gcd(a^m+1,a^n+1)$ if $v_2(m) \neq v_2(n)$ ? Moreover, is there anything from my arguments that can be improved ?