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.

A384469 a(n) is the number of triples 1 <= A, B, C <= n such that the discriminant D = B^2 - 4*A*C of the polynomial A*x^2 + B*x + C is 0.

This page as a plain text file.
%I A384469 #34 Jun 13 2025 14:25:25
%S A384469 0,1,1,4,4,5,5,8,10,11,11,16,16,17,17,22,22,25,25,28,28,29,29,36,40,
%T A384469 41,43,46,46,49,49,54,54,55,55,64,64,65,65,70,70,71,71,74,76,77,77,86,
%U A384469 92,97,97,100,100,103,103,108,108,109,109,118,118,119,121,130
%N A384469 a(n) is the number of triples 1 <= A, B, C <= n such that the discriminant D = B^2 - 4*A*C of the polynomial A*x^2 + B*x + C is 0.
%C A384469 When the discriminant of a quadratic equation equals zero, the equation has exactly one real solution (a repeated root).
%H A384469 Chai Wah Wu, <a href="/A384469/b384469.txt">Table of n, a(n) for n = 1..10000</a>
%H A384469 Ctibor O. Zizka, <a href="/A384469/a384469.png">Colour matrix for n = 1 to 100, B^2 = 4*A*C (green, this sequence), B^2 > 4*A*C (red), B^2 < 4*A*C (blue)</a>
%e A384469 For n = 2, for 1 <= A, B, C <= 2, a(2) is the number of discriminants D = B^2 - 4*A*C, where D = 0.
%e A384469   D_1 = 1^2 - 4*1*1 = -3  (x^2 + x + 1),
%e A384469   D_2 = 1^2 - 4*1*2 = -7  (x^2 + x + 2),
%e A384469   D_3 = 1^2 - 4*2*1 = -7  (2*x^2 + x + 1),
%e A384469   D_4 = 1^2 - 4*2*2 = -7  (2*x^2 + x + 2),
%e A384469   D_5 = 2^2 - 4*1*1 = 0   (x^2 + 2*x + 1),
%e A384469   D_6 = 2^2 - 4*1*2 = -4  (x^2 + 2*x + 2),
%e A384469   D_7 = 2^2 - 4*2*1 = -4  (2*x^2 + 2*x + 1),
%e A384469   D_8 = 2^2 - 4*2*2 = -4  (2*x^2 + 2*x + 2).
%e A384469 One discriminant D_5 = 0 (of the quadratic equation x^2 + 2*x + 1) , thus a(2) = 1.
%t A384469 a[n_] := Sum[Boole[b^2 - 4*a*c == 0], {a, 1, n}, {b, 1, n}, {c, 1, n}]; Array[a, 64] (* _Amiram Eldar_, Jun 02 2025 *)
%o A384469 (PARI) a(n) = sum(x=1, n, sum(y=1, n, sum(z=1, n, x^2-4*y*z==0))); \\ _Michel Marcus_, Jun 13 2025
%o A384469 (Python)
%o A384469 from math import isqrt
%o A384469 from sympy.ntheory.primetest import is_square
%o A384469 def A384469(n): return (sum(1 for a in range(1,n+1) for c in range(1,a) if ((m:=a*c)<<2)<=n**2 and is_square(m))<<1)+isqrt(n**2>>2) # _Chai Wah Wu_, Jun 13 2025
%Y A384469 Cf. A384666.
%K A384469 nonn
%O A384469 1,4
%A A384469 _Ctibor O. Zizka_, May 30 2025