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.

Showing 1-5 of 5 results.

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}]

A340860 a(n) is the number of non-isosceles 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, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0, 2, 1, 0, 1, 1, 0, 4, 4, 9, 5, 9, 11, 7, 4, 5, 3, 11, 13, 2, 7, 3, 3, 5, 9, 8, 3, 6, 9, 12, 10, 19, 8, 23, 16, 16, 18, 21, 13, 25, 19, 32, 26, 7, 7, 25, 16, 8, 27, 59, 26
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 which is not isosceles has side lengths a=8, b=9, c=3, d=11 and diagonals e=13 and f=9.

Examples

			a(34)=2 because up to congruence there are exactly two trapezoids which are not isosceles:
a=32, b=26, c=22, d=34 and e=54, f=18;
a=34, b=11, c=32, d=12 and e=40, f=29.
		

Crossrefs

Cf. A224931 for parallelograms, A340858 for general trapezoids and A340859 for 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&&#[[2]]!=#[[4]]&]//Length,{n,1,65}]

A378148 a(n) is the number of distinct trapezoids having integer sides and height with exactly one pair of parallel sides and area n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 2, 1, 0, 3, 0, 1, 2, 1, 0, 3, 0, 1, 2, 1, 0, 4, 0, 2, 2, 1, 1, 5, 0, 1, 2, 3, 0, 5, 0, 2, 3, 1, 0, 6, 0, 2, 2, 2, 0, 7, 1, 3, 2, 1, 0, 9, 0, 1, 3, 3, 2, 8, 0, 3, 2, 3, 0, 10, 0, 1, 5, 3, 0, 9, 0, 6, 3, 1, 0, 10, 2, 1, 2
Offset: 1

Views

Author

Felix Huber, Dec 02 2024

Keywords

Comments

The number of trapezoids having integer sides and height, which are neither right-angled nor isosceles, is a(n) - A378149(n) - A378150(n). The first trapezoid, which is neither right-angled nor isosceles, appears at a(36).
a(p) = 0 for prime p. Proof: Suppose there is a trapezoid with integer sides and prime area p. Then in p = m*h (m is the average of the parallel sides and h is the height of the trapezoid) m = p and h = 1 or m = p/2 and h = 2. At least one nonparallel side of the trapezoid is the hypotenuse of a right triangle with leg h. Legs in integer right triangles are >= 3. This is a contradiction and therefore a(p) = 0.
A214602 is the index of the positive terms in this sequence.
There are also integer-sided trapezoids with integer area that do not have an integer height. For example, the trapezoid with sides p = 630, d = 615, q = 5, f = 40 (p and q are parallel) has an area of 12192 and a height of h = 38.4.

Examples

			a(54) = 7 because there are 7 distinct trapezoids [p, d, q, f, h] (p and q are parallel, height h) having integer sides and height with area 54:[17, 10, 1, 10, 6], [13, 6, 5, 10, 6], [22, 5, 14, 5, 3], [20, 3, 16, 5, 3], [8, 15, 1, 20, 12], [7, 12, 2, 13, 12], [15, 4, 12, 5, 4].
For a(54) = 7 and (92) = 4 see the linked illustrations.
See also the linked Maple program "Trapezoids having integer sides and height with area n".
		

Crossrefs

Programs

  • Maple
    A378148:=proc(n)
       local a,m,p,q,h,x,y,M;
       a:=0;
       M:=map(x->x/2,NumberTheory:-Divisors(2*n) minus {1,2});
       for m in M do
          for q from 1 to m-1/2 do
             p:=2*m-q;
             h:=n/m;
             for x from max(3,floor((p-q+1)/2)) to (h^2-1)/2 do
                y:=p-q-x;
                if issqr(x^2+h^2) and issqr(y^2+h^2) then
                   a:=a+1
                fi
             od
          od
       od;
       return a
    end proc;
    seq(A378148(n),n=1..87);

Formula

a(p) = 0 for prime p.

A378149 a(n) is the number of distinct integer-sided right trapezoids with exactly one pair of parallel sides and area n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 3, 0, 1, 1, 1, 1, 2, 0, 1, 1, 2, 0, 4, 0, 0, 2, 1, 0, 3, 0, 2, 1, 0, 0, 4, 1, 1, 1, 1, 0, 3, 0, 1, 2, 1, 1, 5, 0, 1, 1, 2, 0, 4, 0, 1, 3, 1, 0, 5, 0, 2, 2, 1, 0, 3, 1, 1, 1
Offset: 1

Views

Author

Felix Huber, Dec 04 2024

Keywords

Examples

			a(54) = 4 because there are 4 distinct integer-sided right trapezoids [p, r, q, d, h] (p and q are parallel, r is rectangular to p and q, height h = r) with area 54: [13, 6, 5, 10, 6], [20, 3, 16, 5, 3], [7, 12, 2, 13, 12], [15, 4, 12, 5, 4].
		

Crossrefs

Programs

  • Maple
    A378149:=proc(n)
       local a,m,q,M;
       a:=0;
       M:=map(x->x/2, NumberTheory:-Divisors(2*n) minus {1, 2});
       for m in M do
          for q from 1 to m-3/2 do
             if issqr((2*(m-q))^2+(n/m)^2) then
                a:=a+1
             fi
          od
       od;
       return a
    end proc;
    seq(A378149(n),n=1..87);

Formula

a(p) = 0 for prime p.

A378150 a(n) is the number of distinct integer-sided isosceles trapezoids with exactly one pair of parallel sides and area n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1, 1, 0, 2, 0, 2, 1, 0, 0, 3, 0, 0, 1, 2, 1, 2, 0, 1, 1, 1, 0, 5, 0, 0, 2, 1, 0, 2, 0, 3, 1, 0, 0, 4, 1, 0, 1, 2
Offset: 1

Views

Author

Felix Huber, Dec 02 2024

Keywords

Comments

Integer-sided isosceles trapezoids with integer area have an integer height. Proof: In an isosceles trapezoid with integer sides and parallel sides p, q with p = q + 2*x, the denominator of x must not be greater than 2. Let us consider the right-angled triangle x, h, d: Assuming that h is not an integer, then x cannot be an integer either, since x = sqrt(d^2 - h^2). Therefore x = (2*s - 1)/2 where s is a positive integer. Since h = 2*n/(p + q) is rational and h = sqrt(d^2 - x^2), it follows that h = (2*t - 1)/2 where t is a positive integer and d^2 = s^2 - s + t^2 - t + 1/2. d is therefore not an integer. It follows that isosceles trapezoids with integer sides and area also have an integer height.

Examples

			a(54) = 2 because there are 2 distinct integer-sided isosceles trapezoids [p, d, q, d, h] (p and q are parallel, height h) with area 54: [17, 10, 1, 10, 6], [22, 5, 14, 5, 3].
See also linked Maple program "Integer-sided isosceles trapezoids with area n".
		

Crossrefs

Programs

  • Maple
    A378150:=proc(n)
       local a,m,q,M;
       a:=0;
       M:=NumberTheory:-Divisors(n) minus {1};
       for m in M do
          for q from 1 to m-3 do
             if issqr(((m-q))^2+(n/m)^2) then
                a:=a+1;
             fi
          od
       od;
       return a
    end proc;
    seq(A378150(n),n=1..88);

Formula

a(p) = 0 for prime p.
Showing 1-5 of 5 results.