login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Minimum side in Pythagorean triangles with hypotenuse of n.
2

%I #21 Apr 10 2021 22:29:29

%S 0,0,0,0,3,0,0,0,0,6,0,0,5,0,9,0,8,0,0,12,0,0,0,0,7,10,0,0,20,18,0,0,

%T 0,16,21,0,12,0,15,24,9,0,0,0,27,0,0,0,0,14,24,20,28,0,33,0,0,40,0,36,

%U 11,0,0,0,16,0,0,32,0,42,0,0,48,24,21,0,0,30,0,48,0,18,0,0,13,0,60,0,39,54

%N Minimum side in Pythagorean triangles with hypotenuse of n.

%H David A. Corneth, <a href="/A108707/b108707.txt">Table of n, a(n) for n = 1..10000</a>

%e a(5) = 3 as the right triangle with sides (3, 4, 5) has hypotenuse n = 5 smallest side a(5) = 3. This is the smallest side a right triangle with integer sides and hypotenuse 5 can have. - _David A. Corneth_, Apr 10 2021

%t f[n_]:=Block[{k=n-1,m=Sqrt[n/2],a},While[k>m&&!IntegerQ[(a=Sqrt[n^2-k^2])],k--];If[k<=m,0,a]];Table[f[n],{n,90}]

%o (PARI) first(n) = {my(lh = List(), res = vector(n, i, oo)); for(u = 2, sqrtint(n), for(v = 1, u, if (u^2+v^2 > n, break); if ((gcd(u, v) == 1) && (0 != (u-v)%2), for (i = 1, n, if (i*(u^2+v^2) > n, break); listput(lh, i*(u^2+v^2)); res[i*(u^2+v^2)] = vecmin([res[i*(u^2+v^2)], i*(u^2 - v^2), i*2*u*v]))))); for(i = 1, n, if(res[i] == oo, res[i] = 0)); res } \\ _David A. Corneth_, Apr 10 2021, adapted from A009000

%Y Cf. A083025, A046083, A046084, A009000, A009003, A108708.

%Y A046080 gives the number of Pythagorean triangles with hypotenuse n.

%K nonn

%O 1,5

%A _Sébastien Dumortier_, Jun 20 2005

%E Extended by _Ray Chandler_, Dec 20 2011