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 A318308 #5 Aug 26 2018 20:13:52 %S A318308 1,1,1,1,2,3,4,1,4,1,5,6,7,8,2,1,9,10,11,12,5,13,14,15,16,5,17,18,19, %T A318308 20,21,1,16,22,23,24,25,26,14,27,28,29,30,8,31,16,32,33,30,34,35,4,36, %U A318308 20,25,37,38,39,40,41,42,43,16,1,44,15,45,31,46,47,48,49,50,51,39,7,52,20,53,54,30,55,56,57,58,59,60,47,61,62,63,22,40,46,64 %N A318308 Restricted growth sequence transform of A294898. %H A318308 Antti Karttunen, <a href="/A318308/b318308.txt">Table of n, a(n) for n = 1..65537</a> %o A318308 (PARI) %o A318308 up_to = 65537; %o A318308 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 A318308 A294898(n) = (2*n - sigma(n) - hammingweight(n)); %o A318308 v318308 = rgs_transform(vector(up_to,n,A294898(n))); %o A318308 A318308(n) = v318308[n]; %Y A318308 Cf. A294898, A286449, A318309, A318310. %K A318308 nonn %O A318308 1,5 %A A318308 _Antti Karttunen_, Aug 26 2018