$$a_k = \left\{      \begin{array}{lr}        2a_{k-1} - a_{k-2} &amp;: if \space k &gt; 2 \\        3 &amp; :if\space k =2 \\        2 &amp; :if \space k =1      \end{array}    \right.$$  It's easy to see that the nth term is n+1 based on the pattern but how do I actually show it? Is there a general way to solve these recurrence problems?  The only way I can think of is $a_k - a_{k-1}=a_{k-1}-a_{k-2}$ implies arithmetic progression, so based on that n+1
I know how to solve "simple" recurrence relations. For instance, say you have:  $$c_0 = 20$$ $$c_1 = 30$$ $$c_n = 3 c_{n-1} - 2 c_{n-2}$$  We can write the characteristic equation as:  $$3x^{n-1} - 2x^{n-2} = x^n$$  Solving this with $n=2$, we get $x = 1$ or $x = 2$. This lets us write the relation $c_n = \alpha_1 1^n + \alpha_2 2^n$, and we can solve for $\alpha_1$ and $\alpha_2$ with the initial states $c_0$ and $c_1$.  However, this depends on the fact that $3x^{n-1} - 2x^{n-2} = x^n$ has two roots.  Now, I'm stuck on another problem where the characteristic equation has fewer roots than terms.  Say I have this recurrence relation instead:  $$a_0 = 0$$ $$a_1 = 2$$ $$a_2 = −1$$ $$a_n = 9a_{n-1} - 15a_{n-2} - 25a_{n-3}$$  The characteristic equation would be:  $$9x^{n-1} - 15x^{n-2} - 25x^{n-3} = x^n$$  However, solving with $n=3$, we only get two roots: $x=-1$ or $x=5$. There are not enough roots to write a relation in the form of $a_n = \alpha_1 r_1^n + \alpha_2r_2^n + \alpha_3r_3^n$. How do I proceed?
I have a graph. This is my code.    \documentclass[10pt]{article}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows,patterns}     \pagestyle{empty}      \definecolor{ttqqcc}{rgb}{0.2,0,0.8}     \definecolor{ffqqtt}{rgb}{1,0,0.2}     \definecolor{ttqqff}{rgb}{0.2,0,1}     \definecolor{uququq}{rgb}{0.25,0.25,0.25}      \begin{document}      \begin{tikzpicture}[line cap=round,line join=round,&gt;=triangle 45,x=1.0cm,y=1.0cm]      \draw[-&gt;] (-3.63,0) -- (3.67,0);     \foreach \x in {-3,-2,-1,1,2,3}       \draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt)          node[below] {\footnotesize $\x$};     \draw[color=black] (3.48,0.07) node [anchor=south west] { $x$};      \draw[-&gt;] (0,-1.93) -- (0,5.57);     \foreach \y in {-1,1,2,3,4,5}       \draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt)          node[left] {\footnotesize $\y$};     \draw[color=black] (0.06,5.19) node [anchor=west] { $y$};      \draw (0pt,-10pt) node[right] {\footnotesize $0$};      \clip(-3.63,-1.93) rectangle (3.67,5.57);     \draw[pattern color=ffqqtt,pattern=north east lines,fill opacity=0.1, smooth,samples=50,domain=0:1.0]      plot(\x,{\x^4-4*\x^2+3}) -- (1,0) -- (0,0) -- cycle;     \draw[pattern color=ttqqcc,pattern=crosshatch,fill opacity=0.1, smooth,samples=50,domain=1.0:1.7320508075688772]      plot(\x,{\x^4-4*\x^2+3}) -- (1.73,0) -- (1,0) -- cycle;      \begin{scope}[xscale=-1]     \draw[pattern color=ffqqtt,pattern=north east lines,fill opacity=0.1, smooth,samples=50,domain=0:1.0]        plot(\x,{\x^4-4*\x^2+3}) -- (1,0) -- (0,0) -- cycle;     \draw[pattern color=ttqqcc,pattern=crosshatch,fill opacity=0.1, smooth,samples=50,domain=1.0:1.7320508075688772]        plot(\x,{\x^4-4*\x^2+3}) -- (1.73,0) -- (1,0) -- cycle;     \end{scope}      \draw[smooth,samples=100,domain=-3.6342419080068153:3.665758091993186] plot(\x,{(\x)^4-4*(\x)^2+3});      \fill [color=uququq] (-1.73,0) circle (1.5pt);      \fill [color=uququq] (-1,0) circle (1.5pt);      \fill [color=uququq] (1,0) circle (1.5pt);      \fill [color=uququq] (1.73,0) circle (1.5pt);      \end{tikzpicture}     \end{document}   When I see the DVI output DVI, I have    And if I look at the PDF file, I have IE9 HTML5 video support How do I get an XBOX 360 controller working? I have a Microsoft XBOX 360 gamepad with the wireless adapter and I was wondering what I would have to install to use them with Ubuntu I do know that when using this on Windows I have to manually install the drivers for the wireless receiver (if that is relevant.) Invisible software updates list in Software Updater Today I received an update notification for three updates but update manager doesn't say what updates are they.    Does anyone have a clue what this is about? How am I to check what is to be updated? Given a message and DES encrypted form of said message, is it possible to efficiently compute the key used to encrypt the data? Battery mAh meaning What exactly does mAh rating means? I know that it means the milliamperes supplied by the battery in one hour but i need a more conceptual and practical definition/example.   How does mAh rating tell the current supplied to the load? How does it vary with the load specification.   Also, suppose a mobile phone's battery has 3000mAh, if i supply it with 1000mA, then does it mean that the battery will be fully charged in 3 hours?   And will a 3000 mAh battery deliver a current of 3000mA for 1 hour to a load? Will this rating degrade in a practical scenario. Please explain. How can I test if a RegEx matches a string exactly?  var r = /a/; r.test("a"); // returns true r.test("ba"); // returns true testExact(r, "ba"); // should return false testExact(r, "a"); // should return true Ubuntu missing from HP boot menu I have a HP laptop with Windows 8.1 and Ubuntu 14.04 dual booted. I used to use F9 key to enter boot menu and chose Ubuntu and then GRUB would appear where I would chose Ubuntu again. This was working fine all this while. Either a hardware change or a Windows update has caused the Ubuntu option to go missing from the boot menu itself.  How do I fix this and boot into Ubuntu again? How I can create a graph of acceleration and speed - tikz? How can I create a graph of acceleration and speed like the one in the picture. Knowing that they are each other's consequence?    \documentclass{article} \usepackage{tikz}  \begin{document}  \begin{tikzpicture}               \end{tikzpicture} \end{document} Why don't more mainstream statically typed languages support function/method overloading by return type?  I can't think of any that do.  It seems no less useful or reasonable than supporting overload by parameter type.  How come it's so much less popular? "Baggage" versus "luggage" As an example, consider the two sentences:     There don't seem to be any doctors here.   and     There doesn't seem to be any doctors here.   To my ear, the first sounds great, and the second is painfully awkward.  So which is correct, grammatically? I've found lots of disagreement on this around the Web, with various sources citing different ways of treating the word "any" (as singular, always, or as either depending on to what it refers). No consensus, however, could I locate. Getting raw SQL query string from PDO prepared statements Is there a way to get the raw SQL string executed when calling PDOStatement::execute() on a prepared statement? For debugging purposes this would be extremely useful. I've got this situation:  ./ ./myscript.sh ./arguments.txt ./test.sh   Inside myscript.sh, I have to run the file test.sh, passing to it the arguments contained inside arguments.txt.  myscript.sh is:  arguments=$(cat arguments.txt) source test.sh $arguments   This works well if if arguments.txt contains at most one argument:  firstargument    The substitution is:  ++ source test.sh 'firstargument'   But the problem is with two or more arguments. It does this:  ++ source test.sh 'firstargument secondargument'   Also, I don't know in advance the number of arguments inside arguments.txt. There can be zero or more. Centering vertically in table cell I'm new with LaTeX and I'm trying to make a table with the elements centered vertically and horizontally. I've searched for this question, it seems like most people were trying to do things a little more complicated than this, resulting in complicated answers I couldn't understand. The table below is already centered horizontally, but the elements are aligned to the top of the cells instead of the center. How do I fix this?      \begin{tabular}{*{5}{|c}|}         \hline         $p$ &amp; $q$ &amp; $p \land q$ &amp; $p \lor q$ &amp; $p \to q$\\         \hline         T &amp; T &amp; T &amp; T &amp; T\\         \hline         T &amp; F &amp; F &amp; T &amp; F\\         \hline         F &amp; T &amp; F &amp; T &amp; T\\         \hline         F &amp; F &amp; F &amp; F &amp; T\\         \hline     \end{tabular} How do ideal quotients behave with respect to localization? Suppose $R$ is commutative ring with unity. For ideals $I$, $J \subseteq R$, the ideal quotient $(J:I)$ is $$(J:I) := \{x\in R \, : \, xI \subseteq J\}$$ Let $S\subset R$ be a multiplicative set. When does localization at $S$ commute with taking quotients, i.e. when does the equality $$(S^{-1} J : S^{-1} I) = S^{-1} (J:I)$$ hold? More generally, when is it true that $$S^{-1} \text{Ann}_{R} (M) = \text{Ann}_{S^{-1} R} (S^{-1} M)$$ for an $R$-module $M$? What could we call a person with deep knowledge in various fields? Why isn't Captain America worthy of Mjolnir? I haven't see the movie yet, but in the , we can see Cap trying to lift Mjolnir in the humorous scene where every Avenger gives it a try.  Mjolnir even moves just a tiny bit and at this very moment we see Thor's smile disappearing. This, of course, is intended as a humorous and lighthearted scene.  But it got me thinking: why isn't Captain America worthy of Mjolnir? He seems to be the most "perfect" human being anyone can be: brave, not selfish, legitimate leader, prompt to sacrifice (as seen in the first movie, when he jumps on a fake grenade).  I ask this question in light of this very specific scene, but I'm interested in the Marvel Universe (and Marvel Cinematic Universe) as a whole. Maybe Captain America did wield Mjolnir once? Maybe he has some individual flaw I am not aware of that makes him unworthy? When I get an idea for something I'd like to make in Blender, I hit up Google for specifics, then blender SE when I get stuck.   I'm very overwhelmed by the immensity of Blender and I'm a little afraid that this self-directed approach is going to lead me to develop bad habits. Is there a "best practice" way of learning to use Blender? Getting server name during servlet initialization