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.

This page as a plain text file.
%I A348139 #35 Oct 13 2021 15:42:49
%S A348139 100,110,120,121,130,132,140,143,144,150,154,156,160,165,168,169,170,
%T A348139 176,180,187,190,198,200,210,220,230,231,240,242,250,252,253,260,264,
%U A348139 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
%N A348139 Three-digit numbers abc such that the quadratic equation ax^2 + bx + c = 0 has a rational root.
%C A348139 Inequalities: 1 <= a <= 9, 0 <= b, c <= 9.
%C A348139 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.
%C A348139 Proposition: these three-digit numbers abc are all composite.
%C A348139 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.
%C A348139 If abc is a term with a, b, c >= 1 then cba is another term.
%C A348139 The total number of terms is 147.
%C A348139 The first 19 terms are also the first 19 terms of A033828, then A033828(20) = 182 while a(20) = 187.
%C A348139 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.
%D A348139 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.
%H A348139 Michel Marcus, <a href="/A348139/b348139.txt">Table of n, a(n) for n = 1..147</a>
%H A348139 <a href="/index/O#Olympiads">Index to sequences related to Olympiads</a>.
%e A348139 x^2 + 2x = x*(x+2), whose roots are {-2, 0}, so 120 is a term.
%e A348139 2x^2 = 0 has double root {0}, so 200 is a term.
%e A348139 4x^2 + 7x + 3 = 4*(x+1)*(x+3/4), whose roots are {-3/4, -1}, so 473 = 11*43 is a term.
%t A348139 Select[Range[100, 999], (d = (#[[2]]^2 - 4*#[[1]]*#[[3]])&@ IntegerDigits[#]) >= 0 && IntegerQ @ Sqrt[d] &] (* _Amiram Eldar_, Oct 02 2021 *)
%o A348139 (Python)
%o A348139 from math import isqrt
%o A348139 def ok(n):
%o A348139     s = str(n)
%o A348139     if len(s) != 3: return False
%o A348139     a, b, c = list(map(int, s))
%o A348139     D = b**2 - 4*a*c
%o A348139     return D >= 0 and isqrt(D)**2 == D
%o A348139 def afull(): return [m for m in range(100, 1000) if ok(m)]
%o A348139 print(afull()) # _Michael S. Branicky_, Oct 02 2021
%o A348139 (PARI) isok(m) = my(d=digits(m)); (#d==3) && issquare(d[2]^2 - 4*d[1]*d[3]); \\ _Michel Marcus_, Oct 03 2021
%Y A348139 Cf. A033828, A267509.
%K A348139 nonn,base,fini,full
%O A348139 1,1
%A A348139 _Bernard Schott_, Oct 02 2021