

A238373


The number of "topped inward" shuffles to reorder a stack of n cards to its original order.


1



3, 4, 2, 4, 7, 12, 9, 8, 21, 12, 15, 15, 30, 16, 30, 40, 35, 60, 21, 57, 24, 24, 90, 63, 27, 28, 12, 12, 31, 220, 33, 63, 180, 420, 37, 225, 39, 24, 182, 99, 60, 40, 306, 264, 195, 48, 49, 60, 51, 144, 306, 84, 462, 60, 264, 265, 180, 240, 35, 35, 63, 144, 612, 544, 67, 1012, 870, 84, 840, 72, 195, 264, 180, 312, 650, 1023, 79, 180, 81, 228, 63, 84, 1740, 783, 87, 88
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

3,1


COMMENTS

Define a shuffle where the top of the old stack becomes the top of the new stack and is "marked" such that the 2nd, 3rd, 4th card of the old stack are placed right after, just before, right after, just before,... the position of the marked card in the new stack.
This permutes the numbers 1, 2, 3, 4, 5.. > 1 > 1,2 > 3,1,2 > 3,1,4,2 > 3,5,1,4,2 etc. Compared to the shuffle in A238371, the odd numbers before the 1 and even numbers after the 1 appear in the opposite order, (old) labels growing inwards towards the (old) top card.
(The "topped inward" classification is a nomenclature invented here; to be replaced by a better name once available.)
The sequence shows how often this shuffle needs to be applied to let the reshuffled stack return to its original 1, 2, 3,.. order.
Conjecture (equivalent to the Pfister comment in A216066): if the shuffle were defined again in inward order, but with the odd numbers to the left and the even numbers to the right, A003558 becomes the number of shuffles to return to original order.


LINKS

Table of n, a(n) for n=3..88.


EXAMPLE

For n=5, the shuffle of 1,2,3,4,5 is 3,5,1,4,2 (1st shuffle), which becomes 1,2,3,4,5 (2nd shuffle, already original order), so a(5)=2


MAPLE

trackIn := proc(L)
local ret, po, k ;
ret := [op(1, L)] ;
po := 1 ;
for k from 2 to nops(L) do
if type(k, 'even') then
ret := [op(1..po, ret), op(k, L), op(po+1..nops(ret), ret)] ;
else
ret := [op(1..po1, ret), op(k, L), op(po..nops(ret), ret)] ;
po := po+1 ;
end if;
end do:
ret ;
end proc:
A238373 := proc(n)
local ca, org, tu ;
ca := [seq(k, k=1..n)] ;
org := [seq(k, k=1..n)] ;
for tu from 1 do
ca := trackIn(ca) ;
if ca = org then
return tu;
end if:
end do:
end proc:
seq(A238373(n), n=3..88)


CROSSREFS

Sequence in context: A323100 A161173 A210875 * A078069 A090131 A152833
Adjacent sequences: A238370 A238371 A238372 * A238374 A238375 A238376


KEYWORD

nonn


AUTHOR

R. J. Mathar, Feb 25 2014


STATUS

approved



