cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A342722 a(n) is the number of convex integer quadrilaterals (up to congruence) with integer side lengths a,b,c,d with n=Max(a,b,c,d) and integer diagonals e,f.

This page as a plain text file.
%I A342722 #11 May 16 2021 05:52:34
%S A342722 0,0,0,2,2,1,5,7,8,5,7,13,14,11,15,31,18,14,18,30,25,24,22,64,42,35,
%T A342722 51,58,34,48,37,87,71,46,69,74,51,53,74,110,53,72,61,96,106,73,60,181,
%U A342722 102,103,125,134,79,118,133,215,141,82,82,221
%N A342722 a(n) is the number of convex integer quadrilaterals (up to congruence) with integer side lengths a,b,c,d with n=Max(a,b,c,d) and integer diagonals e,f.
%C A342722 Without loss of generality we assume that a is the largest side length and that the diagonal e divides the convex quadrilateral into two triangles with sides a,b,e and c,d,e. The triangle inequality implies e > a-b and abs(e-c) < d < e+c.
%e A342722 a(6)=1 because the only convex integer quadrilateral with longest edge length 6 is a trapezoid with sides a=6, b=5, c=4, d=5 and diagonals e=f=7.
%t A342722 an={};
%t A342722 he[a_,b_,e_]:=1/(2 e) Sqrt[-(a-b-e) (a+b-e) (a-b+e) (a+b+e)];
%t A342722 paX[e_]:={e,0} (*vertex A coordinate*)
%t A342722 pbX[a_,b_,e_]:={(-a^2+b^2+e^2)/(2 e),he[a,b,e]}(*vertex B coordinate*)
%t A342722 pc={0,0};(*vertex C coordinate*)
%t A342722 pdX[c_,d_,e_]:={(c^2-d^2+e^2)/(2 e),-he[c,d,e]}(*vertex D coordinate*)
%t A342722 convexQ[{bx_,by_},{dx_,dy_},e_]:=If[(by-dy) e>by dx-bx dy>0,True,False]
%t A342722 (*define order on tuples*)
%t A342722 gQ[x_,y_]:=Module[{z=x-y,res=False},Do[If[z[[i]]>0,res=True;Break[],If[z[[i]]<0,Break[]]],{i,1,6}];res]
%t A342722 (*check if tuple is canonical*)
%t A342722 canonicalQ[{a_,b_,c_,d_,e_,f_}]:=Module[{x={a,b,c,d,e,f}},If[(gQ[{b,a,d,c,e,f},x]||gQ[{d,c,b,a,e,f},x]||gQ[{c,d,a,b,e,f},x]||gQ[{b,c,d,a,f,e},x]||gQ[{a,d,c,b,f,e},x]||gQ[{c,b,a,d,f,e},x]||gQ[{d,a,b,c,f,e},x]),False,True]]
%t A342722 Do[cnt=0;
%t A342722 Do[pa=paX[e];pb=pbX[a,b,e];pd=pdX[c,d,e];
%t A342722 If[(f=Sqrt[(pb-pd).(pb-pd)];IntegerQ[f])&&convexQ[pb,pd,e]&&canonicalQ[{a,b,c,d,e,f}],cnt++
%t A342722 (*;Print[{{a,b,c,d,e,f},Graphics[Line[{pa,pb,pc,pd,pa}]]}]*)],
%t A342722 {b,1,a},{e,a-b+1,a+b-1},{c,1,a},{d,Abs[e-c]+1,Min[a,e+c-1]}];
%t A342722 AppendTo[an,cnt],{a,1 ,60}
%t A342722 ]
%t A342722 an
%Y A342722 Cf. A340858 for trapezoids, A342720 and A342721 for concave integer quadrilaterals, A342723 for convex integer quadrilaterals with integer area.
%K A342722 nonn
%O A342722 1,4
%A A342722 _Herbert Kociemba_, Apr 25 2021