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 A304746 #10 Sep 30 2019 07:17:02 %S A304746 1,1,2,1,2,1,3,4,2,1,2,4,5,1,3,1,2,6,7,4,2,6,5,1,8,1,2,6,5,1,2,4,2,9, %T A304746 8,4,10,1,3,11,2,6,7,1,8,1,3,6,12,6,7,9,2,9,13,4,8,14,15,4,2,6,5,11,2, %U A304746 16,17,4,12,6,5,11,18,1,2,19,5,9,13,1,2,9,8,14,10,1,2,4,12,1,2,6,5,9,8,1,20,9,8,14,10,21,12,1,2,21,12 %N A304746 Restricted growth sequence transform of A291760(n), formed from 2-digits in ternary representation of A254103(n). %H A304746 Antti Karttunen, <a href="/A304746/b304746.txt">Table of n, a(n) for n = 0..65537</a> %o A304746 (PARI) %o A304746 A254103(n) = if(!n,n,if(!(n%2),(3*A254103(n/2))-1,(3*(1+A254103((n-1)/2)))\2)); %o A304746 A289814(n) = { my (d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==2, 1, 0)), 2); } \\ From A289814 %o A304746 A291760(n) = A289814(A254103(n)); %o A304746 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 A304746 v304746 = rgs_transform(vector(65537,n,A291760(n-1))); %o A304746 A304746(n) = v304746[1+n]; %Y A304746 Cf. A254103, A289814, A291760. %Y A304746 Cf. also A304740, A304748. %K A304746 nonn,look %O A304746 0,3 %A A304746 _Antti Karttunen_, May 29 2018