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 A375302 #4 Aug 25 2024 09:26:37 %S A375302 0,0,5,14,5,119,5039,34406,22589,10919,7625519,83825279,39916799 %N A375302 a(n) is the rank of row n of A375301 in a lexicographic permutation of [1, ..., n]. %C A375302 See A375301 for more information. %H A375302 Blai Bonet, <a href="https://bonetblai.github.io/reports/AAAI08-ws10-ranking.pdf">Efficient Algorithms to Rank and Unrank Permutations in Lexicographic Order</a>, Workshop on Search in Artificial Intelligence and Robotics at AAAI, 2008. %H A375302 Wendy Myrvold and Frank Ruskey, <a href="https://webhome.cs.uvic.ca/~ruskey/Publications/RankPerm/RankPerm.html">Ranking and Unranking Permutations in Linear Time</a>. %o A375302 (PARI) \\ Blai Bonet's ranking algorithm %o A375302 rank(P) = {my(n=#P, k=logint(n,2)+1, T=vector(2^(k+1)-1,i,0), r=0); %o A375302 for(i=1, n, my(ctr=P[i], node=2^k+P[i]); for(j=1, k, if(node%2, ctr-=T[(node>>1)<<1]); T[node]++; node=node>>1); T[node]++; r=r*(n+1-i)+ctr); r-sum(k=0, n-1, k!)}; %o A375302 \\ uses function a375301_row from A375301 %o A375302 a(n) = rank(a375301_row(n)) %Y A375302 Cf. A060117, A375301. %K A375302 nonn,more %O A375302 1,3 %A A375302 _Hugo Pfoertner_, Aug 25 2024