[go: up one dir, main page]

login
A088307 revision #8

A088307
Triangle read by rows, 1 <= k <= n: T(n,k) = n^2 + k^2 if gcd(n,k)=1, otherwise 0.
1
0, 5, 0, 10, 13, 0, 17, 0, 25, 0, 26, 29, 34, 41, 0, 37, 0, 0, 0, 61, 0, 50, 53, 58, 65, 74, 85, 0, 65, 0, 73, 0, 89, 0, 113, 0, 82, 85, 0, 97, 106, 0, 130, 145, 0, 101, 0, 109, 0, 0, 0, 149, 0, 181, 0, 122, 125, 130, 137, 146, 157, 170, 185, 202, 221, 0, 145, 0, 0, 0, 169
OFFSET
1,2
COMMENTS
(n^2-k^2, 2*k*n, T(n,k)) is a primitive Pythagorean triple iff T(n,k) > 0;
n > 1: T(n,1)=A002522(n); n > 0: T(2*n+1,2) = A078370(n); T(n,n)=0;
sum of n-th row = phi(n): A000010(n) = #{m: 1<=k<=n and T(n,m)>0} = Sum_{k=1..n} A057427(T(n,m)).
LINKS
Eric Weisstein's World of Mathematics, Pythagorean Triple
EXAMPLE
n=6, k=5: 6^2 + 5^2 = 36 + 25 = 61: (6^2 - 5^2)^2 + (2*6*5)^2 = 11^2 + 60^2 = 121 + 3600 = 3721 = 61^2 = T(6,5)^2;
n=7, k=3: 7^2 + 3^2 = 49 + 9 = 58: (7^2 - 3^2)^2 + (2*7*3)^2 = 40^2 + 42^2 = 1600 + 1764 = 3364 = 58^2 = T(7,3)^2.
Triangle begins:
0,
5, 0,
10, 13, 0,
17, 0, 25, 0,
26, 29, 34, 41, 0,
37, 0, 0, 0, 61, 0,
...
MATHEMATICA
Join[{0}, Table[If[CoprimeQ[n, k], n^2+k^2, 0], {n, 2, 20}, {k, n}]//Flatten] (* Harvey P. Dale, Jul 13 2018 *)
CROSSREFS
Cf. A070216.
Sequence in context: A291724 A340950 A156550 * A208477 A007392 A292105
KEYWORD
nonn,tabl
AUTHOR
Reinhard Zumkeller, Nov 05 2003
STATUS
editing