The oldest Polish salt mine, located in Bochnia*, was started in year 1248, which we can consider a magical number. We can see that it's equal to 4 digits from the sequence of exponentiations: .
As the date is actually 4 digits from the sequence, we could make it longer. We could repeat the process until we reach infinity. The sequence would look like this, if we limit it to number
To make it look a bit better, we can separate the numbers:
Let's try a custom, longer sequence than the date. Let's say, we want it to have 5 digits - there are more than one possibility:
Or 3 digit ones:
We could also add the 3 digit numbers to this, but let's say, that a sequence must have at least two numbers.
* There is no information about this on the English Wikipedia. If you enter the Polish version - then there is. If you visit the mine, the workers will also tell you, that it started in 1248.
Create a exponentiation sequence like in examples above with 2 as the base.
Given a number from range 2-27, output all possible parts of the sequence (The 2048 one or larger if you want) with amount of digits equal to the input. You cannot cut a number, so output like
481 is invalid, because 16 is cut in half.
- Standard loopholes are forbidden.
- You can assume the input is a number inside the range.
- Your program can accept inputs larger than the range (28+), but that won't increase/decrease score.
- Spaces in output are ignored. You can output like
4 8 16.
- Different possibilities should be separated by any character from the list:
,./|or a line feed.
- You can output as an array.
- Every possibility should include at least 2 different numbers.
- You must output a part of the sequence, you cannot mix numbers that aren't next to each other, like:
- Hardcoded output isn't allowed, however, you can hardcode a string/number/array containing the full sequence.
- Input 27 should return the full 2048 sequence.
- As already mentioned before, do not cut numbers. Ex.
16- you can't use
481- you must use
- EDIT: I might have said something wrong there; 2048 is the last number which your program should support, you can add support for larger int's.
12, 24, 48
124, 248, 816
1248, 4816, 1632, 3264
24816, 81632, 64128
And later numbers...
If I made a mistake in any of the test cases, tell me or edit the question.
This is code-golf, so the shortest code in bytes wins!