This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A238373 #7 Feb 25 2014 16:16:01 %S A238373 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, %T A238373 28,12,12,31,220,33,63,180,420,37,225,39,24,182,99,60,40,306,264,195, %U A238373 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 %N A238373 The number of "topped inward" shuffles to reorder a stack of n cards to its original order. %C A238373 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. %C A238373 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. %C A238373 (The "topped inward" classification is a nomenclature invented here; to be replaced by a better name once available.) %C A238373 The sequence shows how often this shuffle needs to be applied to let the re-shuffled stack return to its original 1, 2, 3,.. order. %C A238373 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. %e A238373 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 %p A238373 trackIn := proc(L) %p A238373 local ret,po,k ; %p A238373 ret := [op(1,L)] ; %p A238373 po := 1 ; %p A238373 for k from 2 to nops(L) do %p A238373 if type(k,'even') then %p A238373 ret := [op(1..po,ret),op(k,L),op(po+1..nops(ret),ret)] ; %p A238373 else %p A238373 ret := [op(1..po-1,ret),op(k,L),op(po..nops(ret),ret)] ; %p A238373 po := po+1 ; %p A238373 end if; %p A238373 end do: %p A238373 ret ; %p A238373 end proc: %p A238373 A238373 := proc(n) %p A238373 local ca,org,tu ; %p A238373 ca := [seq(k,k=1..n)] ; %p A238373 org := [seq(k,k=1..n)] ; %p A238373 for tu from 1 do %p A238373 ca := trackIn(ca) ; %p A238373 if ca = org then %p A238373 return tu; %p A238373 end if: %p A238373 end do: %p A238373 end proc: %p A238373 seq(A238373(n),n=3..88) %K A238373 nonn %O A238373 3,1 %A A238373 _R. J. Mathar_, Feb 25 2014