The exercise
"Let suppose that $f$ is a function that admits a Taylor expansion such that $$ \forall x\in \mathbb{R}, \ f\left(x\right)=\sum_{n=0}^{+\infty}a_nx^n $$ with $a_n \in \left\{0,1\right\}$ and that $$f\left(\frac{2}{3}\right)=\frac{3}{2}$$
Prove that $\displaystyle f\left(\frac{1}{2}\right)$ is irrational."
My attempt ( which has two main problems )
I've tried proving that with such a function, $\displaystyle \left(a_n\right)_{n \in \mathbb{N}}$ cannot have a finite number of $1$. I think this statement is true, but I dont know how to prove it, that's the first problem.
I've supposed that the sequence $\displaystyle \left(a_n\right)_{n \in \mathbb{N}}$ was periodic of period $T \in \mathbb{N}^{*}$, it led me to the expression $$ f\left(x\right)=\frac{\displaystyle \sum_{n=0}^{T-1}a_nx^n}{1-x^{T}} $$ I dont how I can find a contradiction with this using this expression and the fact that $\displaystyle f\left(\frac{2}{3}\right)=\frac{3}{2}$. That's the second problem.
However, with this two "hics" solved, we would have that $\displaystyle \left(a_n\right)_{n \in \mathbb{N}}$ is infinite and cannot be periodic, hence the binary expansion of the real $\displaystyle f\left(\frac{1}{2}\right)$ would be infinite and not repreating would be irrational.
Any Idea ?
Suppose that $$ \frac32=\sum_{n=0}^Na_n\Bigl(\frac23\Bigr)^n. $$ Then $$ 3^{N+1}=2\sum_{n=0}^Na_n\,2^n\,3^{N-n}. $$ The left hand side is odd, while the right hand side is even. This solves the first problem. The second can be dealt similarly. With your notation, if $$ \frac32=\frac{\sum_{n=0}^{T-1}a_n\bigl(\frac23\bigr)^n}{1-\bigl(\frac23\bigr)^T}, $$ then $$ 3^T-2^T=2\sum_{n=0}^{T-1}a_n\,2^n\,3^{T-1-n}. $$