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-6 of 6 results.

A374594 Areas of trapezoids with integer sides and height whose area equals their perimeter.

Original entry on oeis.org

16, 18, 18, 20, 20, 24, 30, 30, 36, 48, 70, 90, 180, 180, 420, 528, 870, 1170, 2610
Offset: 1

Views

Author

Felix Huber, Jul 13 2024

Keywords

Comments

A trapezoid is a quadrilateral with at least one pair of parallel sides.
Conjecture: in this sequence are only four terms which belong to trapezoids with exactly one pair of parallel sides: a(2) = 18, a(4) = 20, a(6) = 24, a(7) = 30.

Examples

			See attached illustration of the terms a(1) to a(11).
		

Crossrefs

Programs

  • Maple
    with(NumberTheory):
    A374594:=proc(k);
      local K,L,S,T,i,a,c,x,y,h,b,d;
      L:=map(x->x/2, Divisors(2*k) minus {1, 2});
      S:=[];
      T:=[];
      K:=[];
      for i to numelems(L) do
        for c to L[i] do
          a:=2*L[i]-c;
          h:=k/L[i];
          x:=0;
          while x^2<(k-a-c)^2-h^2 do
            if issqr(x^2+h^2) then
              d:=isqrt(x^2+h^2);
              b:=k-a-c-d;
              y:=a-c-x;
              if h^2+y^2=b^2 then
                S:=[a,b,c,d];
                S:=sort(S);
                if member(S,T)=false then
                  T:=[op(T),S];
                  K:=[op(K),k];
                fi;
              fi;
            fi;
            x:=x+1;
          od;
        od;
      od;
      if numelems(K)>0 then
        return op(K)
      fi;
    end proc;
    seq(A374594(k),k=1..3000);

Extensions

Corrected by Felix Huber, Dec 04 2024

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.

A365049 a(n) is the number of distinct parallelograms with integer sides and area n, and where at least one height is an integer.

Original entry on oeis.org

1, 1, 2, 3, 2, 4, 2, 5, 5, 4, 2, 10, 2, 4, 8, 9, 2, 9, 2, 10, 8, 4, 2, 20, 5, 4, 8, 10, 2, 16, 2, 13, 8, 4, 8, 23, 2, 4, 8, 20, 2, 16, 2, 10, 18, 4, 2, 34, 5, 9, 8, 10, 2, 16, 8, 20, 8, 4, 2, 40, 2, 4, 18, 19, 8, 16, 2, 10, 8, 16, 2, 45, 2, 4, 18, 10, 8, 16, 2, 34, 13
Offset: 1

Views

Author

Felix Huber, Aug 18 2023

Keywords

Comments

If n is not a square, there are A000005(n)/2 rectangles with A027750(n,i)*A027750(n,j) = n, i < j. If n is a square, there are (A000005(n)-1)/2 rectangles with A027750(n,i)*A027750(n,j) = n, i < j and a square with A027750(n,(A000005(n)+1)/2)^2 = n. From these rectangles and, if present, the square, further parallelograms of equal area and integer sides can be formed. A046079(A027750(n,k)) is the number of possibilities there are for each side of the rectangle or for the side of the square.

Examples

			For area n = 9 there is one rectangle (sides of lengths: 1,9) and a square (3,3) with integer sides. From both, further parallelograms with area n = 9 and integer sides can be formed. Since (9,12,15) and (9,40,41) are the only Pythagorean triples with leg 9, from the rectangle (1,9) exactly the two further parallelograms (1,15) and (1,41) with height 9 can be formed, but no further parallelogram with height 1. Since (3,4,5) is the only Pythagorean triple with leg 3, from the square (3,3) exactly one further parallelogram (3,5) with height 3 can be formed. Therefore for area n = 9 there are a(9) = 5 distinct parallelograms with integer sides.
		

Crossrefs

Programs

  • Python
    from math import prod
    from itertools import takewhile
    from sympy import factorint, divisors
    def A365049(n): return sum(1+(prod((e+(p&1)<<1)-1 for p, e in factorint(d).items())>>1)+(prod((e+(p&1)<<1)-1 for p, e in factorint(n//d).items())>>1 if d*dChai Wah Wu, Aug 21 2023

Formula

If n is a square, then a(n) = 1 + A046079(A027750(n, (A000005(n) + 1)/2)) + Sum_{i = 1..(A000005(n) - 1)/2} (1 + A046079(A027750(n,i)) + A046079(n/A027750(n,i)));
otherwise, a(n) = Sum_{i = 1..A000005(n)/2} (1 + A046079(A027750(n,i)) + A046079(n/A027750(n,i))).

A378675 Areas of trapezoids with exactly one pair of parallel sides having prime sides and height.

Original entry on oeis.org

15, 21, 27, 27, 45, 45, 55, 63, 65, 81, 85, 85, 95, 99, 115, 117, 125, 125, 135, 145, 155, 171, 175, 175, 185, 189, 205, 207, 225, 235, 243, 245, 265, 275, 279, 295, 297, 315, 315, 325, 333, 335, 355, 365, 385, 387, 405, 407, 425, 451, 455, 459, 473, 475, 475
Offset: 1

Views

Author

Felix Huber, Dec 04 2024

Keywords

Examples

			27 is twice in the sequence because there are two distinct trapezoids [p, d, q, f, h] (p and q are parallel, height h) with prime sides and height and area 27: [13, 5, 5, 5, 3], [11, 3, 7, 5, 3].
		

Crossrefs

Programs

  • Maple
    with(NumberTheory):
    A378675:=proc(A)
       local m,p,q,i,j,d,f,h,x,y,M,T;
       if isprime(A)=false and A>1 then
          T:=[];
          M:=map(x->A/x,select(isprime,(Divisors(A)) minus {2}));
          for m in M do
             for i to pi(floor(m-1/2)) do
                q:=ithprime(i);
                p:=2*m-q;
                if isprime(p) then
                   h:=A/m;
    	       for x from max(4,floor((p-q+1)/2)) by 2 to (h^2-1)/2 do
    	          y:=p-q-x;
    	          if issqr(x^2+h^2) and issqr(y^2+h^2) then
    	             d:=isqrt(y^2+h^2);
    	             f:=isqrt(x^2+h^2);
    	             if isprime(d) and isprime(f) then
    	                T:=[op(T),A]
    	             fi
    	          fi
    	       od
    	    fi
             od
          od;
          return op(T)
       fi;
    end proc;
    seq(A378675(A),A=1..475);
Showing 1-6 of 6 results.