Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> for i in range(128):
- ... if bc(i) == bc(i**2):
- ... print(i, bin(i), i**2, bin(i**2))
- ...
- 0 0b0 0 0b0
- 1 0b1 1 0b1
- 2 0b10 4 0b100
- 3 0b11 9 0b1001
- 4 0b100 16 0b10000
- 6 0b110 36 0b100100
- 7 0b111 49 0b110001
- 8 0b1000 64 0b1000000
- 12 0b1100 144 0b10010000
- 14 0b1110 196 0b11000100
- 15 0b1111 225 0b11100001
- 16 0b10000 256 0b100000000
- 24 0b11000 576 0b1001000000
- 28 0b11100 784 0b1100010000
- 30 0b11110 900 0b1110000100
- 31 0b11111 961 0b1111000001
- 32 0b100000 1024 0b10000000000
- 48 0b110000 2304 0b100100000000
- 56 0b111000 3136 0b110001000000
- 60 0b111100 3600 0b111000010000
- 62 0b111110 3844 0b111100000100
- 63 0b111111 3969 0b111110000001
- 64 0b1000000 4096 0b1000000000000
- 79 0b1001111 6241 0b1100001100001
- 91 0b1011011 8281 0b10000001011001
- 96 0b1100000 9216 0b10010000000000
- 112 0b1110000 12544 0b11000100000000
- 120 0b1111000 14400 0b11100001000000
- 124 0b1111100 15376 0b11110000010000
- 126 0b1111110 15876 0b11111000000100
- 127 0b1111111 16129 0b11111100000001
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement