representability of consecutive integers by a binary quadratic form I have two related questions on the representability of integers 
by quadratic forms in two variables :
(1) Let $f: {\mathbb Z} \times {\mathbb Z} \to {\mathbb Z}  $ be such a quadratic
form, i.e. we have $f(x,y)=ax^2+bxy+cy^2+dx+ey+g$ for some integer constants
$a,b,c,d,e,g$. Suppose that $f$ is not surjective, i.e. some integer is not represented
by $f$. Is it true that there is an integer constant $C$ such that in any block of
$C$ consecutive integers, at least one of them is not represented by $f$ ?
(2) If the answer to (1) is yes, is there a uniform bound ? In other words,
is there a uniform constant $C$ such that for any non-surjective $f$, in any block of
$C$ consecutive integers, at least one of them is not represented by $f$ ?
Update : Good answers to my original questions appeared quickly. It seems the only
interesting subquestion left is the one asked by fedja : 
(2') is there a universal $C$ such that for any $f$ with positive definite  quadratic part, in any block of
$C$ consecutive integers, at least one of them is not represented by $f$ ?
One may also ask, 
(3)  is there a universal $C$ such that for any non-surjective and irreducible $f$,  in any block of
$C$ consecutive integers, at least one of them is not represented by $f$ ?
 A: "If the question is rectricted to positive definite forms, then a C exists. ". 
If $C$ is allowed to depend on the form, it is quite simple. Shifting to get rid of linear terms, completing the square and multiplying by an appropriate integer, one can reduce the problem to showing that for every positive integers $b$ and $D$ the quadratic form $x^2+by^2$ cannot represent too many successive integers divisible by $D$. Now just choose a prime $p>D$ such that $-b$ is not a quadratic residue modulo $p$ (you do not need Dirichlet theorem or even quadratic reciprocity law to find such prime though these two tools make its existence obvious) and notice that the form cannot represent any number divisible by $p$ but not by $p^2$. But such numbers are fairly dense among the ones divisible by $D$.
The interesting question is whether one can find a universal $C$ that would work for every quadratic polynomial of 2 variables with integer coefficients and positive definite quadratic part.
A: Seems worth recording my thoughts so far. I am sticking with positive forms, which means homogeneous. My guess of $C=31$ was probably larger than necessary, but we will see. Certainly I think there is a finite uniform $C$ and it can be taken quite small. 
It turns out to be quite difficult to have a positive binary represent any string of 7 consecutive positive integers. I finally managed it, $x^2 + x y + 18 y^2$ represents the numbers from 1,953,139 to 1,953,145. Of course, even for this form, most intervals of length 7 contain a nonrepresented number. 
If the discriminant is even there is a congruence obstruction on represented numbers mod 4 or mod 8, of a nature that prevents strings longer than 5. The form $x^2 + 2 y^2$ does well, many strings of length 5 as high as I could check.
If the discriminant is 5 mod 8 no numbers 2 mod 4 are represented. 
So we have explicit bounds of length no more than 5 unless $ \Delta \equiv 1 \pmod 8.$ Even here, for composite discriminant, say $ 3 | \Delta $ any form of that discriminant is restricted to all quadratic residues or all quadratic nonresidues $ \pmod 3 ,$ maximum length 3. Similar for  $ 5 | \Delta $ or  $ 7 | \Delta .$
The way to get big lengths is prime discriminants with either a long set of consecutive residues or a long set of consecutive nonresidues. Residues seem a better bet, as if 2,3,5 are residues then so are 1,2,3,4,5,6. And, indeed we have $ 1953139 \equiv 0 \pmod {71}, \ldots, \;  1953145 \equiv 6 \pmod {71} .$ Note that 7 is a nonresidue mod 71, the first nonresidue is always prime (for a prime modulus). 
Note that Fedja's argument also concerns the first nonresidue $q.$ Whatever else may or may not matter, the maximum length is $2 q - 1,$ for a possible interval from $ k q^2 - q + 1$ through to $ k q^2 + q - 1.$
A: Such a $C$ does not exist, if I got it right.
My example is the function $f(x,y)=(2x+1)(5y+1)$. An integer is represented by $f$ iff it can be written as the product of an odd integer and a number which is 1 mod 5. So for example it is not hard to check that 2 cannot be written in this way (the odd number had better be $\pm1$, and neither of $\pm2$ are 1 mod 5). However a tedious construction using the Chinese Remainder Theorem gives arbitrarily large sequences of consecutive integers which are representable by $f$. 
Let me explain a bit more about the CRT argument. Clearly any positive integer $N$ can be written as the product $M2^r$ of an odd integer and a power of two. If furthermore this odd integer $M$ is divisible by three distinct primes, one of which is 2 mod 5, one of which is 3 mod 5 and one of which is 4 mod 5, then moving one of these factors $p$ from $M$ to the power of two gives $N=(M/p)(p2^r)$, and if $2^r$ isn't 1 mod 5 then there will be some $p$ such that $p2^r$ will be 1 mod 5, so we have our decomposition of $N$ which is hence representable by $f$.
So it suffices to find arbitrarily large strings of integers each of which has a prime factor which is 2 mod 5, a prime factor which is 3 mod 5 and a prime factor which is 4 mod 5 (in fact by using sign changes one can even get away with primes which are 2 mod 5). But now this is easy: enumerate the primes which are 2 mod 5, 3 mod 5 and 4 mod 5, let C_n be the product of the n'th 2-mod-5, the n'th 3-mod-5 and the n'th 4-mod-5, and now choose a big positive $N$ with $N=0$ mod C_1, $N+1=0$ mod $C_2$,... $N+10^6=0$ mod $C_{10^6+1}$ (such an $N$ exists by CRT) and there you have it.
