The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A238371 a(1)=1; for n > 1, a(n) = the number of "topped" Mongean shuffles to reorder a stack of n cards to its original order. 4
 1, 1, 3, 3, 5, 5, 4, 4, 9, 9, 11, 11, 9, 9, 5, 5, 12, 12, 12, 12, 7, 7, 23, 23, 8, 8, 20, 20, 29, 29, 6, 6, 33, 33, 35, 35, 20, 20, 39, 39, 41, 41, 28, 28, 12, 12, 36, 36, 15, 15, 51, 51, 53, 53, 36, 36, 44, 44, 24, 24, 20, 20, 7, 7, 65, 65, 36, 36, 69, 69, 60, 60, 42, 42, 15, 15, 20, 20, 52, 52, 81, 81, 83, 83, 9, 9, 60, 60 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS In the Mongean shuffle, the top card of the stack becomes the top of the new stack, the second of the old stack goes on top of the new stack, the third to the bottom of the new stack, alternating top and bottom of the new stack. Here we define a shuffle where the top-bottom placements in the new stack alternate in the same way, but the second card of the old stack moves to the *bottom* of the stack. A single shuffle is a permutation of 1, 2, 3, 4, 5, 6, ... -> ..., 7, 5, 3, 1, 2, 4, 6, ... The fixed points, where n=a(n), seem to be in A163778. (The "topped" classification is a nomenclature invented here, to be replaced if this variant appears elsewhere in the literature.) LINKS Wikipedia, Mongean shuffle FORMULA a(A163778(n)) = A163778(n). - Andrew Howroyd, Nov 11 2017 MAPLE topMong := proc(L)     ret := [op(1, L)] ;     for k from 2 to nops(L) do         if type(k, 'even') then             ret := [op(ret), op(k, L)] ;         else             ret := [op(k, L), op(ret)] ;         end if;     end do:     ret ; end proc: A238371 := proc(n)     local ca, org, tu ;     ca := [seq(k, k=1..n)] ;     org := [seq(k, k=1..n)] ;     for tu from 1 do         ca := topMong(ca) ;         if ca = org then             return tu;         end if:     end do: end proc: seq(A238371(n), n=2..88) ; MATHEMATICA topMong[L_] := Module[{ret = {L[[1]]}}, For[k = 2, k <= Length[L], k++, If[ EvenQ[k], ret = Append[ret, L[[k]]], ret = Prepend[ret, L[[k]]]]]; ret]; A238371[n_] := Module[{ca, org, tu}, ca = org = Range[n]; For[tu = 1, True, tu++, ca = topMong[ca]; If[ca == org, Return[tu]]]]; Array[A238371, 88] (* Jean-François Alcover, Jul 03 2018, after R. J. Mathar *) PROG (PARI) apply( A238371(n)=znorder(Mod(bitand(n, 2)*2-2, n\2*4+3)), [0..99]) \\ M. F. Hasler, Mar 31 2019 CROSSREFS Cf. A019567 (Mongean shuffle), A294673 (a bisection). Sequence in context: A197100 A258642 A136027 * A133772 A265182 A251549 Adjacent sequences:  A238368 A238369 A238370 * A238372 A238373 A238374 KEYWORD nonn AUTHOR R. J. Mathar, Feb 25 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 19 20:41 EST 2020. Contains 331066 sequences. (Running on oeis4.)