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 A280318 #22 Jan 01 2017 02:04:27 %S A280318 0,1,3,2,4,5,11,10,8,9,7,6,12,13,15,14,16,17,23,22,20,21,19,18,93,92, %T A280318 94,95,90,91,78,79,81,80,82,83,89,88,86,87,85,84,74,75,73,72,77,76,52, %U A280318 53,48,49,51,50,71,70,68,69,67,66,55,54,59,58 %N A280318 a(n) is the n-th permutation generated by Heap's algorithm, represented by row number of A055089. %C A280318 This is a permutation of the nonnegative integers. It divides naturally in sections of factorial length, so it can be seen as a triangle with row lengths A094258: %C A280318 0, %C A280318 1, %C A280318 3, 2, 4, 5, %C A280318 11, 10, 8, 9, 7, 6, 12, 13, 15, 14, 16, 17, 23, 22, 20, 21, 19, 18... %C A280318 Compare A280319 for Steinhaus-Johnson-Trotter algorithm, which is a triangle of finite permutations rather than one infinite permutation. %H A280318 Tilman Piesk, <a href="/A280318/b280318.txt">Table of n, a(n) for n = 0..5039</a> %H A280318 Tilman Piesk, <a href="http://pastebin.com/ERqb4EaX">Calculation in Python</a> %H A280318 Wikipedia, <a href="https://en.wikipedia.org/wiki/Heap's_algorithm">Heap's algorithm</a> %e A280318 Example for the first 24 entries of the sequence. On the right are the permutations of {1,2,3,4} in the order generated by the Heap's algorithm: %e A280318 n rev colex a(n) Heap's %e A280318 0 1 2 3 4 0 1 2 3 4 %e A280318 1 2 1 3 4 1 2 1 3 4 %e A280318 2 1 3 2 4 3 3 1 2 4 %e A280318 3 3 1 2 4 2 1 3 2 4 %e A280318 4 2 3 1 4 4 2 3 1 4 %e A280318 5 3 2 1 4 5 3 2 1 4 %e A280318 6 1 2 4 3 11 4 2 1 3 %e A280318 7 2 1 4 3 10 2 4 1 3 %e A280318 8 1 4 2 3 8 1 4 2 3 %e A280318 9 4 1 2 3 9 4 1 2 3 %e A280318 10 2 4 1 3 7 2 1 4 3 %e A280318 11 4 2 1 3 6 1 2 4 3 %e A280318 12 1 3 4 2 12 1 3 4 2 %e A280318 13 3 1 4 2 13 3 1 4 2 %e A280318 14 1 4 3 2 15 4 1 3 2 %e A280318 15 4 1 3 2 14 1 4 3 2 %e A280318 16 3 4 1 2 16 3 4 1 2 %e A280318 17 4 3 1 2 17 4 3 1 2 %e A280318 18 2 3 4 1 23 4 3 2 1 %e A280318 19 3 2 4 1 22 3 4 2 1 %e A280318 20 2 4 3 1 20 2 4 3 1 %e A280318 21 4 2 3 1 21 4 2 3 1 %e A280318 22 3 4 2 1 19 3 2 4 1 %e A280318 23 4 3 2 1 18 2 3 4 1 %Y A280318 Cf. A055089, A094258, A280319. %K A280318 nonn,tabf %O A280318 0,3 %A A280318 _Tilman Piesk_, Dec 31 2016