The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A364384 a(n) is the number of quadratic equations u*x^2 + v*x + w = 0 with different solution sets L != {}, where n = abs(u) + abs(v) + abs(w), the coefficients u, v, w as well as the solutions x_1, x_2 are integers and GCD(u, v, w) = 1. 5

%I #24 Oct 05 2023 14:20:24

%S 1,3,2,6,3,6,2,8,4,7,4,8,2,10,4,8,5,10,2,10,4,10,4,10,4,11,6,8,4,12,2,

%T 14,4,8,6,12,5,12,4,10,4,14,2,14,6,8,6,12,4,15,6,10,4,12,4,14,6,12,4,

%U 14,2,14,6,10,9,14,4,12,4,12,4,18,2,16,6,8,8,12,4,16,6,13,6,14,4,14,6,10,4,18,4,18,6,8,6,14,4,16,6,14

%N a(n) is the number of quadratic equations u*x^2 + v*x + w = 0 with different solution sets L != {}, where n = abs(u) + abs(v) + abs(w), the coefficients u, v, w as well as the solutions x_1, x_2 are integers and GCD(u, v, w) = 1.

%H Felix Huber, <a href="/A364384/a364384.txt">Equations for a given n</a>.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Quadratic_equation">Quadratic equation</a>.

%e For n = 4 the a(4) = 6 solutions (u, v, w, x_1, x_2) with positive u are (1, -3, 0, 3, 0), (1, -2, 1, 1, 1), (1, -1, -2, 2, -1), (1, 1, -2, 1, -2), (1, 2, 1, -1, -1), (1, 3, 0, 0, -3).

%e Equations multiplied by -1 do not have a different solution set; for example, (-1, 3, 0, 3, 0) has the same solution set as (1, -3, 0, 3, 0).

%e Equations with GCD(u, v, w) != 1 are not considered, they belong to a lower n. For example (2, 2, 0, 0, -1) ist not considered here, it belongs to n = 2 with (1, 1, 0, 0, -1).

%p A364384 := proc(n) local i, u, v, w, x_1, x_2, a; a := 0; i := n; for v from 1 - i to i - 1 do for w from abs(v) - i + 1 to i - abs(v) - 1 do u := i - abs(v) - abs(w); if igcd(u, v, w) = 1 then x_1 := 1/2*(-v + sqrt(v^2 - 4*w*u))/u; x_2 := 1/2*(-v - sqrt(v^2 - 4*w*u))/u; if floor(Re(x_1)) = x_1 and floor(Re(x_2)) = x_2 then a := a + 1; end if; end if; end do; end do; end proc; seq(A364384(n), n = 1 .. 100);

%o (Python)

%o from math import gcd

%o from sympy import integer_nthroot

%o def A364384(n):

%o if n == 1: return 1

%o c = 0

%o for v in range(0,n):

%o for w in range(0,n-v):

%o u = n-v-w

%o if gcd(u,v,w)==1:

%o v2, w2, u2 = v*v, w*(u<<2), u<<1

%o if v2+w2>=0:

%o d, r = integer_nthroot(v2+w2,2)

%o if r and not ((d+v)%u2 or (d-v)%u2):

%o c += 1

%o if v>0 and w>0:

%o c += 1

%o if v2-w2>=0:

%o d, r = integer_nthroot(v2-w2,2)

%o if r and not((d+v)%u2 or (d-v)%u2):

%o c += 1

%o if v>0 and w>0:

%o c += 1

%o return c # _Chai Wah Wu_, Oct 04 2023

%Y Cf. A364385 (partial sums), A365876, A365877, A365892

%K easy,nonn

%O 1,2

%A _Felix Huber_, Jul 22 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 02:19 EDT 2024. Contains 373416 sequences. (Running on oeis4.)