It creates a very nice pattern when the list is outputted :P But I'm very certain now there's a way to calculate the size of the largest set for each n
I really want to design an elevator-based esolang. Your program would be a building with a given number of floors and elevators. Each elevator would act like two-ended queue (i.e. stack/queue hybrid) for integer values. Integers entering on the ground floor are read from STDIN and integers leaving on the ground floor are written to STDOUT. the other floors can be used as storage and for data transfer between multiple elevators.
for convenience one could even make the I/O on the ground floor dependent on whether you enter/leave through the front or rear door (front would read/write a character with corresponding character code, rear would read/write a decimal integer)
I'm not entirely sure how one would access multiple integers stored on the same floor... can you only store one? is it a stack? a queue? a RAM? ... maybe they could be read back in random order... so you get randomness for free if you need it, but you can always write a deterministic program by only storing one integer at a time.
@MartinBüttner You could make it Hilbert's grand hotel and each guest gets a room on the floor :D - if you add a new person everyone has to move one room across... (so stack)
Definition
There is infinite row of concatenated natural numbers (positive integers, starting with 1):
1234567891011121314151617181920212223...
Challenge
Write program in any language, that accepts position number as an input, and outputs digit from that position in the row defined above.
Po...
Lembik posed a question earlier, in essence, given a number n, find the size of the largest set of binary strings length 2n-1 such that none of the strings match based on certain criteria
Challenge
In the shortest amount of code:
Compute the length of the permutation cycle of a perfect shuffle on a deck of cards of any size n (where n ≥ 2 and n is even).
Output a table of all cycle lengths for 2 ≤ n ≤ 1000 (n even).
A single iteration step shall be defined as taking the deck ...
Counting Quipu
code-golfnumberparsing
Introduction
Quipus are an ancient device used by the Inca in the precolumbian era to record numbers in a base ten through positional system of knots on a cord. The system is rather simple and not so different from our own.
Each cluster of knots is a d...
Ascii Pong
The challenge is to recreate the classic game "pong" in ASCII characters in the shortest code possible.
Requirements/specifications
The "screen" should be 45x25 characters.
White space should actually be white space.
The paddles should be 9 equals signs: "=========" and should be o...
Pushing concatenated character ranges
The uppercase ASCII letters (A-Z) can be pushed as
'[,65>
which generates the string of all characters up to Z, then discards the first 65 (up to @).
All ASCII letters (A-Za-z) can be pushed as
'[,65>_el+
which works as above, then creates a copy, con...