A212315 Numbers m such that B(m) = B(triangular(m)), where B(m) is the binary weight of m (A000120).
0, 1, 3, 7, 15, 31, 39, 45, 63, 78, 79, 91, 93, 127, 139, 143, 158, 159, 175, 182, 187, 189, 222, 255, 286, 287, 318, 319, 351, 367, 375, 379, 381, 407, 446, 487, 511, 535, 543, 572, 574, 575, 607, 627, 638, 639, 703, 724, 727, 731, 747, 750, 759, 763, 765, 799, 823, 830
Offset: 1
Links
- Dumitru Damian, Table of n, a(n) for n = 1..10000
Programs
-
Python
def isa(n): return n.bit_count()==((n*(n+1))>>1).bit_count() print(list(n for n in range(10**3) if isa(n))) # Dumitru Damian, Mar 04 2023
Comments