This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A374263 #37 Aug 04 2024 11:15:15 %S A374263 1,2,4,6,8,11,15,18,22,27,31,37,43,47,55,63,69,78,86,92,102,113,121, %T A374263 131,143,152,164,178,186,201,217,227,243,255,267,285,303,315,331,351, %U A374263 363,384,404,416,438,461,477,498 %N A374263 Number of distinct primitive Pythagorean triples (j^2 - k^2, 2*j*k, j^2 + k^2) where 1 <= k < j <= n. %C A374263 Triples of this form are primitive and distinct when j,k are coprime (i.e., gcd(j,k) = 1) and of opposite parity (i.e., j+k == 0 (mod 2)). %F A374263 a(n) = Sum_{i=2..n} A055034(i). %F A374263 a(n) = (A049690(n) - 1)/2. - _Hugo Pfoertner_, Jul 16 2024 %e A374263 For n=5, the possible pairs for j,k are %e A374263 Generated Primitive As it's included on %e A374263 triple triple the list, is it new? %e A374263 j=2, k=1 -> 3, 4, 5 3, 4, 5 Yes %e A374263 j=3, k=1 -> 8, 6,10 3, 4, 5 No %e A374263 j=3, k=2 -> 5,12,13 5,12,13 Yes %e A374263 j=4, k=1 -> 15, 8,17 8,15,17 Yes %e A374263 j=4, k=2 -> 12,16,20 3, 4, 5 No %e A374263 j=4, k=3 -> 7,24,25 7,24,25 Yes %e A374263 j=5, k=1 -> 24,10,26 5,12,13 No %e A374263 j=5, k=2 -> 21,20,29 20,21,29 Yes %e A374263 j=5, k=3 -> 16,30,34 8,15,17 No %e A374263 j=5, k=4 -> 9,40,41 9,40,41 Yes %e A374263 Among these there are a(5) = 6 distinct primitive triples. %o A374263 (Python) %o A374263 from sympy import totient %o A374263 def A374263(n): return (sum(totient(n) for n in range(1,n+1,2))>>1) + sum(totient(n) for n in range(2,n+1,2)) # _Chai Wah Wu_, Aug 04 2024 %Y A374263 Cf. A049690, A055034. %K A374263 nonn %O A374263 2,2 %A A374263 _David Roggeveen Byrne_, Jul 01 2024