I would like to answer with with whatever the standard rule is, but I don't know what the standard rule is.
Can we import external libraries that existed at the time the question was posted? It's an implementation of the brainfuck language in python, and I think I could come up with a better solution if I could use it. — mbomb0073 mins ago
my search is somewhere around 35k now, and so far I haven't found any numbers that aren't multiples of the first, and none of them are substantially beyond 4N
@MartinBüttner ok, 4N is defs not the bound here what you are talking about, but it is the bound for the algorithm that I have, to not to mess up the first N numbers. Although I did not think that swaps from < N numbers will affect Nth swap with N2* th
but if you cannot find anything with more than 5N difference, that I would opt for that :P
Rubik's Cube Scrambles
code-golf rubiks-cube random generation
Your task is to create a random sequence of moves, which can be used to scramble a Rubik's Cube. Such a scramble is made up of exactly 25 moves. Each move consist of of the letters UDRLFB optionally followed by one of the suffixes '...
Every prime p gets shifted to 2p first. Then on the 2pth iteration, it gets shifted again since 2p's only factors are 2 and p. Repeat for every 2^n p, and you see it only ever gets shifted rightward.
he said that "in the same way that primes p don't appear because they get swapped at step p, anything that happens to be in slot n at step n will also never appear"
g=lambda a,t:t<=0<(a and f(a[1:],t-a[0]))
print g([1,2,3],-1)
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "<stdin>", line 2, in <lambda>
File "<stdin>", line 1, in <lambda>
TypeError: object of type 'int' has no len()
@feersum That doesn't work either
Wait a sec
I think my session is messed up
Oh gah
I changed your func to g and didn't notice it was recursive