Find $C$ such that $x^2 - 47x - C = 0$ has integer roots, and further conditions

Have been working on this for years. Need a system which proves that there exists a number $C$ which has certain properties. I will give a specific example, but am looking for a system which could possibly be generalized.

Find (or prove there exists) $C$, such that the quadratic $x^2 - 47x - C = 0$ has integer roots, and furthermore, $C$ must have ALL OF $2$, $3$ and $5$ as its only prime factors (though each of these can be to any positive integer power).

• can $C$ be negative? – Joao Oct 27 '14 at 22:34
• All the answers seem to assume that $C$ must be a multiple of $30$ without justification. Did you mean that we must prove $30|C$? or was that a requirement on $C$ – Ross Millikan Oct 28 '14 at 15:50
• @RossMillikan The original question specifies that the powers of 2,3,5 are each positive integers. – J. David Taylor Oct 28 '14 at 18:14
• @J.DavidTaylor: from the wording, I couldn't tell if it was to be proven that all $C$ which result in an integer solution are divisible by $30$, or to be assumed as a requirement on $C$. It is not true, as $C=48$ works with roots $-1,47$ – Ross Millikan Oct 28 '14 at 18:41
• That's fair enough. – J. David Taylor Oct 28 '14 at 18:47

The quadratic formula implies that this is equivalent to getting $47^2+4C$ to be the square of an odd integer.

$$47^2-(2n+1)^2=-4C\\ 4(23-n)(24+n)=-4C\\ (n-23)(n+24)=C$$

So we need to find $n$ such that $(n-23)(n+24)$ is a multiple of $30$ with no prime factors other than $2,3,5$ and $47^2+4(n-23)(n+24)\geq 0$.

Inspection reveals $n=3$ as a solution with $C=-20\cdot 27=-2^23^35=-540$. Then $47^2+4C=49$ and the quadratic formula gives roots $$\frac{47+7}{2}=27\text{ and }\frac{47-7}{2}=20$$ to the equation $$x^2-47x+540=0$$

Edit:

This was "too long for a comment."

I speculate that the method I give above can be pushed a little further to get which values of $n$ work, hence giving an integral parametrization of the solutions ($C$) of the problem.

The same approach can be applied to $x^2-397x-C=0$ with $2,3,5,7,11,13,17,19$ as prime factors. You are right that "inspection" only gets so far. I don't want to spend the time on the case you put in your comment, but my initial approach would be use the method above to get a parametrization of $C$ in terms of $n$, use congruences and the chinese remainder theorem to restrict the possible values of $n$, and to write a short algorithm finding the first few $n$ that work.

• Nice and efficient. Still, I'm looking for something more general where "by inspection" might be prohibitively difficult. Try x^2-397x-C=0 where 2,3,5,7,11,13,17, and 19 are the prime factors of C. (going to study the typeset soon) I should have given this problem first. Thanks for the response. – Aaron Horak Oct 28 '14 at 12:49
• Thank you I will take a look at these possibilities (though I have considered such things before). The difficulty arises in showing a solution exists which has no other prime factors than those given i.e. 2....19 – Aaron Horak Oct 29 '14 at 17:12
• Well, before I suggest more, would you do me the courtesy of adding to your post and explanation of what you have tried, where it breaks down, and your number theory background. It is standard on MSE to give a little context to your question. Makes it easier to see how to help you. – J. David Taylor Oct 29 '14 at 17:29
• I will be working twelve hrs today and I doubt I'll have time Friday either, but I will try to add info to my background where it should be... but for now, I have a Bachelor's and Master's in mathematics, taught at a community college 8 yrs approximately, and am now teaching at a quasi-military camp for troubled youth. My original conjecture is that given prime p,there exists A and B (co-prime) such that $A\pm B=p$ and the prime factors of AB are precisely those primes less than the square root of p. I will give more info as time permits, I'm getting ready to be busy right now. Thank you. – Aaron Horak Oct 30 '14 at 12:18
• By the way, in case you haven't seen it, I added more info on the entire conjecture in the post "Prime number conjecture". – Aaron Horak Nov 3 '14 at 22:44

