Try f(x) = x^2 * (x-1)^2 / 4. Every number you listed is a perfect square, that is
f(0) = 0^2
f(1) = 0^2
f(2) = 1^2
f(3) = 3^2
f(4) = 6^2
f(5) = 10^2
f(6) = 15^2
and those numbers are 0, 0, 0+1, 0+1+2, 0+1+2+3, 0+1+2+3+4, 0+1+2+3+4+5... Lastly, the sum 1+2+...+n is known to be n(n+1)/2.