OFFSET
1,6
COMMENTS
A 4-tuple (n,u,v,w) is a strict quartet of type 4 if n,u,v,w are distinct positive integers such that v>1 and n*(n - u) = v*(v + w).
EXAMPLE
For a(5), the unique strict quartet of type 4 is (5,1,2,8).
For a(6), the 6 strict quartets are (6, 1, 2, 13), (6, 1, 3, 7), (6, 2, 3, 5), (6, 3, 2, 7), (6, 4, 3, 1), (6, 5, 2, 1).
For a(7), the 3 strict quartets are (7,1,2,19), (7,1,3,11), (7,3,2,13).
For a(8), the 8 strict quartets are (8,1,2,26), (8,1,4,10), (8,2,3,13), (8,3,2,18), (8,3,4,6), (8,4,2,14), (8,5,2,10), (8,5,4,2).
For a(9), the 7 strict quartets are (9,1,2,34), (9,1,3,21), (9,1,4,14), (9,2,3,18), (9,3,2,25), (9,4,3,12), (9,5,2,16).
MATHEMATICA
ClearAll[solns4];
Options[solns4]={distinct->True};
(*types:1:m(m+u)=v(v+w) 2:m(m+u)=v(v-w) 3:m(m-u)=v(v-w) 4:m(m-u)=v(v+w), v>1*)
solns4[m_, u_, type:(1|2|3|4), OptionsPattern[]]:=Module[{sU, sW, n, nn, sgn, divs, tups, unique},
{sU, sW}=Switch[type, 1, {1, 1}, 2, {1, -1}, 3, {-1, -1}, 4, {-1, 1}];
n=m*(m+sU*u);
tups=If[sW==1, If[n<=0, {}, divs=Select[Divisors[n], #>n/#&]; (Map[{m, u, n/#, #-n/#}&, divs])], If[n==0, {}, nn=Abs[n]; sgn=Sign[n];
divs=Divisors[nn];
If[sgn>0, divs=Select[divs, #<nn/#&]]; ({m, u, nn/#, nn/#-sgn #}&/@divs)]];
unique=TrueQ[OptionValue[distinct]];
Select[tups, #[[3]]>1&&#[[4]]>0&&(!unique||Length@DeleteDuplicates[#]==4)&]];
Table[Total[Map[Length, Table[solns4[m, u, 4, distinct->True], {u, m-1}]]], {m, 200}]
(* Peter J. C. Moses, Aug 27 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 03 2025
STATUS
approved