Say $$x^2 -47x - c = (x-a)(x-b)$$ for integers $a$ and $b$. Then $$a + b = 47 \\ -ab = C.$$ So $a$ and $b$ must have only $2,3,5$ in their prime factorization.

Say $b$ is divisible by $5$ (one of them must be). So say $b = 5n$. So then $47 - a$ is divisible by $5$. And $a$ must be $-13 , -8 , -3 , 2, 7, 12, 17, \dots$. So $a = 2 + 5m$. Pick out those that are divisible by only $2$ or $3$.

By trial and error $$a = -3, b = 50$$ would work. Another solution is $$a = 72, b = - 25.$$ Note, for example that $a=12$ would give $b = 35$, but then $b$ is divisible by $7$.

• Nice observation! This is actually the form my conjecture originally took - I actually used A and B also. I'm embarrassed to admit that it took a couple of years to go from this form to recognizing that it was equivalent to this new quadratic format. Thanks for the response. See my comment above for an example of an equation this form would be too slow to answer. – Aaron Horak Oct 28 '14 at 12:53

$$C=150=2\cdot3\cdot5^2\implies x\in\{-3,50\}$$ $$C=-90=-2\cdot3^2\cdot5\implies x\in\{2,45\}$$ $$C=-480=-2^5\cdot3\cdot5\implies x\in\{15,32\}$$ $$C=-540=-2^2\cdot3\cdot5^2\implies x\in\{20,27\}$$

• Would you add to your answer something that will give the OP insight as to how you found this? As is you are giving him fish, but not showing him where they can be found. – J. David Taylor Oct 27 '14 at 22:58
• @Did and $$C=-1800=-2^3\cdot3^2\cdot5^2\implies x\in\{-25,72\}$$ – martin Oct 31 '14 at 12:48

Well if $ax^2+bx+c$ has integer roots, then $\frac{-b\pm \sqrt{b^2-4ac}}{2a}$ is an integer. Since in this case $a=1$ and $b=-47$ and we want to find $C$, $$\frac{47\pm \sqrt{(-47)^2+4C}}{2}=\frac{47\pm \sqrt{2209+4C}}{2}$$ is an integer. $47$ is odd. Since the fraction is an integer, the numerator must be divisible by $2$. Since $47\pm \text{odd_number}$ is even (and even means divisible by two), $\sqrt{2209+4C}$ must be an odd number. That in turn means $2209+4C$ must be an odd square.

We also know that $C=2^a\times 5^b\times 3^c$. So now we need to solve the equation $2209+4\times 2^a5^b3^c=x^2$ for integers. You can use a computer to solve it from here if you like.

$$2209+4\times 2^a5^b3^c=\text{a square bigger than 2209}\\ \Longrightarrow \text{a square bigger than 2209}-2209=4\times 2^a5^b3^c\\ \Longrightarrow (47+l)^2-47^2=4\times 2^a5^b3^c$$

For some integer $l$. See if you take it from here...

• Actually, it would be +4C because C was originally subtracted in the quadratic. So if the determinant is D, we have that D^2=p^2+4C. Thanks for the response. I'll have time later to get on here again and I'll study the typesetting before I post again. See above comment where I give similar quadratic with 397 as middle term, and all primes from 2 to 19 as factors of C. Thanks for all the help! – Aaron Horak Oct 28 '14 at 12:58
• In the above comment, it should say $D=p^2+4C$ and by the way, p stands for the 47. Or in the alternative that I gave to show how general I need to make the method, $x^2-397x-C=0$ the p would be 397. Again, I just need to show C exists with the required factorization, I don't need to actually find C. I have a few programs in PARI and one of them is based on the same ideas as your post above (approximately) and it couldn't find C for this quadratic, but that may be because C is too large... – Aaron Horak Oct 28 '14 at 14:55
• @AaronHorak wow thats embarrassing, thanks for notifying me. There are better answers here, but I'm proud to help you with your problem. Cheers. – Joao Oct 29 '14 at 0:42