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!)
A365877 a(n) is the number of quadratic equations u*x^2 + v*x + w = 0 with distinct solution sets L != {} and integer coefficients u, v, w, where n >= abs(u) + abs(v) + abs(w) and the sum of the solutions equals the product of the solutions. 5

%I #17 Oct 05 2023 14:21:01

%S 1,1,2,3,5,6,9,11,15,17,23,25,32,35,40,44,53,56,66,71,78,83,95,100,

%T 111,117,127,134,150,154,171,180,191,199,213,220,240,250,263,272,294,

%U 301,324,335,348,360,386,395,419,430,448,461,490,500,522,536,556,571,603

%N a(n) is the number of quadratic equations u*x^2 + v*x + w = 0 with distinct solution sets L != {} and integer coefficients u, v, w, where n >= abs(u) + abs(v) + abs(w) and the sum of the solutions equals the product of the solutions.

%C According to Vieta's formulas, x_1 + x_2 = -v/u and x_1*x_2 = w/u. So x_1 + x_2 = x_1*x_2 when v = -w. Furthermore, the discriminant must not be negative, i.e., v^2 - 4*u*w = v^2 + 4*u*v >= 0.

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

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Vieta%27s_formulas">Vieta's formulas</a>.

%F a(n) = Sum_{k=1..n} A365876(k).

%F a(n) = A341123(n) for 1 <= n <= 13.

%e For n = 11 the a(11) = 23 equations are given by (u, v, w) = (1, 0, 0), (1, 1, -1), (2, 1, -1), (1, 2, -2), (3, 1, -1), (4, 1, -1), (5, 1, -1), (3, 2, -2), (1, 3, -3), (6, 1, -1), (2, 3, -3), (7, 1, -1), (5, 2, -2), (1, 4, -4), (-1, 4, -4), (8, 1, -1), (4, 3, -3), (9, 1, -1), (7, 2, -2), (5, 3, -3), (3, 4, -4), (1, 5, -5), (-1, 5, -5).

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

%e Equations with GCD(u, v, w) != 1 are excluded, because their solution set are assigned to equations with lower n. For example, (2, 0, 0) is not included here, because its solution set is already assigned to (1, 0, 0).

%e Equations with a double solution are considered to have two equal solutions. For example, (-1, 4, -4) has the two solutions x_1 = x_2 = 2.

%p A365876:= proc(n) local u, v, a, min; u := n; v := 0; a := 0; min := true; while min = true do if u <> 0 and gcd(u, v) = 1 then a := a + 1; end if; u := u - 2; v:=(n-abs(u))/2; if u < -1/9*n then min := false; end if; end do; return a; end proc;

%p A365877:= proc(n) local s; option remember; if n = 1 then A365876(1); else procname(n - 1) + A365876(n); end if; end proc; seq(A365877(n), n = 1 .. 59);

%o (Python)

%o from math import gcd

%o def A365877(n):

%o if n == 1: return 1

%o c = 1

%o for m in range(2,n+1):

%o for v in range(1,m+1>>1):

%o u = m-(v<<1)

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

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

%o if v2+u2 >= 0:

%o c +=1

%o if v2-u2 >= 0:

%o c +=1

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

%Y Cf. A364384, A364385, A341123, A365892.

%Y Partial sums of A365876.

%K nonn

%O 1,3

%A _Felix Huber_, Sep 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 July 16 03:21 EDT 2024. Contains 374343 sequences. (Running on oeis4.)