python O(n) simple solution
\nclass Solution:\n    def concatenatedBinary(self, n: int) -> int:\n        arr = []\n        \n\t\t# append each binary to arr\n        for i in range(1, n + 
```\nclass Solution:\n    def concatenatedBinary(self, n: int) -> int:\n        arr = []\n        \n\t\t# append each binary to arr\n        for i in range(1, n + 1):\n            arr.append(bin(i)[2:])\n            \n        return int(\'\'.join(arr), 2) % (pow(10, 9) + 7)\n```
['Python']