%I #16 Jan 10 2025 02:01:57
%S 4,20,452,2180,4052,6500,27380,43220,118100,130052,183620,281252,
%T 357860,399620,410420,455060,656660,1134020,1401140,1609220,1630820,
%U 2142452,4482020,7258052,8446052,8694452,9618500,10424180,11838980,12370340,12852452,13343780
%N Even side of integer-sided triangle such that the area is an integer and two sides are twin primes.
%C The sides of each triangle are of the form (k^2+2, k^2+4, 2k^2+2)=(p, p+2,q) where p and p+2 primes (see A257049) => the value of the even side is q = 2k^2+2 and the greatest prime divisor of a(n) is equal to the greatest prime divisor of p-1.
%C The following table gives the first values (n, a(n)=q, A, p, p+2) where A is the integer area.
%C +----+--------+--------+------+-------+
%C | n | a(n)=q | A | p | p+2 |
%C +-------------+--------+------+-------+
%C | 1 | 4 | 6 | 3 | 5 |
%C | 2 | 20 | 66 | 11 | 13 |
%C | 3 | 452 | 6810 | 227 | 229 |
%C | 4 | 2180 | 72006 | 1091 | 1093 |
%C | 5 | 4052 | 182430 | 2027 | 2029 |
%C | 6 | 6500 | 370614 | 3251 | 3253 |
%C +----+--------+--------+------+-------+
%C Note that q = 2*p - 2. - _Zak Seidov_, May 21 2015
%C Alternatively, numbers 2k^2 + 2 such that k^2 + 2 and k^2 + 4 are prime. - _Charles R Greathouse IV_, May 21 2015
%H Charles R Greathouse IV, <a href="/A257547/b257547.txt">Table of n, a(n) for n = 1..10000</a>
%t nn=40000;lst={};Do[s=(2*Prime[c]-2+Prime[c+1]+Prime[c])/2;If[IntegerQ[s],area2=s (s-2*Prime[c]+2)(s-Prime[c+1])(s-Prime[c]);If[area2>0&&IntegerQ[Sqrt[area2]]&&Prime[c+1]==Prime[c]+2,AppendTo[lst,2*Prime[c]-2]]],{c,nn}];Union[lst]
%o (PARI) for(k=1,1e4,if(isprime(k^2+2) && isprime(k^2+4), print1(2*k^2+2", "))) \\ _Charles R Greathouse IV_, May 21 2015
%Y Cf. A001097, A257049.
%K nonn
%O 1,1
%A _Michel Lagneau_, Apr 29 2015