Are there any integer solutions to $2^x+1=3^y$ for $y>2$? for what values of $ x $ and $ y $ the equality holds 

$2^x+1=3^y$

It is quiet obvious the equality holds for $x=1,y=1$ and $x=3,y=2$.
But further I cannot find why $x$ and $y$ cannot take higher values than this values.
 A: As the title says "number theory", I am assuming you are looking for integer solutions (Otherwise, it is quite obvious that for any $x$ there is a $y$, which solves this).
Then, this is a special case of the (recently proven) Catalan's conjecture, which more generally asserts, that 
$$a^x+1=b^y\quad x,y>1$$
has the unique integer solution $a=2,x=3,b=3,y=2$. 
So there are only the two solutions you found.

Catalan's conjecture is of course a knockout argument. Since your question is only a special case, the problem becomes easier and can be solved my elementary number theory. Check, the other excellent answers for a more direct solution.
A: I am assuming that $x$ and $y$ are supposed to be integers.
The claim follows from the fact that if $x>3$, then the order of the residue class of $3$ in the group $\mathbb{Z}_{2^x}^*$ (sometimes denoted by $U_{2^x}$)
is $2^{x-2}$. In other words: for $3^y-1$ to be divisible by $2^x$ the exponent $y$ has to be a multiple of $2^{x-2}$. There are several proofs for this fact in this site.
But when $y\ge 2^{x-2}$, then it shouldn't be too hard to see that $$3^y\ge3^{2^{x-2}}>2^x.$$
A: Note that $2\equiv -1$ mod $3$, which means that $x$ must be odd.
If $y$ is even, let $y=2z$ and we have $2^x=(3^z+1)(3^z-1)$ with some minor arranging. The two factors on the right-hand side differ by $2$, and must both be powers of $2$, so they must be $2$ and $4$ and $z=1$ which gives us the solution $x=3, y=2$.
It remains to deal with the case in which $x,y$ are both odd. We note that $3\equiv -1$ mod $4$ so if $x \ge 2$ and $y$ is odd the equation becomes $0+1\equiv -1$ mod $4$. So we must have $x\lt 2$ hence $x=1, y=1$.
A: With $y \gt 2$, there are only $684$ possible values of $3^y - 2^x$ mod $(262143 = 2^{18} - 1)$, so it is reduced the the finite problem of checking that none of them are $1$.
