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.

A340858 a(n) is the number of integer trapezoids (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 A340858 #12 Feb 22 2021 02:25:44
%S A340858 0,0,0,1,1,1,2,5,6,3,4,9,9,7,10,22,10,10,9,22,18,14,14,46,26,21,35,38,
%T A340858 18,31,20,66,45,22,43,57,25,25,48,82,27,46,35,70,69,43,34,136,63,57,
%U A340858 72,90,46,76,80,143,91,42,46,149,54,47,115,204,105
%N A340858 a(n) is the number of integer trapezoids (up to congruence) with integer side lengths a,b,c,d with n=Max(a,b,c,d) and integer diagonals e,f.
%C A340858 By "trapezoid" here is meant a quadrilateral with exactly one pair of parallel sides.
%C A340858 Without loss of generality we assume for the parallel sides c < a and for the diagonals f <= e. e and f are uniquely determined by e = sqrt((c(a^2-b^2) + a(d^2-c^2))/(a-c)) and f = sqrt((c(a^2-d^2) + a(b^2-c^2))/(a-c)).
%C A340858 The smallest possible trapezoid has side lengths a=4, c=3, b=d=2 and diagonals e=f=4. The smallest possible trapezoid which is not isosceles has side lengths a=8, b=9, c=3, d=11 and diagonals e=13 and f=9.
%e A340858 a(7)=2 because there are two possible trapezoids: a=5, c=3, b=d=7, e=f=8 and a=7, c=4, b=d=6, e=f=8.
%t A340858 n=65;list={};
%t A340858 For[a=1,a<=n,a++,
%t A340858 For[c=1,c<a,c++,
%t A340858 For[d=Floor[(a-c)/2]+1,d<=n,d++,
%t A340858 For[b=1,b<=n,b++,
%t A340858 se=c(a^2-b^2)+a(d^2-c^2);sf=c(a^2-d^2)+a(b^2-c^2);
%t A340858 If[se<=0||sf>se,Break[]];If[sf<=0,Continue[]];
%t A340858 e=Sqrt[se/(a-c)];f=Sqrt[sf/(a-c)];
%t A340858 If[IntegerQ[e]&&IntegerQ[f]&&a+d>f&&d+f>a&&f+a>d&&e+b>a&&b+a>e&&a+e>b,AppendTo[list,{a,b,c,d,e,f}]]]]]]
%t A340858 Table[Select[list,Max[#[[1]],#[[2]],#[[3]],#[[4]]]==n&]//Length,{n,1,65}]
%Y A340858 Cf. A224931 for parallelograms, A340859 and A340860 for isosceles and non-isosceles trapezoids.
%K A340858 nonn
%O A340858 1,7
%A A340858 _Herbert Kociemba_, Jan 24 2021