OFFSET
3,1
COMMENTS
Except for the first term, the real value of these numbers is irrational. We have for prime p>2, (p+2)^2 - p^2 = a^2 or 4*p+4 = a^2. This implies a = 4*k, and 4*p+4 = 16*k^2 or p = 4*k^2-1 = (2*k+1)*(2*k-1) = composite for k > 1. Therefore for a = 4, p = 3 is the only integer solution. Suppose 4*p+4 = a^2/b^2 for (a,b) = 1. 4*p*b^2 - 4*b^2 = a^2 = 16*k^2 or p*b^2 = 4*k^2 - b^2 = (2*k-b)*(2*k+b) => k = b*r. Then p*b^2 = (2*b*r-b)*(2*b*r+b) or p = (2*r-1)*(2*r+1) and p is prime only r = 1. So p*b^2 = (b)*(3*b) and p = 3 is the smallest and only rational solution.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 3..1000
MATHEMATICA
Floor[Sqrt[#[[2]]^2-#[[1]]^2]]&/@Select[Partition[Prime[Range[500]], 2, 1], #[[2]]-#[[1]]==2&] (* Harvey P. Dale, Aug 01 2025 *)
PROG
(PARI) /* Twin right triangles */ twinright2(n) = { forprime(x=3, n, y=x+2; if(isprime(y), print1(sqrtint(y^2-x^2)", ") ) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 18 2003
STATUS
approved
