OFFSET
1,1
COMMENTS
Consider a deck of cards of size 2n where an ace of spades is placed a(n)-th from the top. Alice deals the deck into two piles, where the first card goes to Bob and the second to herself. Then Bob's pile is discarded and Alice repeats the procedure with her leftover pile until she is left with one card. This card is the ace of spades.
In the standard deck of size 52, the chosen card needs to be placed 22nd. Not coincidentally, the title of the trick has 22 letters.
The placement is the same for the decks of size 2n and 2n+1: this is why the odd-sized decks are discarded from the sequence.
a(n) is always even to guarantee that during the first dealing the card goes back to Alice's pile.
LINKS
Pete McCabe, Scripting Magic for Zoom.
FORMULA
a(n) = 2(n+1-a(floor(n/2))), with a(1) = 2.
MATHEMATICA
lis = {2}; Do[lis = Append[lis, 2 (Length[lis] + 2 - lis[[Floor[(Length[lis] + 1)/2]]])], {70}]; lis
CROSSREFS
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Jan 09 2022
STATUS
approved