OFFSET
1,2
COMMENTS
Cards of the same color are considered identical. There can be any number of different colors.
Apparently the lengths of all cycles (not just the longest) are powers of 2.
FORMULA
It appears that a(n) = 2^floor((n-1)/2) for n != 2.
EXAMPLE
For n = 7, the initial configuration 0120323 (with the top of the deck to the left) leads to a cycle of length 8: 0120323 -> 1203023 -> 2103023 -> 1030232 -> 0130232 -> 1302032 -> 3102032 -> 1020323 -> 0120323. This is the maximum for 7 cards, so a(7) = 8.
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Pontus von Brömssen, Feb 04 2023
STATUS
approved