A070109 Number of right integer triangles with perimeter n and relatively prime side lengths.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Keywords
Examples
For n=30 there are A005044(30) = 19 integer triangles; only one is right: 5+12+13 = 30, 5^2+12^2 = 13^2; therefore a(30) = 1.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000 (obtained from the b-file of A078926)
- Eric Weisstein's World of Mathematics, Right Triangle.
- Eric Weisstein's World of Mathematics, Pythagorean Triples.
- Reinhard Zumkeller, Integer-sided triangles
Programs
-
Mathematica
unitaryDivisors[n_] := Cases[Divisors[n], d_ /; GCD[d, n/d] == 1]; A078926[n_] := Count[unitaryDivisors[n], d_ /; OddQ[d] && Sqrt[n] < d < Sqrt[2n]]; a[n_] := If[EvenQ[n], A078926[n/2], 0]; Table[a[n], {n, 1, 1716}] (* Jean-François Alcover, Oct 04 2021 *)
Formula
Extensions
Secondary offset added by Antti Karttunen, Oct 07 2017
Comments