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 A334792 #10 May 17 2020 12:13:51 %S A334792 0,1,3,2,4,5,10,11,9,8,6,7,12,13,15,14,16,17,22,23,21,20,18,19,43,42, %T A334792 44,45,47,46,41,40,38,39,37,36,31,30,32,33,35,34,29,28,26,27,25,24,48, %U A334792 49,51,50,52,53,58,59,57,56,54,55,60,61,63,62,64,65,70,71 %N A334792 Let L_0 = (0, 1, 2, ...); for k = 1, 2, ..., L_k is obtained by splitting L_{k-1} into runs of k! terms and reversing even-indexed runs; {a(n)} is the limit of L_k as k tends to infinity. %C A334792 A003188 can be obtained in the same manner by considering runs of 2^k terms. %C A334792 A163332 can be obtained in the same manner by considering runs of 3^k terms. %C A334792 This sequence is a permutation of the nonnegative integers. %H A334792 Rémy Sigrist, <a href="/A334792/b334792.txt">Table of n, a(n) for n = 0..5039</a> (n = 0..7!-1) %H A334792 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A334792 L_0 = (0, 1, 2, 3, 4, 5, ...) %e A334792 L_1 = (0, 1, 2, 3, 4, 5, ...) %e A334792 L_2 = (0, 1, 3, 2, 4, 5, ...) %e A334792 As 5 < k! for k > 2, we have: %e A334792 - a(0) = 0, %e A334792 - a(1) = 1, %e A334792 - a(2) = 3, %e A334792 - a(3) = 2, %e A334792 - a(4) = 4, %e A334792 - a(5) = 5. %o A334792 (PARI) a(n) = { for (k=1, oo, if (n<k!, while (k, my (q=n\k!, r=n%k!); if (q%2, n=(q+1)*k!-1-r;); k--); return (n))) } %Y A334792 Cf. A003188, A163332. %K A334792 nonn %O A334792 0,3 %A A334792 _Rémy Sigrist_, May 11 2020