TITLE: 2005 Putnam B1: Find a Polynomial
QUESTION [17 upvotes]: Find a nonzero polynomial $P(x,y)$ such that $P(\lfloor a\rfloor,\lfloor 2a\rfloor)=0$ for all real numbers $a.$
(Note: $\lfloor v\rfloor$ is the greatest integer less than or equal to $v.$)
I almost get it.
I noticed a pattern. Let $[]$ represent the floor function. 
$$[3.2], [6.4] = 3, 6$$
$$\cdots$$
$$[6.4], [12.8] = 6, 12$$
$$\cdots$$
$$[9.9], [19.8] = 9, 19$$
$$2[a] \le [2a]$$
For negative numbers
$$[-1.2], [-2.4] = -2, -3$$
$$[-3.2], [-6.4] = -4, -7$$
$$\cdots$$
$$[-9.9], [-19.8] = -10, -20$$
$$[2a] \le 2[a] + 1$$
This becomes:
$$2[a] \le [2a] \le 2[a] + 1$$
Since, $x = [a]$ and $y = [2a]$ it gives:
$$2x \le y \le 2x + 1$$
What is a possibility now?

REPLY [18 votes]: For any real number $r$, $\left\lfloor 2r\right\rfloor-2\left\lfloor r\right\rfloor$ can be only zero or one, hence 
$$ P(x,y) = (y-2x)(y-2x-1) $$
works.