This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A381114 #27 Mar 02 2025 22:54:52 %S A381114 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, %T A381114 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, %U A381114 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 %N 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. %C A381114 In this variation of the Josephus elimination process, people numbered 1 through n are arranged in a circle. A pointer starts at person 1. Person 1 is eliminated, then three people are skipped because the number O-N-E has three letters. Then, the next person is eliminated. Next, three people are skipped because T-W-O has three letters, and the next person is eliminated. Then, five people are skipped because T-H-R-E-E has five letters, and so on. This repeats until no people remain. This sequence represents the triangle T(n, k), the order of elimination for the person numbered k in a circle of n people. %C A381114 Every entry of the first column is 1. %C A381114 In rows 5 and after, the second number is 5. In rows 9 and after, the third number is 9. In rows 15 and after, the fourth number is 15. In the limit, the numbers in a row form sequence A381128(k). %e A381114 Triangle begins: %e A381114 1; %e A381114 1, 2; %e A381114 1, 3, 2; %e A381114 1, 2, 4, 3; %e A381114 1, 5, 2, 4, 3; %e A381114 1, 5, 4, 3, 6, 2; %e A381114 1, 5, 3, 6, 2, 4, 7; %e A381114 ... %e A381114 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. %o A381114 (Python) %o A381114 from num2words import num2words as n2w %o A381114 def f(n): return sum(1 for c in n2w(n).replace(" and", "") if c.isalpha()) %o A381114 def row(n): %o A381114 c, i, J, out = 1, 0, list(range(1, n+1)), [] %o A381114 while len(J) > 1: %o A381114 q = J.pop(i) %o A381114 out.append(q) %o A381114 i = (i + f(c))%len(J) %o A381114 c = c+1 %o A381114 return out + [J[0]] %o A381114 print([e for n in range(1, 14) for e in row(n)]) # _Michael S. Branicky_, Feb 16 2025 %Y A381114 Cf. A005589, A006257, A225381, A321298, A378635, A380201, A380202, A380204, A380246, A380247, A380248, A381127, A381128, A381129. %K A381114 nonn,tabl,word %O A381114 1,3 %A A381114 _Tanya Khovanova_, _Nathan Sheffield_, and the MIT PRIMES STEP junior group, Feb 14 2025