OFFSET
1,2
COMMENTS
This elimination process is related to the under-down-down card dealing.
LINKS
Eric Huang, Tanya Khovanova, Timur Kilybayev, Ryan Li, Brandon Ni, Leone Seidel, Samarth Sharma, Nathan Sheffield, Vivek Varanasi, Alice Yin, Boya Yun, and William Zelevinsky, Card Dealing Math, arXiv:2509.11395 [math.NT], 2025. See p. 17.
FORMULA
a(3k+1) = 2k+1; a(3k-1) = 2k.
EXAMPLE
Consider four people in order 1,2,3,4. In the first round, the first person is skipped and the second and the third persons are eliminated. Now people are ordered 4,1. In the second round, person 4 is skipped, and person 1 is eliminated. Thus, person 1 is eliminated third and a(4) = 3.
PROG
(Python)
def a(n):
i, J, out, c = 0, list(range(1, n+1)), [], 0
while len(J) > 1:
i = (i + 1)%len(J)
q = J.pop(i)
c += 1
if q == 1:
return c
i = i%len(J)
if len(J) > 1:
q = J.pop(i)
c += 1
if q == 1:
return c
return c+1
print([a(n) for n in range(1, 71)]) # Michael S. Branicky, Apr 28 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Nathan Sheffield, and the MIT PRIMES STEP junior group, Apr 14 2025
STATUS
approved
