OFFSET
1,2
COMMENTS
Arrange n people numbered 1,2,3,...,n in a circle, increasing clockwise. Starting with the person numbered 1, spell the letters of O-N-E, moving one person clockwise for each letter. Once you are done, eliminate the next person. Then, spell the letters of T-W-O; in other words, skip three people and eliminate the next person. Following this, spell the letters of T-H-R-E-E; in other words, skip five people and eliminate the next person. Continue until one person remains. a(n) is the order of elimination of the first person.
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.
EXAMPLE
Consider n = 4 people. The first person eliminated is number 4. This leaves the remaining people in order 1, 2, 3. The second person eliminated is number 1. Thus, person number 1 is eliminated in the second round, implying that a(4) = 2.
PROG
(Python)
from num2words import num2words as n2w
def spell(n):
return sum(1 for c in n2w(n).replace(" and", "").replace(" ", "").replace(chr(44), "").replace("-", ""))
def nthRow(n):
l = []
for i in range(0, n):
l.append(0)
zp = 0
for j in range(1, n+1):
zc = 0
while zc <= spell(j):
if l[zp] == 0:
zc += 1
zp += 1
zp = zp % n
l[zp-1] = str(j)
return l
l = []
for i in range(1, 89):
l += [nthRow(i)[0]]
print(l)
(Python)
from num2words import num2words as n2w
def f(n): return sum(1 for c in n2w(n).replace(" and", "") if c.isalpha())
def a(n):
c, i, J = 1, 0, list(range(1, n+1))
while len(J) > 0:
i = (i + f(c))%len(J)
q = J.pop(i)
if q == 1: return c
c = c+1
print([a(n) for n in range(1, 89)]) # Michael S. Branicky, Feb 15 2025
CROSSREFS
KEYWORD
nonn,word
AUTHOR
Tanya Khovanova and the MIT PRIMES STEP junior group, Jan 17 2025
STATUS
approved
