OFFSET
1,1
COMMENTS
The real value of these numbers is irrational. If x,x+2 are a twin prime pair then x is odd. Assume x^2 + (x+2)^2 = a^2/b^2 for integers a,b such that (a,b)=1. Since x is odd = 2m+1 we have 4m^2 + 4m + 1 + 4m^2 + 12m + 9 = 8m^2 + 16m + 10 = a^2/b^2. Multipling by b^2 we get 8m^2b^2 + 16mb^2 + 10b^2 = a^2 => a is even = 2k. So 8m^2b^2 + 16mb^2 + 10b^2 = 4k^2 or 4m^b^2 + 8mb^2 + 5b^2 = 2k. This implies b is even contrary to a being even (a,b)=1. Therefore sqrt(x^2 + (x+2)^2) is irrational and all twin prime pair legs of a right triangle form an irrational hypotenuse.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
f[n_] := IntegerPart[ Sqrt[2 n^2 + 4 n + 4]]; f[ Select[ Prime@ Range@ 250, PrimeQ[# + 2] &]] (* Robert G. Wilson v, Mar 10 2013 *)
Floor[Sqrt[Total[#]]]&/@(Select[Partition[Prime[Range[300]], 2, 1], Last[#]- First[#] == 2&]^2) (* Harvey P. Dale, Jun 07 2014 *)
PROG
(PARI) \Twin right triangles twinright(n) = { forprime(x=3, n, y=x+2; if(isprime(y), print1(floor(sqrt(x^2+y^2))", ") ) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 18 2003
EXTENSIONS
Corrected by T. D. Noe, Oct 25 2006
STATUS
approved