# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a088307 Showing 1-1 of 1 %I A088307 #17 Dec 20 2022 10:52:03 %S A088307 2,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, %T A088307 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, %U A088307 149,0,181,0,122,125,130,137,146,157,170,185,202,221,0 %N A088307 Triangle, read by rows, T(n,k) = n^2 + k^2 if gcd(n,k)=1, otherwise 0. %C A088307 (n^2-k^2, 2*k*n, T(n,k)) is a primitive Pythagorean triple iff T(n,k) > 0. %H A088307 G. C. Greubel, Rows n = 1..50 of the triangle, flattened %H A088307 Eric Weisstein's World of Mathematics, Pythagorean Triple %F A088307 T(n, n) = 2*A000007(n-1). %F A088307 T(n, 1) = A002522(n). %F A088307 T(2*n+1, 2) = A078370(n). %F A088307 Sum_{k=1..n} A057427(T(n,m)) = A000010(n). %F A088307 From _G. C. Greubel_, Dec 15 2022: (Start) %F A088307 T(n, n-1) = A001844(n). %F A088307 T(n, n-2) = ((1-(-1)^n)/2) * A008527((n+1)/2). %F A088307 T(2*n, n) = 5*A000007(n-1). %F A088307 T(2*n+1, n) = A079273(n+1). %F A088307 T(2*n-1, n) = A190816(n). %F A088307 Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = A053818(n+1) + [n=1]. (End) %e A088307 Triangle begins: %e A088307 2; %e A088307 5, 0; %e A088307 10, 13, 0; %e A088307 17, 0, 25, 0; %e A088307 26, 29, 34, 41, 0; %e A088307 37, 0, 0, 0, 61, 0; %e A088307 ... %t A088307 Table[If[CoprimeQ[n,k],n^2+k^2,0],{n,20},{k,n}]//Flatten (* _Harvey P. Dale_, Jul 13 2018 *) %o A088307 (Magma) %o A088307 function A088307(n,k) %o A088307 if GCD(k,n) eq 1 then return n^2+k^2; %o A088307 else return 0; %o A088307 end if; return A088307; %o A088307 end function; %o A088307 [A088307(n,k): k in [1..n], n in [1..13]]; // _G. C. Greubel_, Dec 16 2022 %o A088307 (SageMath) %o A088307 def A088307(n,k): %o A088307 if (gcd(n,k)==1): return n^2 + k^2 %o A088307 else: return 0 %o A088307 flatten([[A088307(n,k) for k in range(1,n+1)] for n in range(1,14)]) # _G. C. Greubel_, Dec 16 2022 %Y A088307 Cf. A000007, A000010, A001844, A002522, A008527, A053818. %Y A088307 Cf. A057427, A070216, A078370, A079273, A190816. %K A088307 nonn,tabl %O A088307 1,1 %A A088307 _Reinhard Zumkeller_, Nov 05 2003 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE