Problem

Source: Turkey TST 2000 P3

Tags: number theory unsolved, number theory



Let $P(x)=x+1$ and $Q(x)=x^2+1.$ Consider all sequences $\langle(x_k,y_k)\rangle_{k\in\mathbb{N}}$ such that $(x_1,y_1)=(1,3)$ and $(x_{k+1},y_{k+1})$ is either $(P(x_k), Q(y_k))$ or $(Q(x_k),P(y_k))$ for each $k. $ We say that a positive integer $n$ is nice if $x_n=y_n$ holds in at least one of these sequences. Find all nice numbers.