A225232 The number of FO3C2 moves required to restore a packet of n playing cards to its original state (order and orientation).
2, 4, 4, 12, 6, 24, 8, 40, 10, 60, 12, 84, 14, 112, 16, 144, 18, 180, 20, 220, 22, 264, 24, 312, 26, 364, 28, 420, 30, 480, 32, 544, 34, 612, 36, 684, 38, 760, 40, 840, 42, 924, 44, 1012, 46, 1104, 48, 1200, 50, 1300, 52, 1404, 54, 1512, 56, 1624, 58, 1740, 60, 1860, 62, 1984
Offset: 3
References
- Colm Mulcahy, Mathematical Card Magic: Fifty-Two New Effects, A K Peters, 2013, chapter 9.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 3..1000
- Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
Programs
-
PARI
a(n)={ if(n<6,return(if(n>3,4,2))); n--; my(deck=vector(n,i,i),original=deck,steps); while(1, steps+=2; deck=concat(deck[5..n],-[deck[2],deck[1],deck[4],deck[3]]); if(deck==original,return(steps)) ) }; \\ Charles R Greathouse IV, May 03 2013
-
PARI
a(n)=if(n%2,n-1,n*(n-2)/2) \\ Charles R Greathouse IV, May 06 2013
-
PARI
Vec(2*x^3*(x^2-2*x-1)/((x-1)^3*(x+1)^3) + O(x^100)) \\ Colin Barker, Jun 04 2014
Formula
Assume n >=3. For odd n we have a(n) = n-1 and for even n we have a(n) = (n-2)n/2. Equivalently, a(2k+1) = 2k and a(2k) = 2k(k-1).
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). - Colin Barker, Jun 04 2014
G.f.: 2*x^3*(x^2-2*x-1) / ((x-1)^3*(x+1)^3). - Colin Barker, Jun 04 2014
Extensions
a(10), a(12)-a(64) from Charles R Greathouse IV, May 03 2013
Comments