How to determine the number of terms in $(x+\frac{1}{x}+1)^n$ I just wanted to know, how can I calculate number of terms in $$\left(x+\frac 1{x}+1\right)^n?$$
My try:
Any term of the expression will be of the form $(x)^i(\frac{1}{x})^j(1^k)$, and if in any term  if $i=j$ then it will become a constant term. I also tried to write the expression as $\frac{x^2+x+1}{x}$ but i don't know what to do know.
Please keep it simple and write how you got there. I just have no idea.
Thank you.
 A: Hint: Our expression is equal to $\frac{1}{x^n}(x^2+x+1)^n$.  
The number of terms is the same as the number of terms in $(x^2+x+1)^n$.
Imagine expanding $(x^2+(x+1))^n$ using the Binomial Theoremm $a=x^2$, $b=x+1$. We will get $x^{2n}$ plus a bunch of lower degree terms. 
How many terms? There can't be any more than $2n+1$ terms, because each term will have shape a constant times $x^k$, where $k$ is any of $0, 1, 2,\dots,2n$.
Persuade yourself, and the reader, that there are no "missing" terms, that is, no coefficient of an $x^k$, $k=0$ to $2n$, is equal to $0$. Here we are helped in the argument by the fact that the coefficients of $x^2+x+1$ are positive, so on multiplication nothing can cancel.
Added: Your approach also works well, but some detail has to be filled in. We get a large sum. Before we simplify, they are of shape $x^i\left(\frac{1}{x}\right)^j 1^k$, where $i+j+k=n$. As you pointed out, when we simplify, some of these combine. For example, $x^1(1/x)^1(1)^{n-2}$ will become $1$, as will quite a few others, when $n$ is at all large. And there will be several ways to end up with an $x^1$, also several ways to end up with a $(1/x)$, which I will call $x^{-1}$.
What is the biggest power of $x$ that we get? By choosing $i=n, j=0,k=0$ we get $x^n$. By choosing $i=0,j=n,k=0$ we get $x^{-n}$. That's the smallest (most negative) power that we get. Between $n$ and $-n$, inclusive, we have $2n+1$ numbers (don't forget $0$). 
We want to see that we get a term in every one of these powers. By symmetry, it is enough to show that we get stuff in every non-negative power of $x$, from the $n$-th power to the $0$-th power.
For $0\le m\le n$, we get $x^m$ in the expansion, for example by using $i=m,j=0,k=0$, and usually in several other ways. But the point is we do get some stuff that involves $x^m$. So every power of $x$, from $x^n$ down to $x^{-n}$ is represented, a total of $2n+1$.    
