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 A220660 #13 Mar 31 2025 22:32:04 %S A220660 0,0,1,0,1,2,3,4,5,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, %T A220660 20,21,22,23,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21, %U A220660 22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 %N A220660 Irregular table, where the n-th row consists of numbers 0..(n!-1). %C A220660 Used for computing A030298: a(n) tells the zero-based ranking of the n-th permutation in A030298 (A030299(n)) in the lexicographical ordering of all finite permutations of the same size. %H A220660 Antti Karttunen, <a href="/A220660/b220660.txt">The rows 1..7 of the irregular table, flattened.</a> %F A220660 a(n) = n - A007489(A084556(n)-1) - 1. %F A220660 a(n) = A220661(n)-1. %e A220660 Rows of this irregular table begin as: %e A220660 0; %e A220660 0, 1; %e A220660 0, 1, 2, 3, 4, 5; %t A220660 Table[Range[0,n!-1],{n,5}]//Flatten (* _Harvey P. Dale_, Feb 27 2017 *) %o A220660 (Scheme) (define (A220660 n) (- n (A007489 (-1+ (A084556 n))) 1)) %Y A220660 Cf. A220661, A030298. %K A220660 nonn,tabf %O A220660 1,6 %A A220660 _Antti Karttunen_, Dec 18 2012