cp's OEIS Frontend

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.

A360360 Given a deck of colored cards, move the top card below the bottom-most card of the same color, with one other card between them. (If the top and bottom cards have the same color, the top card is moved to the bottom of the deck; if there is no other card of the same color, the top card is moved one step down in the deck.) a(n) is the maximum, over all initial color configurations of a deck of n cards, of the length of the eventual cycle when repeatedly applying this move.

This page as a plain text file.
%I A360360 #13 Feb 26 2023 20:08:49
%S A360360 1,2,2,2,4,4,8,8,16,16,32,32,64,64
%N A360360 Given a deck of colored cards, move the top card below the bottom-most card of the same color, with one other card between them. (If the top and bottom cards have the same color, the top card is moved to the bottom of the deck; if there is no other card of the same color, the top card is moved one step down in the deck.) a(n) is the maximum, over all initial color configurations of a deck of n cards, of the length of the eventual cycle when repeatedly applying this move.
%C A360360 Cards of the same color are considered identical. There can be any number of different colors.
%C A360360 Apparently the lengths of all cycles (not just the longest) are powers of 2.
%F A360360 It appears that a(n) = 2^floor((n-1)/2) for n != 2.
%e A360360 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.
%Y A360360 Cf. A360361, A360362.
%K A360360 nonn,more
%O A360360 1,2
%A A360360 _Pontus von Brömssen_, Feb 04 2023