OFFSET
1,2
COMMENTS
Let's say you have 3 cards (1 - 2 - 3). You move 1, 2 over 1, 3 below 2. Now you have: (2-1-3). Now you repeat the movement: You move 2, 1 over 2, 3 below 2. Now you have: (1-2-3). The same initial scenario. Total 2 moves. With 4 cards you do it in three moves. For 8 cards you need 4 moves. For 16 cards you need 5 moves. I can assume that for 32 cards I will do it in 6 moves. But for 14 or 15 cards you need 14 moves. I don't know how to predict how many moves for n cards...
LINKS
Jon Maiga, Table of n, a(n) for n = 1..1000
MATHEMATICA
PROG
(PARI)
deck(n) = {s = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,; :!?.*%$£€=+-&()[]{}_"; v = Vec(s); ss = ""; for (i=1, n, ss = concat(ss, v[i]); ); return (ss); }
move(cards) = {v = Vec(cards); s = ""; for (i=1, length(v), if (i % 2, s = concat(s, v[i]), s = concat(v[i], s)); ); return (s); }
a(n) = {cardsa = deck(n); cardsb = cardsa; diff = 1; nb = 0; while (diff, cardsb = move(cardsb); diff = (cardsa != cardsb); nb++; ); return (nb); }
\\ Michel Marcus, Mar 05 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Hernan Bonsembiante (hernanbon(AT)tutopia.com), Oct 19 2008
EXTENSIONS
More terms from Michel Marcus, Mar 05 2013
STATUS
approved