Javascript Solution
```\nvar concatenatedBinary = function(n) {\n    let number = 0; \n    for(let i = 1; i <= n; i++) {\n        number *= (1 << i.toString(2).length)\n        num
```\nvar concatenatedBinary = function(n) {\n    let number = 0; \n    for(let i = 1; i <= n; i++) {\n        number *= (1 << i.toString(2).length)\n        number += i;\n        number %= (10 ** 9 + 7)\n    }\n    return number;\n};
['JavaScript']