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 A249991 #20 May 31 2025 15:55:45 %S A249991 2,3,5,10,12,13,21,26,28,39,41,46,54,65,67,82,84,85,109,114,122,137, %T A249991 139,160,178,179,181,222,230,235,269,274,276,313,331,336,370,381,383, %U A249991 424,426,437,471,476,536,541,549,554,618,629,647,704,706,707,761,818 %N A249991 Start with the natural numbers, reverse the order in each pair, skip one number, reverse the order in each triple, skip one number, and so on. %C A249991 Start with the natural numbers. Reverse the order of numbers in each pair. Skip one number. In the remainder (that is, "1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11,...") reverse the order in each triple. Skip one number. In the remainder (it starts with "4, 1, 8, 5, 6, 9, 10, 7") reverse the order in each tetrad. Skip one number. And so on. %o A249991 (Python) %o A249991 TOP = 100000 %o A249991 a = list(range(TOP)) %o A249991 for step in range(2,TOP): %o A249991 numBlocks = (len(a)-1) // step %o A249991 if numBlocks==0: break %o A249991 a = a[:(1+numBlocks*step)] %o A249991 for pos in range(1,len(a),step): %o A249991 a[pos:pos+step] = a[pos+step-1:pos-1:-1] %o A249991 print(a[1], end=', ') %o A249991 a[1:] = a[2:] %Y A249991 Cf. A000960, A026239, A249990. %Y A249991 Partial sums of A057031. %K A249991 nonn %O A249991 1,1 %A A249991 _Alex Ratushnyak_, Nov 27 2014