A344602 Integers whose Hamming weight is triangular.
0, 1, 2, 4, 7, 8, 11, 13, 14, 16, 19, 21, 22, 25, 26, 28, 32, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 63, 64, 67, 69, 70, 73, 74, 76, 81, 82, 84, 88, 95, 97, 98, 100, 104, 111, 112, 119, 123, 125, 126, 128, 131, 133, 134, 137, 138, 140, 145, 146, 148, 152, 159, 161
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000
Programs
-
Maple
q:= n-> issqr(8*add(i, i=Bits[Split](n))+1): select(q, [$0..200])[]; # Alois P. Heinz, May 24 2021
-
Mathematica
Select[Range[0, 200], IntegerQ @ Sqrt[8 * Plus @@ IntegerDigits[#, 2] + 1] &] (* Amiram Eldar, May 24 2021 *)
-
PARI
isok(n) = ispolygonal(hammingweight(n), 3);