cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A348139 Three-digit numbers abc such that the quadratic equation ax^2 + bx + c = 0 has a rational root.

Original entry on oeis.org

100, 110, 120, 121, 130, 132, 140, 143, 144, 150, 154, 156, 160, 165, 168, 169, 170, 176, 180, 187, 190, 198, 200, 210, 220, 230, 231, 240, 242, 250, 252, 253, 260, 264, 270, 273, 275, 276, 280, 286, 288, 290, 294, 297, 299, 300, 310, 320, 330, 340, 341, 350, 352, 360, 363, 370, 372, 374, 380, 384, 385, 390, 396, 400, 410, 420, 430, 440, 441, 450, 451, 460, 462, 470
Offset: 1

Views

Author

Bernard Schott, Oct 02 2021

Keywords

Comments

Inequalities: 1 <= a <= 9, 0 <= b, c <= 9.
If the quadratic equation ax^2 + bx + c = 0 has a rational root, then b^2-4ac is a square, the two roots are rational and nonpositive.
Proposition: these three-digit numbers abc are all composite.
The Olympiad problem proposed in Changhua, Taiwan, 2010 (see Reference) asked for a proof that the three-digit number abc is not a prime number.
If abc is a term with a, b, c >= 1 then cba is another term.
The total number of terms is 147.
The first 19 terms are also the first 19 terms of A033828, then A033828(20) = 182 while a(20) = 187.
Also, the first 23 terms are the first 23 3-digit terms of A267509, from A267509(39) to A267509(61), then A267509(62) = 202 while a(24) = 210.

Examples

			x^2 + 2x = x*(x+2), whose roots are {-2, 0}, so 120 is a term.
2x^2 = 0 has double root {0}, so 200 is a term.
4x^2 + 7x + 3 = 4*(x+1)*(x+3/4), whose roots are {-3/4, -1}, so 473 = 11*43 is a term.
		

References

  • Xiong Bin and Lee Peng Yee, Mathematical Olympiad in China (2009-2010), Problems and Solutions, Changhua, Taiwan, 2010, First Day, Problem 1, p. 147, East China Normal university Press - World Scientific, 2013.

Crossrefs

Programs

  • Mathematica
    Select[Range[100, 999], (d = (#[[2]]^2 - 4*#[[1]]*#[[3]])&@ IntegerDigits[#]) >= 0 && IntegerQ @ Sqrt[d] &] (* Amiram Eldar, Oct 02 2021 *)
  • PARI
    isok(m) = my(d=digits(m)); (#d==3) && issquare(d[2]^2 - 4*d[1]*d[3]); \\ Michel Marcus, Oct 03 2021
  • Python
    from math import isqrt
    def ok(n):
        s = str(n)
        if len(s) != 3: return False
        a, b, c = list(map(int, s))
        D = b**2 - 4*a*c
        return D >= 0 and isqrt(D)**2 == D
    def afull(): return [m for m in range(100, 1000) if ok(m)]
    print(afull()) # Michael S. Branicky, Oct 02 2021