login
Number of primitive Pythagorean triples with perimeter < 10^n.
3

%I #11 Feb 16 2025 08:33:24

%S 0,7,70,703,7026,70229,702309,7023027,70230484,702304875,7023049293,

%T 70230492763,702304928492,7023049277919,70230492773355,

%U 702304927727064,7023049277265686,70230492772676557

%N Number of primitive Pythagorean triples with perimeter < 10^n.

%C The ratio a(n)/10^n as n->inf is log(2)/Pi^2 = 0.70230... (Lehmer - A118858).

%H D. N. Lehmer, <a href="http://www.jstor.org/stable/2369728">Asymptotic evaluation of certain totient sums</a>, Amer. J. Math. 22, 293-335, 1900.

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimitivePythagoreanTriple.html">Primitive Pythagorean Triple</a>

%e a(2)=7 because there are 7 primitive solutions (a,b,c) with a+b+c<10^2.

%e (3,4,5),(5,12,13),(8,15,17),(7,24,25),(20,21,29),(12,35,37),(9,40,41)

%t lst1 = {}; Do[If[GCD[m, n]==1&&m<n&&OddQ[m+n], AppendTo[lst1, 2n(n+m)]], {n, 5000}, {m, n}]; Table[Length@Select[lst1, #<10^n &], {n, 10}]

%Y Cf. A118858.

%K nonn,more,changed

%O 1,2

%A _Frank M Jackson_, Nov 04 2014

%E a(8)-a(18) from _Hiroaki Yamanouchi_, Nov 17 2014