I've already had some good discussion with Fat32 in this question yesterday.
Do I count wrong or are there 5 samples used for the approximation? q+p+1 should be $2+3+1=6$ and therefor 6 perfectly approximated samples. Okay I've calculated it. Due to the periodicity the sixth sample is correct too. But what if the vector would be e.g. 10 at $x$ (sixth sample)?
To solve for the a's I'd then have 3 equations for the vector $[1, a_1, a_2]^T$ which is impossible to solve. Where do I make the mistake?