A136490 Numbers whose binary representation is contained in that of their cubes.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 23, 24, 28, 29, 30, 31, 32, 33, 34, 36, 39, 40, 41, 48, 56, 58, 60, 62, 63, 64, 65, 66, 68, 72, 80, 91, 96, 99, 111, 112, 115, 116, 120, 124, 126, 127, 128, 129, 130, 132, 136, 144, 160, 192, 222, 224, 230, 232
Offset: 1
Programs
-
Mathematica
Select[Range[0, 300], StringContainsQ[IntegerString[#^3, 2], IntegerString[#, 2]] &] (* Paolo Xausa, Apr 04 2024 *)
-
Python
def ok(n): return bin(n)[2:] in bin(n**3)[2:] print([k for k in range(250) if ok(k)]) # Michael S. Branicky, Apr 04 2024
Extensions
More terms from Reinhard Zumkeller, Jan 03 2008
Comments