## Achieving consecutive integers as norms from a quadratic field

This question is inspired by my inability to make any progress on Will Jagy's question. Giving a positive answer to this question should be strictly easier than proving Jagy's conjectures.

Suppose that $K/\mathbb{Q}$ is an imaginary quadratic extension. Let $\chi$ be the corresponding quadratic character. Suppose that there exist $k$ consecutive integers such that $\chi(a)=\chi(a+1)=\ldots=\chi(a+k-1)=1$. Do there necessarily exist infinitely many integers $b$ such that $b$, $b+1$, ... and $b+k-1$ are all norms of ideals in $\mathcal{O}_K$?

For example, the first interesting case is to determine whether there are infinitely many $b$ such that, in the prime factorizations of both $b$ and $b+1$, those primes which are $3$, $5$ or $6$ modulo $7$ all occur an even number of times.

The motivation here is that Jagy's questions seem to mix a "sieve" question and a "class group" question. My question aims to isolate the sieve problem as its own challenge.

-
Thank you for letting me know about this, David, and for crediting me. In your example $\pmod 7,$ I have been calling the interval $(b,b+1)$ "legal," similar (with appropriate lengths) for discriminant $\Delta = -q$ for other prime $q \equiv 7 \pmod 8,$ and one of the first things that happened was that Wadim Zudilin checked by computer for long "legal" intervals, and it was amazing how many there were even as the numbers got huge... Very kind of you. – Will Jagy Jun 24 2010 at 0:24

Just to get things started:

It happens that I already did the case of 7 in my original question. There are infinitely many solutions to $u^2 - 7 v^2 = 2$ in integers, beginning with $u = 3, \; v = 1.$ For any such pair, the positive binary form $x^2 + 7 y^2$ integrally represents the consecutive triple $$7 v^2, \; 1 + 7 v^2, \; 2 + 7 v^2 = u^2.$$ For the first and third numbers prime factorization is evident. For the middle number, and indeed anything integrally represented by $x^2 + 7 y^2,$ we know that for any prime factor $p$ with $(-7 | p) = -1$ the exponent must be even. In this particular case those exponents must be $0$ because of the $1.$ So there are an infinite number of these triples. Things get rapidly more difficult when replacing $7$ by any of $23, \; \; 71, \; \; 311, \; \; 479, \; \; 1559$ and asking for longer "legal" intervals.

-
 Will, I have to recall that there is a difference in considering the consecutive quadratic residues from the $0$ modulo $p$ or from a certain place $a\gg0$. There were some obstractions of getting "full length" represented in the latter case. You can add some info on this. – Wadim Zudilin Jun 24 2010 at 4:07 You're right, Wadim. Clearly David is not insisting on the intervals starting at $0 \pmod p,$ and the methods he is calling into play may work better without such restrictions. – Will Jagy Jun 24 2010 at 4:37

Something small, but maybe useful, which no one seems to have pointed out: as $p\to\infty$, $(\mathbb{Z}/p\mathbb{Z})^{\times}$ contains arbitrarily long strings of consecutive quadratic residues. Indeed, the function

$b(a)=2^{-k}(1+(\frac{a}{p}))(1+(\frac{a+1}{p}))\dots(1+(\frac{a+k-1}{p}))$

is $1$ or $0$ according to whether $(a,a+1,\dots,a+k-1)$ is a $k$-term string of quadratic residues or not. Summing over $(\mathbb{Z}/p\mathbb{Z})^{\times}$, expanding out and using the bound of Weil,

$\lvert \sum_{a \in (\mathbb{Z}/p\mathbb{Z})^{\times}} (\frac{(a+b_1)(a+b_2)\dots (a+b_r)}{p}) \rvert \leq 2r\sqrt{p},$

which holds if at least one $b_i$ is distinct from all the others, we derive

$\sum_{a \in (\mathbb{Z}/p\mathbb{Z})^{\times}}b(a)=2^{-k}p+O(k\sqrt{p})$.

The error term here comes from the fact that when we expand out $b(a)$ and sum, we'll get the obvious main term, plus $2^{-k}$ times a sum of $2^{k}-1$ Weil sums, each of which is bounded by $2k\sqrt{p}$.

Anyway, the main term dominates the error term if $k2^{k}=o(\sqrt{p})$, which certainly holds if (say) $k=o(\log{p}).$

-
 Very nice. Wadim was asking me to point out that these longs strings of residues need not begin at $1 \pmod p,$ and of course I would not have known your answer here. I cheat by only considering $p$ for which a very long string of residues begins at $1 \pmod p.$ – Will Jagy Jun 24 2010 at 17:15