Fractional Part of $ a^n $ Prove that there exists a real number $ a>1 $, such that $ \{a^n\} $ belongs to $[\frac{1}{3},\frac{2}{3}]$ for all positive integers $n$ and $\lfloor a^n\rfloor$ is even iff $n$ is a prime.  
$a^n=\{a^n\}+\lfloor a^n\rfloor$, where $ \{a^n\} $ is the fractional part of $a^n$ and $\lfloor a^n\rfloor$ is the largest integer not greater than $ a^n $
 A: We can't find an exact value of $a$ but it is possible to construct it using the nested intervals theorem.
Let $I_1=[15+\frac13,15+\frac23]$. Assume $I_k=[a_k+1/3,a_k+2/3]$ is defined and also satisfy $I_k'=[(a_k+1/3)^{1/k},(a_k+2/3)^{1/k}]=[b_k,c_k]\subset I_1$. Then since $15<(a_k+1/3)^{1/k}=b_k<c_k$,
$$(a_k+\frac23)^{1+\frac1k}-(a_k+\frac13)^{1+\frac1k}=c_k^{k+1}-b_k^{k+1}>(c_k^k-b_k^k)c_k>\frac13\cdot15=5$$
So the interval $J_k=[(a_k+\frac13)^{1+\frac1k},(a_k+\frac23)^{1+\frac1k}-1]$ contain at least $4$ integers which means there are both even number and odd number in $J_k$. Let $$a_{k+1}=\cases{\text{even number in }J_k&\text{,if }k+1\text{ is prime}\\\text{odd number in }J_k&\text{,otherwise}}$$ and define $I_{k+1}=[a_{k+1}+1/3,a_{k+1}+2/3]$.
From $$(a_{k+1}+\frac13)^{\frac1{k+1}}>a_{k+1}^{\frac1{k+1}}\ge((a_k+\frac13)^{1+\frac1k})^{\frac1{k+1}}=(a_k+\frac13)^{\frac1k}$$ and $$(a_{k+1}+\frac23)^{\frac1{k+1}}<(a_{k+1}+1)^{\frac1{k+1}}\le ((a_k+\frac23)^{1+\frac1k})^{\frac1{k+1}}=(a_k+\frac23)^{\frac1k}$$ we see that $I'_{k+1}\subset I'_k$. Thus by the nested intervals theorem, there is a real number $\displaystyle a\in\bigcap_{k=1}^\infty I'_k$. Now $a^k\in I_k=[a_k+1/3,a_k+2/3]$ where $a_k$ is even iff $k$ is prime. Thus $a$ satisfy the conditions in the problem.
