Exponentiation Sequence
05AB1E, 12 11 10 bytes
Supports the sequence up to 2^95 = 39614081257132168796771975168
₃ÝoŒʒg≠}Jù
Try it online!
Explanation
₃Ý # push range [0 ... 95]
o # raise 2 to the power of each
Œ # get a list of all sublists
ʒ # filter, keep elements that satisfy:
g # length
≠ # false (not equal to 1)
} # end filter
J # join each
ù # keep numbers of length matching the input
Saved 1 byte thanks to Erik the Outgolfer
Saved 1 byte thanks to Riley
Pyth, 22 21 20 17 bytes
fqQlTjLkt#.:^L2yT
Try it Online
Explanation
fqQlTjLkt#.:^L2yT
^L2yT Get the powers of 2 up to 2^20
t#.: Get all consecutive sequences of at least 2
jLk Concatenate each
fqQlT Get the ones whose length is the input
Jelly, 19 18 16 bytes
There may be a shorter solution now that we may use any cut-off (not just 2048), although this change to the specification has allowed a one byte save from this implementation by moving to a cut-off of 32768.
--yep...
-2 bytes thanks to Erik the Outgolfer (use of V
to allow implicit right argument of the filter and tightening)
--yes it is very similar to his inefficient one now; go upvote his!
⁴Ḷ2*Ẇṫ17VDL$⁼¥Ðf
A monadic link taking a number and returning a list of numbers.
Try it online!
How?
⁴Ḷ2*Ẇṫ17VDL$⁼¥Ðf - Link: number, n e.g. 3
⁴ - literal sixteen 16
Ḷ - lowered range [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
2 - literal two 2
* - exponentiate [1,2,4,8,16,32,...,32768]
Ẇ - all sublists [[1],[2],...,[1,2],[2,4],...,[1,2,4],...]
17 - literal seventeen 17
ṫ - tail from index [[1,2],[2,4],...,[1,2,4],...]]
V - evaluate as Jelly code [12,24,...,124,...]
Ðf - filter keep:
¥ - last two links as a dyad
$ - last two links as a monad:
D - decimal list (of entry) (i.e. 816 -> [8,1,6] or 24 -> [2,4])
L - length (i.e. 816 -> 3, or 24 -> 2)
⁼ - equals (n) (i.e. 816 -> 1, or 24 -> 0)
- ...resulting in [816, 124, 248]