login
A386643
Elimination order of the first person in a variation of the Josephus problem in which one person is skipped, then one is eliminated, then two people are skipped and one eliminated, then three people are skipped and so on.
3
1, 2, 3, 2, 3, 4, 5, 3, 7, 9, 5, 7, 4, 10, 6, 13, 16, 18, 5, 17, 10, 22, 22, 8, 17, 6, 21, 15, 27, 18, 16, 18, 23, 7, 12, 35, 35, 36, 28, 13, 15, 37, 8, 21, 30, 16, 37, 26, 30, 41, 23, 19, 9, 28, 33, 13, 28, 44, 50, 35, 60, 58, 53, 10, 47, 61, 41, 37, 26, 34, 70, 15, 66, 34, 50, 11, 55, 19, 70, 70
OFFSET
1,2
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 pp. 17, 39.
EXAMPLE
Consider 4 people in a circle. Initially, person number 1 is skipped, and person 2 is eliminated. The remaining people are now in order 3, 4, 1. Then, two people are skipped, and person 1 is eliminated, implying that the order of elimination of the first person is 2: a(4) = 2.
PROG
(Python)
def a(n):
i, J, out, c = 0, list(range(1, n+1)), [], 1
while len(J) > 1:
i = (i + c)%len(J)
q = J.pop(i)
if q == 1:
return c
c += 1
return c
print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Oct 13 2025
CROSSREFS
The first column of triangle A386639.
Sequence in context: A260112 A361838 A213183 * A125929 A309236 A071933
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Nathan Sheffield, and the MIT PRIMES STEP junior group, Jul 27 2025
STATUS
approved