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 A323168 #7 Jan 11 2019 20:35:50 %S A323168 1,2,2,3,2,4,2,5,6,7,2,3,2,8,9,10,2,11,2,12,13,14,2,15,16,17,18,19,2, %T A323168 20,2,21,22,23,20,21,2,24,25,26,2,27,2,28,29,30,2,31,32,33,34,35,2,36, %U A323168 37,38,39,40,2,41,2,42,43,44,45,46,2,47,48,49,2,50,2,51,52,53,54,55,2,15,32,56,2,57,58,59,60,61,2,62,63,64,65,66,67,21,2,68,69,70,2,71,2,57 %N A323168 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = [A322867(n), A323174(n)] for n > 1, and f(1) = 0. %C A323168 Restricted growth sequence transform of function f, with f(1) = 0 and f(n) = [A322867(n), A323174(n)] for n > 1. %C A323168 Equally, restricted growth sequence transform of function f, with f(1) = 0 and f(n) = A318310(A122111(n)) for n > 1. %C A323168 For all i, j: %C A323168 a(i) = a(j) => A322867(i) = A322867(j), %C A323168 a(i) = a(j) => A323167(i) = A323167(j), %C A323168 a(i) = a(j) => A323174(i) = A323174(j). %H A323168 Antti Karttunen, <a href="/A323168/b323168.txt">Table of n, a(n) for n = 1..65537</a> %H A323168 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A323168 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %H A323168 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a> %o A323168 (PARI) %o A323168 up_to = 4096; %o A323168 rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; }; %o A323168 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)}; %o A323168 A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n))); %o A323168 A005187(n) = { my(s=n); while(n>>=1, s+=n); s; }; %o A323168 A294898(n) = (A005187(n)-sigma(n)); %o A323168 A318310aux(n) = [hammingweight(n), A294898(n)]; %o A323168 A323168aux(n) = if(1==n,0,A318310aux(A122111(n))); %o A323168 v323168 = rgs_transform(vector(up_to, n, A323168aux(n))); %o A323168 A323168(n) = v323168[n]; %Y A323168 Cf. A000203, A005187, A122111, A294898, A318310, A322867, A323167, A323173, A323174. %Y A323168 Cf. also A323240. %K A323168 nonn %O A323168 1,2 %A A323168 _Antti Karttunen_, Jan 10 2019