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.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

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, 41, 43, 46, 46, 49, 49, 54, 54, 55, 55, 64, 64, 65, 65, 70, 70, 71, 71, 74, 76, 77, 77, 86, 92, 97, 97, 100, 100, 103, 103, 108, 108, 109, 109, 118, 118, 119, 121, 130
Offset: 1

Views

Author

Ctibor O. Zizka, May 30 2025

Keywords

Comments

When the discriminant of a quadratic equation equals zero, the equation has exactly one real solution (a repeated root).

Examples

			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.
  D_1 = 1^2 - 4*1*1 = -3  (x^2 + x + 1),
  D_2 = 1^2 - 4*1*2 = -7  (x^2 + x + 2),
  D_3 = 1^2 - 4*2*1 = -7  (2*x^2 + x + 1),
  D_4 = 1^2 - 4*2*2 = -7  (2*x^2 + x + 2),
  D_5 = 2^2 - 4*1*1 = 0   (x^2 + 2*x + 1),
  D_6 = 2^2 - 4*1*2 = -4  (x^2 + 2*x + 2),
  D_7 = 2^2 - 4*2*1 = -4  (2*x^2 + 2*x + 1),
  D_8 = 2^2 - 4*2*2 = -4  (2*x^2 + 2*x + 2).
One discriminant D_5 = 0 (of the quadratic equation x^2 + 2*x + 1) , thus a(2) = 1.
		

Crossrefs

Cf. A384666.

Programs

  • Mathematica
    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 *)
  • 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
    
  • Python
    from math import isqrt
    from sympy.ntheory.primetest import is_square
    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

A385029 a(n) = Sum_{-n <= a, b, c <= n} (b^2 - 4*a*c).

Original entry on oeis.org

18, 250, 1372, 4860, 13310, 30758, 63000, 117912, 205770, 339570, 535348, 812500, 1194102, 1707230, 2383280, 3258288, 4373250, 5774442, 7513740, 9648940, 12244078, 15369750, 19103432, 23529800, 28741050, 34837218, 41926500, 50125572, 59559910, 70364110, 82682208, 96668000
Offset: 1

Views

Author

DarĂ­o Clavijo, Jun 15 2025

Keywords

Comments

There are (2*n + 1)^3 combinations of a, b, c.

Crossrefs

Programs

  • Mathematica
    A385029[n_] := (n*(n + 1)*(2*n + 1)^3)/3;
    Array[A385029, 50] (* Paolo Xausa, Jun 18 2025 *)
  • Python
    a = lambda n: ((n*n+n)*((n << 1)+1)**3)//3
    print([a(n) for n in range(1, 11)])

Formula

a(n) = (n*(n+1)*(2*n+1)^3)/3.
a(n) = (A055112(n)*A016754(n))/3.
a(n) = (A002378(n)*A016755(n))/3.
G.f.: 2*x*(9 + 71*x + 71*x^2 + 9*x^3)/(1 - x)^6. - Stefano Spezia, Jun 15 2025
From Amiram Eldar, Jun 18 2025; (Start)
Sum_{n>=1} 1/a(n) = 21*(1 - zeta(3)/2) - 12*log(2).
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*Pi^3/8 + 3*Pi - 21. (End)
Showing 1-2 of 2 results.