A364385
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) and the coefficients u, v, w as well as the solutions x_1, x_2 are integers.
Original entry on oeis.org
1, 4, 6, 12, 15, 21, 23, 31, 35, 42, 46, 54, 56, 66, 70, 78, 83, 93, 95, 105, 109, 119, 123, 133, 137, 148, 154, 162, 166, 178, 180, 194, 198, 206, 212, 224, 229, 241, 245, 255, 259, 273, 275, 289, 295, 303, 309, 321, 325, 340, 346, 356, 360, 372, 376, 390, 396
Offset: 1
For n = 3 the a(3) = 6 solutions (u, v, w, x_1, x_2) with positive u are (1, 0, 0, 0, 0), (1, -1, 0, 1, 0), (1, 0, -1, 1, -1), (1, 1, 0, 0, -1), (1, -2, 0, 2, 0), (1, 2, 0, 0, -2).
Equations multiplied by -1 do not have a different solution set, for example (-1, 1, 0, 1, 0) has the same solution set as (1, -1, 0, 1, 0).
-
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;
A364385 := proc(n) local s; option remember; if n = 1 then A364384(1); else procname(n - 1) + A364384(n); end if; end proc; seq(A364385(n), n = 1 .. 57);
-
from math import gcd
from sympy import integer_nthroot
def A364385(n):
c = 0
for v in range(0,n):
for w in range(0,n-v):
for u in range(1,n-v-w+1):
if gcd(u,v,w)==1:
v2, w2, u2 = v*v, w*(u<<2), u<<1
if v2+w2>=0:
d, r = integer_nthroot(v2+w2,2)
if r and not ((d+v)%u2 or (d-v)%u2):
c += 1
if v>0 and w>0:
c += 1
if v>0 and v2-w2>=0:
d, r = integer_nthroot(v2-w2,2)
if r and not((d+v)%u2 or (d-v)%u2):
c += 1
if w>0:
c += 1
return c # Chai Wah Wu, Oct 04 2023
A365876
a(n) is the number of quadratic equations u*x^2 + v*x + w = 0 with distinct solution sets L != {}, integer coefficients u, v, w and GCD(u, v, w) = 1, where n = abs(u) + abs(v) + abs(w) and the sum of the solutions equals the product of the solutions.
Original entry on oeis.org
1, 0, 1, 1, 2, 1, 3, 2, 4, 2, 6, 2, 7, 3, 5, 4, 9, 3, 10, 5, 7, 5, 12, 5, 11, 6, 10, 7, 16, 4, 17, 9, 11, 8, 14, 7, 20, 10, 13, 9, 22, 7, 23, 11, 13, 12, 26, 9, 24, 11, 18, 13, 29, 10, 22, 14, 20, 15, 32, 9, 33, 16, 20, 18, 27, 11, 37, 18, 25, 13, 39, 13, 40, 20
Offset: 1
For n = 9 the a(9) = 4 equations are given by (u, v, w) = (7, 1, -1), (5, 2, -2), (1, 4, -4), (-1, 4, -4).
Equations multiplied by -1 do not have a different solution set; for example, (-7, -1, 1) has the same solution set as (7, 1, -1).
Equations with GCD(u, v, w) != 1 are excluded, because their solution sets are assigned to equations with lower n. For example, (3, 3, -3) is not included here, because its solution set is already assigned to (1, 1, -1).
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.
-
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; seq(A365876(n), n = 1 .. 74);
-
from math import gcd
def A365876(n):
if n == 1: return 1
c = 0
for v in range(1,n+1>>1):
u = n-(v<<1)
if gcd(u,v)==1:
v2, u2 = v*v, v*(u<<2)
if v2+u2 >= 0:
c +=1
if v2-u2 >= 0:
c +=1
return c # Chai Wah Wu, Oct 04 2023
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.
Original entry on oeis.org
1, 1, 2, 3, 5, 6, 9, 11, 15, 17, 23, 25, 32, 35, 40, 44, 53, 56, 66, 71, 78, 83, 95, 100, 111, 117, 127, 134, 150, 154, 171, 180, 191, 199, 213, 220, 240, 250, 263, 272, 294, 301, 324, 335, 348, 360, 386, 395, 419, 430, 448, 461, 490, 500, 522, 536, 556, 571, 603
Offset: 1
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).
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).
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).
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.
-
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;
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);
-
from math import gcd
def A365877(n):
if n == 1: return 1
c = 1
for m in range(2,n+1):
for v in range(1,m+1>>1):
u = m-(v<<1)
if gcd(u,v)==1:
v2, u2 = v*v, v*(u<<2)
if v2+u2 >= 0:
c +=1
if v2-u2 >= 0:
c +=1
return c # Chai Wah Wu, Oct 05 2023
A365892
a(n) is the index of the n-th term of A365876 that includes at least one equation with at least one integer solution.
Original entry on oeis.org
1, 4, 9, 11, 20, 22, 35, 37, 54, 56, 77, 79, 104, 106, 135, 137, 170, 172, 209, 211, 252, 254, 299, 301, 350, 352, 405, 407, 464, 466, 527, 529, 594, 596, 665, 667, 740, 742, 819, 821, 902, 904, 989, 991, 1080, 1082, 1175, 1177, 1274, 1276, 1377, 1379, 1484, 1486
Offset: 1
a(1) = 1 since the equation x^2 = 0 belonging to A365876(1) has the integer solution 0. 1 is the 1st term that includes at least one equation with at least one integer solution.
a(2) = 4 since the equation 2*x^2 + x - 1 = 0 belonging to A365876(4) has the integer solution -1. 4 is the 2nd term that includes at least one equation with at least one integer solution.
a(3) = 9 since the equation -x^2 + 4*x - 1 = 0 belonging to A365876(9) has the integer solution 2. 9 is the 3rd term that includes at least one equation with at least one integer solution.
a(4) = 11 since the equation 3*x^2 + 4*x - 4 = 0 belonging to A365876(11) has the integer solution -2. 11 is the 4th term that includes at least one equation with at least one integer solution.
-
A365892 := proc(n_A365876) local u, v, a, min, x_1, x_2; u := n_A365876; v := 0; a := false; min := true; while min = true do if u <> 0 and gcd(u, v) = 1 then x_1 := 1/2*(-v + sqrt(v^2 + 4*v*u))/u; x_2 := 1/2*(-v - sqrt(v^2 + 4*v*u))/u; if x_1 = floor(x_1) or x_2 = floor(x_2) then a := true; end if; end if; u := u - 2; v := 1/2*n_A365876 - 1/2*abs(u); if u < -1/9*n_A365876 then min := false; end if; end do; if a = true then return n_A365876; end if; end proc; seq(A365892(n_A365876), n_A365876 = 1 .. 1486);
-
from math import gcd
from itertools import count, islice
from sympy import integer_nthroot
def A365892_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue,1)):
if n == 1:
yield 1
else:
for v in range(1,n+1>>1):
u = n-(v<<1)
if gcd(u,v)==1:
v2, u2, a = v*v, v*(u<<2), u<<1
if v2+u2 >= 0:
d,r = integer_nthroot(v2+u2,2)
if r and not ((d+v)%a and (d-v)%a):
yield n
break
if v2-u2 >= 0:
d,r = integer_nthroot(v2-u2,2)
if r and not ((d+v)%a and (d-v)%a):
yield n
break
A365892_list = list(islice(A365892_gen(),20)) # Chai Wah Wu, Oct 04 2023
A373995
Zeros x1 of polynomial functions f(x) = 1/k*x*(x - x1)*(x - x2), which have three integer zeros 0, x1 and x2 (with 0 < x1 < x2) as well as two extreme points and one inflection point with integer x-coordinates (sorted in ascending order, first by the sum x1 + x2 and then by x1).
Original entry on oeis.org
9, 15, 18, 21, 24, 15, 30, 27, 48, 45, 36, 42, 33, 48, 21, 30, 60, 45, 72, 39, 75, 54, 63, 72, 48, 99, 27, 96, 63, 45, 90, 105, 72, 84, 105, 66, 96, 42, 117, 51, 81, 60, 120, 33, 96, 90, 105, 144, 120, 135, 57, 144, 99, 168, 78, 135, 75, 150, 120, 108, 126, 99, 144
Offset: 1
9 is in the sequence, since the x-cordinates of the extreme points and of the inflection point of f(x) = 1/k*x*(x - 9)*(x - 24) are 4, 18 and 11.
24 is in the sequence, since the x-cordinates of the extreme points and of the inflection point of f(x) = 1/k*x*(x - 24)*(x - 45) are 10, 36 and 23.
-
A373995:=proc(s)
local x_1,x_2,x_3,x_4,L;
L:=[];
for x_1 from 1 to floor((s-1)/2) do
x_2:=s-x_1;
x_3:=(x_1+x_2+sqrt(x_1^2+x_2^2-x_1*x_2))/3;
x_4:=(x_1+x_2-sqrt(x_1^2+x_2^2-x_1*x_2))/3;
if x_3=floor(x_3) and x_4=floor(x_4) then
L:=[op(L),x_1];
fi;
od;
return op(L);
end proc;
seq(A373995(s),s=3..414);
A373996
Zeros x2 of polynomial functions f(x) = 1/k*x*(x - x1)*(x - x2), which have three integer zeros 0, x1 and x2 (with 0 < x1 < x2) as well as two extreme points and one inflection point with integer x-coordinates (sorted in ascending order, first by the sum x1 + x2 and then by x1).
Original entry on oeis.org
24, 24, 48, 45, 45, 63, 48, 72, 63, 72, 96, 90, 105, 90, 120, 126, 96, 120, 105, 144, 120, 144, 135, 135, 165, 120, 195, 126, 168, 189, 144, 144, 192, 180, 168, 210, 180, 240, 165, 240, 216, 252, 192, 288, 231, 240, 225, 189, 225, 216, 297, 210, 264, 195, 288, 231, 315, 240, 273, 288, 270, 315, 270
Offset: 1
24 is twice in the sequence, since the x-cordinates of the extreme points and of the inflection point of f(x) = 1/k*x*(x - 9)*(x - 24) are 4, 18 and 11 and of f(x) = 1/k*x*(x - 15)*(x - 24) are 6, 20 and 13.
-
A373996:=proc(s)
local x_1,x_2,x_3,x_4,L;
L:=[];
for x_1 from 1 to floor((s-1)/2) do
x_2:=s-x_1;
x_3:=(x_1+x_2+sqrt(x_1^2+x_2^2-x_1*x_2))/3;
x_4:=(x_1+x_2-sqrt(x_1^2+x_2^2-x_1*x_2))/3;
if x_3=floor(x_3) and x_4=floor(x_4) then
L:=[op(L),x_2];
fi;
od;
return op(L);
end proc;
seq(A373996(s),s=3..414);
A373997
Greatest positive integer k for which the y-coordinates of the extreme points and the inflection point of y = f(x) = 1/k*(x - A373995(n))*(x - A373996(n)) are integers.
Original entry on oeis.org
2, 2, 16, 2, 2, 2, 16, 54, 2, 54, 128, 16, 2, 16, 2, 16, 128, 250, 2, 2, 250, 432, 54, 54, 2, 2, 2, 16, 686, 54, 432, 2, 1024, 128, 686, 16, 128, 16, 2, 2, 1458, 128, 1024, 2, 2, 2000, 250, 54, 250, 1458, 2, 16, 2662, 2, 16, 2, 250, 2000, 2, 3456, 432, 54, 432
Offset: 1
a(3) = 16, since y = f(x) = 1/16*(x - 18)*(x - 48) has the extrema (8, 200), (36, -486) and the inflection point (22, -143). Since GCD(200, -143, -486) = 1, there is no value of k > 16, for which the y-coordinates of these three points are all integers.
-
A373997:=proc(s)
local x_1,x_2,x_3,x_4,x_5,L;
L:=[];
for x_1 from 1 to floor((s-1)/2) do
x_2:=s-x_1;
x_3:=(x_1+x_2+sqrt(x_1^2+x_2^2-x_1*x_2))/3;
x_4:=(x_1+x_2-sqrt(x_1^2+x_2^2-x_1*x_2))/3;
if x_3=floor(x_3) and x_4=floor(x_4) then
x_5:=(x_3+x_4)/2;
L:=[op(L),gcd(gcd(x_3*(x_3-x_1)*(x_3-x_2), x_4*(x_4-x_1)*(x_4-x_2)), x_5*(x_5-x_1)*(x_5-x_2))];
fi;
od;
return op(L);
end proc;
seq(A373997(s),s=3..414);
A379597
a(n) is the number of distinct solution sets to the quadratic equations u*x^2 + v*x + w = 0 with integer coefficients u, v, w, abs(u) + abs(v) + abs(w) <= n having a nonnegative discriminant.
Original entry on oeis.org
1, 4, 12, 24, 50, 80, 134, 192, 276, 366, 510, 632, 834, 1018, 1262, 1502, 1858, 2136, 2584, 2956, 3448, 3910, 4576, 5076, 5834, 6488, 7320, 8066, 9136, 9892, 11118, 12114, 13358, 14482, 15978, 17108, 18862, 20272, 22024, 23532, 25700, 27216, 29600, 31486, 33746
Offset: 1
a(3) = 12 because there are 12 equations with abs(u) + abs(v) + abs(w) <= 3 and distinct solution set having a nonnegative discriminant: (u, v, w) = (1, 0, 0), (1, -1, 0), (1, 1, 0), (1, 0, -1), (1, -1, -1), (1, 1, -1), (1, -2, 0), (1, 2, 0), (1, 0, -2), (2, -1, 0), (2, 1, 0), and (2, 0, -1). Multiplied equations like 2*(1, 0, 0) = (2, 0, 0) or (-1)*(1, -1, 0) = (-1, 1, 0) do not have a distinct solution set.
-
A379597:=proc(n)
option remember;
local a,u,v,w;
if n=1 then
1
else
a:=0;
for u to n-1 do
for v from 0 to n-u do
w:=n-u-v;
if igcd(u,v,w)=1 then
if v=0 then
a:=a+1
elif w=0 or w>=v^2/(4*u) then
a:=a+2
else
a:=a+4
fi
fi
od
od;
a+procname(n-1)
fi;
end proc;
seq(A379597(n),n=1..45);
A381710
a(n) is the number of distinct solution sets to the quadratic equations u*x^2 + v*x + w = 0 with integer coefficients u, v, w, abs(u) + abs(v) + abs(w) <= n having a negative discriminant.
Original entry on oeis.org
0, 1, 5, 11, 25, 39, 69, 99, 143, 189, 265, 327, 437, 529, 653, 777, 965, 1107, 1343, 1531, 1783, 2021, 2367, 2619, 3013, 3343, 3771, 4153, 4707, 5087, 5721, 6229, 6865, 7437, 8197, 8767, 9677, 10391, 11279, 12043, 13155, 13919, 15147, 16101, 17249, 18301, 19763
Offset: 1
a(3) = 5 because there are 5 equations with abs(u) + abs(v) + abs(w) <= 3 and distinct solution set having a negative discriminant: (u, v, w) = (1, 0, 1), (1, -1, 1), (1, 1, 1), (1, 0, 2), (2, 0, 1). Multiplied equations like (-1)*(1, -1, 1) = (-1, 1, -1) do not have a distinct solution set.
-
A381710:=proc(n)
option remember;
local a,u,v,w;
if n=1 then
0
else
a:=0;
for u to n-1 do
for v from 0 to n-u do
w:=n-u-v;
if igcd(u,v,w)=1 then
if v=0 then
a:=a+1
elif w>v^2/(4*u) then
a:=a+2
fi
fi
od
od;
a+procname(n-1)
fi;
end proc;
seq(A381710(n),n=1..47);
Original entry on oeis.org
1, 3, 7, 13, 25, 41, 65, 93, 133, 177, 245, 305, 397, 489, 609, 725, 893, 1029, 1241, 1425, 1665, 1889, 2209, 2457, 2821, 3145, 3549, 3913, 4429, 4805, 5397, 5885, 6493, 7045, 7781, 8341, 9185, 9881, 10745, 11489, 12545, 13297, 14453, 15385, 16497, 17517, 18917
Offset: 1
-
A381711:=proc(n)
option remember;
local a,u,v,w;
if n=1 then
1
else
a:=0;
for u to n-1 do
for v from 0 to n-u do
w:=n-u-v;
if igcd(u,v,w)=1 and v<>0 then
if w=0 or w=v^2/(4*u) then
a:=a+2
elif wA381711(n),n=1..47);
Showing 1-10 of 10 results.
Comments