cp's OEIS Frontend

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.

A349120 Primitive Pythagorean triples [a, b, c] in lexicographic order with a < b < c such that [w(a), w(b), w(c)] is also a primitive Pythagorean triple, where w(n) is the binary weight of n.

Original entry on oeis.org

11, 60, 61, 19, 180, 181, 25, 312, 313, 35, 612, 613, 41, 840, 841, 47, 1104, 1105, 49, 1200, 1201, 52, 165, 173, 57, 176, 185, 67, 2244, 2245, 97, 4704, 4705, 104, 153, 185, 105, 208, 233, 105, 608, 617, 131, 8580, 8581, 133, 156, 205, 145, 408, 433, 145, 10512, 10513, 165, 532, 557, 181, 16380, 16381, 193, 18624, 18625
Offset: 1

Views

Author

Ctibor O. Zizka, Nov 08 2021

Keywords

Examples

			[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.
		

Crossrefs

Programs

  • 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(aA263728
    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