OFFSET
1,1
COMMENTS
A 4-tuple (m,u,v,w) is a quartet if m,u,v,w are positive integers such that m<v and m*(m+u) = v*(v+w), with the values of u in nondecreasing order. When there is more than one solution for given m and u, the values of v are arranged in increasing order. Here, m=2; for m=1, see A385182.
EXAMPLE
First 30 quartets (2,u,v,w):
m u v w
2 4 3 1
2 7 3 3
2 8 4 1
2 10 3 5
2 10 4 2
2 12 4 3
2 13 3 7
2 13 5 1
2 14 4 4
2 16 3 9
2 16 4 5
2 18 4 6
2 18 5 3
2 19 3 11
2 19 6 1
2 20 4 7
2 22 3 13
2 22 4 8
2 22 6 2
2 23 5 5
2 24 4 9
2 25 3 15
2 25 6 3
2 26 4 10
2 26 7 1
2 28 3 17
2 28 4 11
2 28 5 7
2 28 6 4
2 30 4 12
2(2+16) = 3(3+9) = 4(4+5), so (2,16,3,9) and (2,16,4,5) are rows.
MATHEMATICA
Clear[solnsM];
solnsM[m_, max_] := Module[{ans = {}, rhs = {}, u, v, w, lhs, matching},
Do[Do[AppendTo[rhs, {v*(v + w), v, w}], {w, max}], {v, m*(m + max)}];
rhs = GatherBy[rhs, First];
Do[lhs = m*(m + u); matching = Select[rhs, #[[1, 1]] == lhs &];
If[Length[matching] > 0, Do[AppendTo[ans,
Map[{m, u, #[[2]], #[[3]]} &, matching[[1]]]], {i,
Length[matching]}]], {u, max}];
ans = Flatten[ans, 1];
Select[Union[Map[Sort[{#, RotateLeft[#, 2]}][[1]] &,
Sort[Select[DeleteDuplicates[
ans], {#[[1]], #[[2]]} =!= {#[[3]], #[[4]]} &]]]], #[[1]] == m &]];
TableForm[solns = solnsM[2, 140], TableHeadings -> {None, {"m", "u", "v", "w"}}]
aa = Flatten[solns]
Map[#[[2]] &, solns] (* u, A385592 *)
Map[#[[3]] &, solns] (* v, A385593 *)
Map[#[[4]] &, solns] (* w, A385594 *)
(* Peter J. C. Moses, Jun 15 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jul 04 2025
STATUS
approved
