A381114 Triangle read by rows: T(n,k) is the number of the k-th eliminated person in a variation of the Josephus elimination process for n people, where the number of people skipped is equal to the number of letters in the previous number's English name.
1, 1, 2, 1, 3, 2, 1, 2, 4, 3, 1, 5, 2, 4, 3, 1, 5, 4, 3, 6, 2, 1, 5, 3, 6, 2, 4, 7, 1, 5, 2, 3, 4, 7, 6, 8, 1, 5, 9, 8, 7, 2, 3, 6, 4, 1, 5, 9, 7, 4, 3, 2, 10, 8, 6, 1, 5, 9, 6, 2, 10, 7, 11, 8, 3, 4, 1, 5, 9, 4, 11, 7, 2, 3, 8, 12, 10, 6, 1, 5, 9, 3, 10, 4, 11, 8, 12, 13, 2, 6, 7, 1, 5, 9, 2, 8, 14, 7, 4, 3, 13, 12
Offset: 1
Examples
Triangle begins: 1; 1, 2; 1, 3, 2; 1, 2, 4, 3; 1, 5, 2, 4, 3; 1, 5, 4, 3, 6, 2; 1, 5, 3, 6, 2, 4, 7; ... For n = 4, suppose four people are arranged in a circle. The first person is eliminated, then three people are skipped because O-N-E has three letters. The leftover people are now in order 2,3,4. Then, the next person (numbered 2) is eliminated. The leftover people are now ordered 3,4. The next three people are skipped, so the person eliminated is number 4. Then, 5 people are skipped, and the next person eliminated is number 3. Thus, the fourth row of the triangle is 1,2,4,3.
Crossrefs
Programs
-
Python
from num2words import num2words as n2w def f(n): return sum(1 for c in n2w(n).replace(" and", "") if c.isalpha()) def row(n): c, i, J, out = 1, 0, list(range(1, n+1)), [] while len(J) > 1: q = J.pop(i) out.append(q) i = (i + f(c))%len(J) c = c+1 return out + [J[0]] print([e for n in range(1, 14) for e in row(n)]) # Michael S. Branicky, Feb 16 2025
Comments