On a 6th degree polynomial 
Say $p(x)$ is a 6th degree polynomial. We know that $p \geq 1, \forall x \in \mathbb R$ and that $$p(2014) = p(2015) = p(2016) = 1$$ while $p(2017)=2$. What is the value of $p(2018)$?


My first approach was to define $q(x) = p(x)-1$ such that its factorization is something like
$$q(x) = (x - 2014) (x - 2015) (x - 2016) \left(ax^3 + bx^2 + cx + d \right)$$
for some $a, b, c, d \in \mathbb R$ with $a \neq 0$. Now it is all to find those values that respect the conditions but in the system something goes wrong and makes difficult or even impossible to find useful solution. Do you have better ideas?
 A: Continuing with the same notation. Note that $q(x) \ge 0$ for all $x \in \Bbb R$.
We already see that $2014, 2015, 2016$ are roots of $q$. The claim is that they are all repeated twice.
We do this by first proving the following claim:
Claim. Let $r$ be a root of $q$. Then, $r$ is a root with an even multiplicity.
Proof. Suppose not. Let $2k+1$ be the multiplicity of $r$. Then, we can write
$$q(x) = (x - r)^{2k+1}g(x)$$
for some polynomial $g(x)$ with $g(r) \neq 0$. As polynomials are continuous, we can find a neighbourhood $U$ around $r$ such that $g(x)$ is of the same sign for all $x \in U$.
However, on the other hand, $(x-r)^{2k+1}$ changes its sign in that neighbourhood and thus, we see that $q$ changes its sign. This contradicts that $q(x) \ge 0$ for all $x \in \Bbb R$. $\blacksquare$

Thus, each of $2014$, $2015$, and $2016$ has multiplicity at least $2$. Since $q$ has degree $6$, we see that they all have multiplicity exactly $2$. Thus, we get
$$q(x) = a(x - 2014)^2(x - 2015)^2(x - 2016)^2$$
for some $a \in \Bbb R$. Using $q(2017) = 1$, we see that $a = 1/3!^2$.
Thus, we get that
$$q(2018) = \dfrac{1}{3!^2} \cdot 4!^2 = 4^2 = 16$$
and hence,
$$p(2018) = 16 + 1 = \boxed{17}.$$
