login
A374263
Number of distinct primitive Pythagorean triples (j^2 - k^2, 2*j*k, j^2 + k^2) where 1 <= k < j <= n.
1
1, 2, 4, 6, 8, 11, 15, 18, 22, 27, 31, 37, 43, 47, 55, 63, 69, 78, 86, 92, 102, 113, 121, 131, 143, 152, 164, 178, 186, 201, 217, 227, 243, 255, 267, 285, 303, 315, 331, 351, 363, 384, 404, 416, 438, 461, 477, 498
OFFSET
2,2
COMMENTS
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)).
FORMULA
a(n) = Sum_{i=2..n} A055034(i).
a(n) = (A049690(n) - 1)/2. - Hugo Pfoertner, Jul 16 2024
EXAMPLE
For n=5, the possible pairs for j,k are
Generated Primitive As it's included on
triple triple the list, is it new?
j=2, k=1 -> 3, 4, 5 3, 4, 5 Yes
j=3, k=1 -> 8, 6,10 3, 4, 5 No
j=3, k=2 -> 5,12,13 5,12,13 Yes
j=4, k=1 -> 15, 8,17 8,15,17 Yes
j=4, k=2 -> 12,16,20 3, 4, 5 No
j=4, k=3 -> 7,24,25 7,24,25 Yes
j=5, k=1 -> 24,10,26 5,12,13 No
j=5, k=2 -> 21,20,29 20,21,29 Yes
j=5, k=3 -> 16,30,34 8,15,17 No
j=5, k=4 -> 9,40,41 9,40,41 Yes
Among these there are a(5) = 6 distinct primitive triples.
PROG
(Python)
from sympy import totient
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
CROSSREFS
Sequence in context: A375982 A205727 A213609 * A338237 A039823 A284617
KEYWORD
nonn
AUTHOR
STATUS
approved