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.

Original entry on oeis.org

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, 18, 31, 20, 66, 45, 22, 43, 57, 25, 25, 48, 82, 27, 46, 35, 70, 69, 43, 34, 136, 63, 57, 72, 90, 46, 76, 80, 143, 91, 42, 46, 149, 54, 47, 115, 204, 105
Offset: 1

Views

Author

Herbert Kociemba, Jan 24 2021

Keywords

Comments

By "trapezoid" here is meant a quadrilateral with exactly one pair of parallel sides.
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)).
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.

Examples

			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.
		

Crossrefs

Cf. A224931 for parallelograms, A340859 and A340860 for isosceles and non-isosceles trapezoids.

Programs

  • Mathematica
    n=65;list={};
    For[a=1,a<=n,a++,
    For[c=1,cse,Break[]];If[sf<=0,Continue[]];
    e=Sqrt[se/(a-c)];f=Sqrt[sf/(a-c)];
    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}]]]]]]
    Table[Select[list,Max[#[[1]],#[[2]],#[[3]],#[[4]]]==n&]//Length,{n,1,65}]