login
Integer part of the hypotenuse of right triangles with consecutive prime legs.
1

%I #21 Mar 30 2024 16:29:22

%S 3,5,8,13,17,21,25,29,37,42,48,55,59,63,70,79,84,90,97,101,107,114,

%T 121,131,140,144,148,152,157,169,182,189,195,203,212,217,226,233,240,

%U 248,254,263,271,275,280,290,307,318,322,326,333,339,347,359,367,376,381

%N Integer part of the hypotenuse of right triangles with consecutive prime legs.

%H Harvey P. Dale, <a href="/A097431/b097431.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = floor(sqrt(prime(n)^2 + prime(n+1)^2)) = floor(sqrt(A069484(n))).

%e If legs = 3,5 then floor(sqrt(9+25)) = 5, the 2nd entry.

%t Table[Floor[Sqrt[Prime[n]^2 + Prime[n + 1]^2]], {n, 60}] (* _Vincenzo Librandi_, Mar 11 2015 *)

%t Floor[Sqrt[Total[#^2]]]&/@Partition[Prime[Range[60]],2,1] (* _Harvey P. Dale_, Mar 30 2024 *)

%o (PARI) a(n) = for(j=1,n,x=prime(j);y=prime(j+1);print1(floor(sqrt(x^2+y^2))","))

%o (Magma) [Floor(Sqrt(NthPrime(n)^2 + NthPrime(n+1)^2)): n in [1..60]]; // _Vincenzo Librandi_, Mar 11 2015

%Y Cf. A069484.

%K nonn

%O 1,1

%A _Cino Hilliard_, Aug 22 2004