Java solution | one liner
1 Liner using Long.range and reduce\n\n\npublic int concatenatedBinary(int n) {\n\t\treturn (int) LongStream.range(1, n + 1).reduce(0, (sum, i) -> (sum * (int) 
1 Liner using Long.range and reduce\n\n```\npublic int concatenatedBinary(int n) {\n\t\treturn (int) LongStream.range(1, n + 1).reduce(0, (sum, i) -> (sum * (int) Math.pow(2, Long.toBinaryString(i).length()) + i) % 1_000_000_007);\n    }\n```
[]