Suppose we have $D$ prime and $d$ square free. Is there a way to express the smallest integer $n$ that makes $d \vert (Dn2)$? If such an $n$ exists for a given $D$, $d$ it must exist less than $d$, but is there some function of $D$ and $d$ that gives it explicitly?
Hi guys, sorry I caused a fuss. The fact of the matter is (from what my limited understanding tells me) is that is if you solved this question, you could then tackle the weirdly huge error term in Brun's sieve. You're all probably familiar with this sieve, but it frustrates me that we must assume all error terms (typically written) $R_d$ (of fluctuating sign) positive in order to bound its sum as an alternating series. I understand that we expect there to be about $$\frac{N/2}{d}2^{\omega(d)}$$ integers n between $N/2$ and $N$ that will allow $d\vert n(Dn2)$, and I understand that this may sometimes be an overestimate (resulting in a negative $R_d$) or an underestimate (resulting in a positive $R_d$). Furthermore, because Brun's error is written as an alternating series over these $R_d$, the rectification of signs becomes tragic. I was thinking that if my above question was answerable, we would be able to rectify when Brun's main term is an underestimate, and when it is an underestimate, and thus we would not have to simply take the error as the strictly positive sum over $\vert R_d \vert$ which blows up way quicker than it has to. I have been using fairly standard sieve theory notation without explaining it, and for that I apologize. Furthermore I just graduated high school as Gerhard Paseman correctly pointed out, so I apologize further for the elementary nature of my comment. Thank you sirs for your patience, I will keep looking.

$\begingroup$ The above isn't actually an answer, it was simply to long to write as an additional comment. $\endgroup$ – Alex Botros Aug 8 '11 at 3:50

$\begingroup$ Now that you have mentioned the motivation, you might consider related problems which might be solvable and applicable, such as what else you could say that would help with the error term. Perhaps, as Joe Silverman suggests, looking at how n is distributed would be of use. Gerhard "Ask Me About System Design" Paseman, 2011.08.07 $\endgroup$ – Gerhard Paseman Aug 8 '11 at 4:48
$\\{0,1,2,\ldots,d1\\}$
. I doubt there's a simple formula, since as $D$ varies, the quantity $D^{1}\bmod}{d}$ will jump all over the place. I also doubt it's relevant that $D$ is prime, although $d$ being square free might help. I'm pretty sure people have at least studied the sequence $D^{1}\bmod{p}$ as a function of $D$, where $p$ is prime. But those would be averaging results, or estimating the smallest $D$ such that $D^{1}\bmod{p}$ is also "small". (I'm going to add an "nt" tag.) $\endgroup$ – Joe Silverman Aug 6 '11 at 19:24