OFFSET
1,1
EXAMPLE
[11, 60, 61] is a primitive Pythagorean triple, and [w(11), w(60), w(61)] = [3, 4, 5] is also a primitive Pythagorean triple, thus 11, 60, and 61 are members.
PROG
(PARI) ppt(a) = {my(L=List(), b, c, d, g); fordiv(a^2, d, g=a^2\d; if(d<=g && (d+g)%2==0, c=(d+g)\2; b=g-c; if(a<b && gcd(b, c)==1, listput(L, [a, b, c])))); vecsort(Vec(L), , 2); } \\ A263728
isok(t) = {my(ht = vecsort(apply(hammingweight, t))); (ht[1]^2 + ht[2]^2 == ht[3]^2) && (gcd(ht)==1); }
lista(nn) = {my(list=List()); for (n=1, nn, my(v = ppt(n)); if (#v, for (k=1, #v, if (isok(v[k]), listput(list, v[k])); ); ); ); Vec(list); } \\ Michel Marcus, Nov 10 2021
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
Ctibor O. Zizka, Nov 08 2021
STATUS
approved