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.

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

This page as a plain text file.
%I A378675 #20 Dec 20 2024 13:20:04
%S A378675 15,21,27,27,45,45,55,63,65,81,85,85,95,99,115,117,125,125,135,145,
%T A378675 155,171,175,175,185,189,205,207,225,235,243,245,265,275,279,295,297,
%U A378675 315,315,325,333,335,355,365,385,387,405,407,425,451,455,459,473,475,475
%N A378675 Areas of trapezoids with exactly one pair of parallel sides having prime sides and height.
%H A378675 Felix Huber, <a href="/A378675/b378675.txt">Table of n, a(n) for n = 1..2633</a>
%H A378675 Felix Huber, <a href="/A378675/a378675.txt">Trapezoids having prime sides and height with area A</a>
%e A378675 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].
%p A378675 with(NumberTheory):
%p A378675 A378675:=proc(A)
%p A378675    local m,p,q,i,j,d,f,h,x,y,M,T;
%p A378675    if isprime(A)=false and A>1 then
%p A378675       T:=[];
%p A378675       M:=map(x->A/x,select(isprime,(Divisors(A)) minus {2}));
%p A378675       for m in M do
%p A378675          for i to pi(floor(m-1/2)) do
%p A378675             q:=ithprime(i);
%p A378675             p:=2*m-q;
%p A378675             if isprime(p) then
%p A378675                h:=A/m;
%p A378675 	       for x from max(4,floor((p-q+1)/2)) by 2 to (h^2-1)/2 do
%p A378675 	          y:=p-q-x;
%p A378675 	          if issqr(x^2+h^2) and issqr(y^2+h^2) then
%p A378675 	             d:=isqrt(y^2+h^2);
%p A378675 	             f:=isqrt(x^2+h^2);
%p A378675 	             if isprime(d) and isprime(f) then
%p A378675 	                T:=[op(T),A]
%p A378675 	             fi
%p A378675 	          fi
%p A378675 	       od
%p A378675 	    fi
%p A378675          od
%p A378675       od;
%p A378675       return op(T)
%p A378675    fi;
%p A378675 end proc;
%p A378675 seq(A378675(A),A=1..475);
%Y A378675 Cf. A000040, A027750, A070088, A214602, A365049, A366398, A374594, A378148, A378149, A378150.
%K A378675 nonn
%O A378675 1,1
%A A378675 _Felix Huber_, Dec 04 2024